From c29131255e7c4adf68c31c9754476d71ca1abf48 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 20 Jan 2024 10:56:14 -0800 Subject: [PATCH] Release 1.8.0.1 --- .../Clima_HackKit_Demo/Clima_HackKit_Demo.csproj | 10 +++++----- .../Clima_SQLite_Demo/Clima_SQLite_Demo.csproj | 2 +- Source/Clima_Demo/MeadowApp.cs | 3 +-- Source/Meadow.Clima/Clima.cs | 5 +++-- Source/Meadow.Clima/ClimaHardwareV2.cs | 15 ++++++++------- Source/Meadow.Clima/ClimaHardwareV3.cs | 8 ++++---- Source/Meadow.Clima/IClimaHardware.cs | 10 +++++++--- Source/Meadow.Clima/Meadow.Clima.csproj | 16 ++++++++-------- 8 files changed, 37 insertions(+), 32 deletions(-) diff --git a/Source/Additional Samples/Clima_HackKit_Demo/Clima_HackKit_Demo.csproj b/Source/Additional Samples/Clima_HackKit_Demo/Clima_HackKit_Demo.csproj index c0d8021..4598ddf 100644 --- a/Source/Additional Samples/Clima_HackKit_Demo/Clima_HackKit_Demo.csproj +++ b/Source/Additional Samples/Clima_HackKit_Demo/Clima_HackKit_Demo.csproj @@ -15,11 +15,11 @@ - - - - - + + + + + diff --git a/Source/Additional Samples/Clima_SQLite_Demo/Clima_SQLite_Demo.csproj b/Source/Additional Samples/Clima_SQLite_Demo/Clima_SQLite_Demo.csproj index ee220da..0e182cb 100644 --- a/Source/Additional Samples/Clima_SQLite_Demo/Clima_SQLite_Demo.csproj +++ b/Source/Additional Samples/Clima_SQLite_Demo/Clima_SQLite_Demo.csproj @@ -10,7 +10,7 @@ 9.0 - + diff --git a/Source/Clima_Demo/MeadowApp.cs b/Source/Clima_Demo/MeadowApp.cs index a002255..1790fb0 100644 --- a/Source/Clima_Demo/MeadowApp.cs +++ b/Source/Clima_Demo/MeadowApp.cs @@ -1,6 +1,5 @@ using Meadow; using Meadow.Devices; -using Meadow.Foundation; using Meadow.Peripherals.Sensors.Location.Gnss; using Meadow.Units; using System; @@ -56,7 +55,7 @@ public override Task Initialize() if (clima.BatteryVoltageInput is { } batteryVoltage) { - batteryVoltage.Updated += BatteryVoltageUpdated; + batteryVoltage.Updated += BatteryVoltageUpdated; } if (clima.Gnss is { } gnss) diff --git a/Source/Meadow.Clima/Clima.cs b/Source/Meadow.Clima/Clima.cs index 7dd8d4d..46f0708 100644 --- a/Source/Meadow.Clima/Clima.cs +++ b/Source/Meadow.Clima/Clima.cs @@ -2,10 +2,11 @@ using Meadow.Logging; using System; -#nullable enable - namespace Meadow.Devices { + /// + /// Represents the Clima hardware + /// public class Clima { private Clima() { } diff --git a/Source/Meadow.Clima/ClimaHardwareV2.cs b/Source/Meadow.Clima/ClimaHardwareV2.cs index 7081399..94ca61a 100644 --- a/Source/Meadow.Clima/ClimaHardwareV2.cs +++ b/Source/Meadow.Clima/ClimaHardwareV2.cs @@ -7,10 +7,11 @@ using Meadow.Logging; using System; -#nullable enable - namespace Meadow.Devices { + /// + /// Represents the Clima v2.x hardware + /// public class ClimaHardwareV2 : IClimaHardware { /// @@ -109,7 +110,7 @@ public ClimaHardwareV2(IF7FeatherMeadowDevice device, II2cBus i2cBus) try { Resolver.Log?.Trace("Initializing GNSS"); - Gnss = new NeoM8(device, device.PlatformOS.GetSerialPortName("COM4"), null, null); + Gnss = new NeoM8(device, device.PlatformOS.GetSerialPortName("COM4")!, null, null); Resolver.Log?.Trace("GNSS initialized"); } catch (Exception e) @@ -125,7 +126,7 @@ public ClimaHardwareV2(IF7FeatherMeadowDevice device, II2cBus i2cBus) } catch (Exception ex) { - Resolver.Log.Error($"Unable to create the Wind Vane: {ex.Message}"); + Resolver.Log?.Error($"Unable to create the Wind Vane: {ex.Message}"); } try @@ -136,7 +137,7 @@ public ClimaHardwareV2(IF7FeatherMeadowDevice device, II2cBus i2cBus) } catch (Exception ex) { - Resolver.Log.Error($"Unable to create the Switching Rain Gauge: {ex.Message}"); + Resolver.Log?.Error($"Unable to create the Switching Rain Gauge: {ex.Message}"); } try @@ -147,7 +148,7 @@ public ClimaHardwareV2(IF7FeatherMeadowDevice device, II2cBus i2cBus) } catch (Exception ex) { - Resolver.Log.Error($"Unable to create the Switching Anemometer: {ex.Message}"); + Resolver.Log?.Error($"Unable to create the Switching Anemometer: {ex.Message}"); } try @@ -158,7 +159,7 @@ public ClimaHardwareV2(IF7FeatherMeadowDevice device, II2cBus i2cBus) } catch (Exception ex) { - Resolver.Log.Error($"Unable to create the Solar Voltage Input: {ex.Message}"); + Resolver.Log?.Error($"Unable to create the Solar Voltage Input: {ex.Message}"); } } } diff --git a/Source/Meadow.Clima/ClimaHardwareV3.cs b/Source/Meadow.Clima/ClimaHardwareV3.cs index 8987eeb..332adab 100644 --- a/Source/Meadow.Clima/ClimaHardwareV3.cs +++ b/Source/Meadow.Clima/ClimaHardwareV3.cs @@ -6,13 +6,13 @@ using Meadow.Foundation.Sensors.Weather; using Meadow.Hardware; using Meadow.Logging; -using Meadow.Units; using System; -#nullable enable - namespace Meadow.Devices { + /// + /// Represents the Clima v3.x hardware + /// public class ClimaHardwareV3 : IClimaHardware { /// @@ -153,7 +153,7 @@ public ClimaHardwareV3(IF7CoreComputeMeadowDevice device, II2cBus i2cBus) try { Resolver.Log.Debug("Initializing GNSS"); - Gnss = new NeoM8(device, device.PlatformOS.GetSerialPortName("COM4"), device.Pins.D05, device.Pins.A03); + Gnss = new NeoM8(device, device.PlatformOS.GetSerialPortName("COM4")!, device.Pins.D05, device.Pins.A03); Resolver.Log.Debug("GNSS initialized"); } catch (Exception e) diff --git a/Source/Meadow.Clima/IClimaHardware.cs b/Source/Meadow.Clima/IClimaHardware.cs index 276ddf4..8290b2d 100644 --- a/Source/Meadow.Clima/IClimaHardware.cs +++ b/Source/Meadow.Clima/IClimaHardware.cs @@ -5,10 +5,11 @@ using Meadow.Foundation.Sensors.Weather; using Meadow.Hardware; -#nullable enable - namespace Meadow.Devices { + /// + /// Contract for the Clima hardware definitions + /// public interface IClimaHardware { /// @@ -57,10 +58,13 @@ public interface IClimaHardware public IAnalogInputPort? BatteryVoltageInput { get; } /// - /// Gets the RGB PWM LED + /// The RGB PWM LED on the Clima board /// public RgbPwmLed? ColorLed { get; } + /// + /// The hardware revision string for the Clima board + /// public string RevisionString { get; } } } \ No newline at end of file diff --git a/Source/Meadow.Clima/Meadow.Clima.csproj b/Source/Meadow.Clima/Meadow.Clima.csproj index a02e57b..dfb2af4 100644 --- a/Source/Meadow.Clima/Meadow.Clima.csproj +++ b/Source/Meadow.Clima/Meadow.Clima.csproj @@ -22,13 +22,13 @@ - - - - - - - - + + + + + + + +