From bf248b137797a2ef8b42ff0bfb681b96f75ac973 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Wed, 5 Apr 2023 13:24:54 -0700 Subject: [PATCH] Sample cleanup --- .../Samples/Pma003I_Sample/MeadowApp.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs index ccdc167cc8..0302beb414 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs @@ -15,15 +15,6 @@ public class MeadowApp : App Pmsa003i pmsa003i; - public override Task Run() - { - Resolver.Log.Info("Run..."); - - pmsa003i.StartUpdating(TimeSpan.FromSeconds(2)); - - return base.Run(); - } - public override Task Initialize() { var bus = Device.CreateI2cBus(I2cBusSpeed.Standard); @@ -34,6 +25,15 @@ public override Task Initialize() return base.Initialize(); } + public override Task Run() + { + Resolver.Log.Info("Run..."); + + pmsa003i.StartUpdating(TimeSpan.FromSeconds(2)); + + return base.Run(); + } + private void Pmsa003i_Updated(object sender, IChangeResult<( Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron,