@@ -524,7 +525,7 @@ Meadow.Cloud provides secure, Over-the-Air (OtA) updates, which enable you to pu
## Azure
-[![Meadow.SBCs.Samples](Design/wildernesslabs-meadow-azure-banner.jpg)](/Source/RaspberryPi/)
+[![Meadow.SBCs.Samples](Design/wildernesslabs-meadow-azure-banner.jpg)](/Source/Azure/)
Meadow project samples using Microsoft Azure. Click on any of these sample project to learn how they work.
@@ -731,6 +732,45 @@ A collection of samples for the Wilderness Labs [Juego IoT Accelerator](https://
[Back to top](#meadowsamples)
+## Gnss Sensor Tracker
+
+[![Gnss Sensor Tracker](Design/wildernesslabs-meadow-gnss-sensor-tracker.jpg)](/Source/GnssTracker/)
+
+Meadow project samples with a Gnss Sensor Tracker. Click on any of these sample project to learn how they work.
+
+
+
+
+
+ Getting started with GNSS Tracker running a diagnostics app
+ Source Code
+
+
+
+ Control a GNSS Tracker over Bluetooth with a MAUI app
+ Source Code
+
+
+
+ Control a GNSS Tracker over WiFi with a MAUI app
+ Source Code
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[Back to top](#meadowsamples)
+
## Support
Having trouble building/running these projects?
diff --git a/Source/Azure/ProjectLab_AzureIoTHub/MainController.cs b/Source/Azure/ProjectLab_AzureIoTHub/Controllers/MainController.cs
similarity index 94%
rename from Source/Azure/ProjectLab_AzureIoTHub/MainController.cs
rename to Source/Azure/ProjectLab_AzureIoTHub/Controllers/MainController.cs
index 17f6fe2c..95397cd0 100644
--- a/Source/Azure/ProjectLab_AzureIoTHub/MainController.cs
+++ b/Source/Azure/ProjectLab_AzureIoTHub/Controllers/MainController.cs
@@ -1,17 +1,16 @@
using Meadow;
using Meadow.Hardware;
using Meadow.Units;
-using ProjectLab_AzureIoTHub.Controllers;
using ProjectLab_AzureIoTHub.Hardware;
using System;
using System.Threading;
using System.Threading.Tasks;
-namespace ProjectLab_AzureIoTHub;
+namespace ProjectLab_AzureIoTHub.Controllers;
internal class MainController
{
- bool useMQTT = true;
+ bool useMQTT = false;
int TIMEZONE_OFFSET = -8; // UTC-8
diff --git a/Source/Azure/ProjectLab_AzureIoTHub/MeadowApp.cs b/Source/Azure/ProjectLab_AzureIoTHub/MeadowApp.cs
index d7e87a63..a4ad3477 100644
--- a/Source/Azure/ProjectLab_AzureIoTHub/MeadowApp.cs
+++ b/Source/Azure/ProjectLab_AzureIoTHub/MeadowApp.cs
@@ -1,6 +1,7 @@
using Meadow;
using Meadow.Devices;
using Meadow.Hardware;
+using ProjectLab_AzureIoTHub.Controllers;
using ProjectLab_AzureIoTHub.Hardware;
using System.Threading.Tasks;
diff --git a/Source/Azure/ProjectLab_AzureIoTHub/app.config.yaml b/Source/Azure/ProjectLab_AzureIoTHub/app.config.yaml
index 2de306ea..cf45ba9e 100644
--- a/Source/Azure/ProjectLab_AzureIoTHub/app.config.yaml
+++ b/Source/Azure/ProjectLab_AzureIoTHub/app.config.yaml
@@ -2,13 +2,20 @@
# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/Application_Settings_Configuration/
+# App lifecycle configuration.
Lifecycle:
- # Control whether Meadow will restart when an unhandled app exception occurs. Combine with Lifecycle > AppFailureRestartDelaySeconds to control restart timing.
- RestartOnAppFailure: false
- # # When app set to restart automatically on app failure,
- #AppFailureRestartDelaySeconds: 15
+
+ # Control whether Meadow will restart when an unhandled app exception occurs. Combine with Lifecycle > AppFailureRestartDelaySeconds to control restart timing.
+ RestartOnAppFailure: false
-# Adjust the level of logging detail.
+ # When app set to restart automatically on app failure,
+# AppFailureRestartDelaySeconds: 15
+
+# Logging configuration.
Logging:
- LogLevel:
- Default: Trace
\ No newline at end of file
+
+ # Adjust the level of logging detail.
+ LogLevel:
+
+ # Trace, Debug, Information, Warning, or Error
+ Default: Trace
\ No newline at end of file
diff --git a/Source/Azure/ProjectLab_AzureIoTHub/wifi.config.yaml b/Source/Azure/ProjectLab_AzureIoTHub/wifi.config.yaml
index 71126001..5a80943a 100644
--- a/Source/Azure/ProjectLab_AzureIoTHub/wifi.config.yaml
+++ b/Source/Azure/ProjectLab_AzureIoTHub/wifi.config.yaml
@@ -2,7 +2,11 @@
# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/WiFi_Configuration/
-# # To enable automatically connecting to a default network, make sure to enable the Coprocessor > AutomaticallyStartNetwork value in meadow.config.yaml.
-#Credentials:
- Ssid: YourSSID
- Password: SSIDPassword
\ No newline at end of file
+# WiFi network credentials
+Credentials:
+
+ # WiFi SSID
+ Ssid: YourSSID
+
+ # WiFi Password
+ Password: SSIDPassword
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/Bluetooth/BluetoothConstants.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/Bluetooth/BluetoothConstants.cs
new file mode 100644
index 00000000..e6db1e85
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/Bluetooth/BluetoothConstants.cs
@@ -0,0 +1,12 @@
+namespace GnssTrackerConnectivity.Common.Bluetooth;
+
+public static class CharacteristicsConstants
+{
+ public const string LED_PAIRING = "19933423-6f14-41c0-bb03-637b2e6ef6b0";
+ public const string LED_TOGGLE = "2eb9edce-d7c4-4079-b3d3-5becfcf0c49d";
+ public const string LED_BLINK = "7cb9817d-6754-46e7-be72-d5790eaf678b";
+ public const string LED_PULSE = "23d3bd90-5966-4eff-9ac7-b6cafe9c182a";
+ public const string ATMOSPHERIC_DATA = "8787e846-51e5-4d9b-87aa-eaf4a8f0056f";
+ public const string MOTION_DATA = "29171115-4bbe-4ac1-a0b0-257b54bcc464";
+ public const string VOLTAGE_DATA = "8468a412-99ae-457c-b2fd-2085ab9aac37";
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/AtmosphericReadingsDTO.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/AtmosphericReadingsDTO.cs
new file mode 100644
index 00000000..5b1c331c
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/AtmosphericReadingsDTO.cs
@@ -0,0 +1,14 @@
+namespace GnssTrackerConnectivity.Common.Models;
+
+public class AtmosphericReadingsDTO
+{
+ public string? Temperature { get; set; }
+
+ public string? Pressure { get; set; }
+
+ public string? Humidity { get; set; }
+
+ public string? GasResistance { get; set; }
+
+ public string? Co2Concentration { get; set; }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/MotionReadingsDTO.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/MotionReadingsDTO.cs
new file mode 100644
index 00000000..b0a8de72
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/MotionReadingsDTO.cs
@@ -0,0 +1,12 @@
+namespace GnssTrackerConnectivity.Common.Models;
+
+public class MotionReadingsDTO
+{
+ public string Acceleration3dX { get; set; }
+ public string Acceleration3dY { get; set; }
+ public string Acceleration3dZ { get; set; }
+
+ public string AngularVelocity3dX { get; set; }
+ public string AngularVelocity3dY { get; set; }
+ public string AngularVelocity3dZ { get; set; }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/VoltageReadingsDTO.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/VoltageReadingsDTO.cs
new file mode 100644
index 00000000..e9e60264
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/DTOs/VoltageReadingsDTO.cs
@@ -0,0 +1,8 @@
+namespace GnssTrackerConnectivity.Common.Models;
+
+public class VoltageReadingsDTO
+{
+ public string? BatteryVoltage { get; set; }
+
+ public string? SolarVoltage { get; set; }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/GnssTrackerConnectivity.Common.projitems b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/GnssTrackerConnectivity.Common.projitems
new file mode 100644
index 00000000..8220bdd6
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/GnssTrackerConnectivity.Common.projitems
@@ -0,0 +1,21 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ true
+ b37359b9-3d61-42bd-b485-fc76275f0585
+
+
+ GnssTrackerConnectivity.Common
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/GnssTrackerConnectivity.Common.shproj b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/GnssTrackerConnectivity.Common.shproj
new file mode 100644
index 00000000..18523622
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity.Common/GnssTrackerConnectivity.Common.shproj
@@ -0,0 +1,13 @@
+
+
+
+ b37359b9-3d61-42bd-b485-fc76275f0585
+ 14.0
+
+
+
+
+
+
+
+
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/.vscode/launch.config b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/.vscode/launch.json
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/.vscode/launch.config
rename to Source/GnssTracker/Connectivity/GnssTrackerConnectivity/.vscode/launch.json
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/ConnectionType.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/ConnectionType.cs
new file mode 100644
index 00000000..fe425877
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/ConnectionType.cs
@@ -0,0 +1,7 @@
+namespace GnssTrackerConnectivity;
+
+public enum ConnectionType
+{
+ WiFi,
+ Bluetooth
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Connectivity/BluetoothServer.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Connectivity/BluetoothServer.cs
new file mode 100644
index 00000000..f02273b9
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Connectivity/BluetoothServer.cs
@@ -0,0 +1,154 @@
+using GnssTrackerConnectivity.Common.Bluetooth;
+using GnssTrackerConnectivity.Controllers;
+using GnssTrackerConnectivity.Models;
+using Meadow;
+using Meadow.Gateways.Bluetooth;
+
+namespace GnssTrackerConnectivity.Connectivity;
+
+public class BluetoothServer
+{
+ private CommandController commandController;
+
+ private ICharacteristic ledPairingCharacteristic;
+ private ICharacteristic ledToggleCharacteristic;
+ private ICharacteristic ledBlinkCharacteristic;
+ private ICharacteristic ledPulseCharacteristic;
+ private ICharacteristic atmosphericDataCharacteristic;
+ private ICharacteristic motionDataCharacteristic;
+ private ICharacteristic voltageDataCharacteristic;
+
+ public BluetoothServer()
+ {
+ commandController = Resolver.Services.Get();
+
+ var sensorController = Resolver.Services.Get();
+ sensorController.AtmosphericConditionsChanged += UpdateAtmosphericConditions;
+ sensorController.MotionConditionsChanged += UpdateMotionConditions;
+ sensorController.VoltageReadingsChanged += UpdateVoltageReadings;
+ }
+
+ private void PairingCharacteristicValueSet(ICharacteristic c, object data)
+ {
+ commandController.FirePairing((bool)data);
+ }
+
+ private void LedToggleCharacteristicValueSet(ICharacteristic c, object data)
+ {
+ commandController.FireLedToggle();
+ }
+
+ private void LedBlinkCharacteristicValueSet(ICharacteristic c, object data)
+ {
+ commandController.FireLedBlink();
+ }
+
+ private void LedPulseCharacteristicValueSet(ICharacteristic c, object data)
+ {
+ commandController.FireLedPulse();
+ }
+
+ public void UpdateAtmosphericConditions(object sender, AtmosphericConditions atmosphericConditions)
+ {
+ string stringValue = $"" +
+ $"{atmosphericConditions.Temperature.Celsius:N1};" +
+ $"{atmosphericConditions.Pressure.StandardAtmosphere:N1};" +
+ $"{atmosphericConditions.Humidity.Percent:N1};" +
+ $"{atmosphericConditions.GasResistance.Megaohms:N1};";
+ Resolver.Log.Info($"{stringValue}");
+ atmosphericDataCharacteristic.SetValue(stringValue);
+ }
+
+ public void UpdateMotionConditions(object sender, MotionConditions motionConditions)
+ {
+ string stringValue = $"" +
+ $"{motionConditions.Acceleration3D.X.CentimetersPerSecondSquared:N1};" +
+ $"{motionConditions.Acceleration3D.Y.CentimetersPerSecondSquared:N1};" +
+ $"{motionConditions.Acceleration3D.Z.CentimetersPerSecondSquared:N1};" +
+ $"{motionConditions.AngularVelocity3D.X.DegreesPerSecond:N1};" +
+ $"{motionConditions.AngularVelocity3D.Y.DegreesPerSecond:N1};" +
+ $"{motionConditions.AngularVelocity3D.Z.DegreesPerSecond:N1};";
+ Resolver.Log.Info($"{stringValue}");
+ motionDataCharacteristic.SetValue(stringValue);
+ }
+
+ private void UpdateVoltageReadings(object sender, VoltageReadings e)
+ {
+ string stringValue = $"" +
+ $"{e.BatteryVoltage:N1};" +
+ $"{e.SolarVoltage:N1};";
+ Resolver.Log.Info($"{stringValue}");
+ voltageDataCharacteristic.SetValue(stringValue);
+ }
+
+ public Definition GetDefinition()
+ {
+ ledPairingCharacteristic = new CharacteristicBool(
+ name: nameof(CharacteristicsConstants.LED_PAIRING),
+ uuid: CharacteristicsConstants.LED_PAIRING,
+ permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
+ properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
+ ledPairingCharacteristic.ValueSet += PairingCharacteristicValueSet;
+
+ ledToggleCharacteristic = new CharacteristicBool(
+ name: nameof(CharacteristicsConstants.LED_TOGGLE),
+ uuid: CharacteristicsConstants.LED_TOGGLE,
+ permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
+ properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
+ ledToggleCharacteristic.ValueSet += LedToggleCharacteristicValueSet;
+
+ ledBlinkCharacteristic = new CharacteristicBool(
+ name: nameof(CharacteristicsConstants.LED_BLINK),
+ uuid: CharacteristicsConstants.LED_BLINK,
+ permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
+ properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
+ ledBlinkCharacteristic.ValueSet += LedBlinkCharacteristicValueSet;
+
+ ledPulseCharacteristic = new CharacteristicBool(
+ name: nameof(CharacteristicsConstants.LED_PULSE),
+ uuid: CharacteristicsConstants.LED_PULSE,
+ permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
+ properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
+ ledPulseCharacteristic.ValueSet += LedPulseCharacteristicValueSet;
+
+ atmosphericDataCharacteristic = new CharacteristicString(
+ name: nameof(CharacteristicsConstants.ATMOSPHERIC_DATA),
+ uuid: CharacteristicsConstants.ATMOSPHERIC_DATA,
+ maxLength: 32,
+ permissions: CharacteristicPermission.Read,
+ properties: CharacteristicProperty.Read);
+
+ motionDataCharacteristic = new CharacteristicString(
+ name: nameof(CharacteristicsConstants.MOTION_DATA),
+ uuid: CharacteristicsConstants.MOTION_DATA,
+ maxLength: 32,
+ permissions: CharacteristicPermission.Read,
+ properties: CharacteristicProperty.Read);
+
+ voltageDataCharacteristic = new CharacteristicString(
+ name: nameof(CharacteristicsConstants.VOLTAGE_DATA),
+ uuid: CharacteristicsConstants.VOLTAGE_DATA,
+ maxLength: 32,
+ permissions: CharacteristicPermission.Read,
+ properties: CharacteristicProperty.Read);
+
+ ICharacteristic[] characteristics =
+ {
+ ledPairingCharacteristic,
+ ledToggleCharacteristic,
+ ledBlinkCharacteristic,
+ ledPulseCharacteristic,
+ atmosphericDataCharacteristic,
+ motionDataCharacteristic,
+ voltageDataCharacteristic
+ };
+
+ var service = new Service(
+ name: "Service",
+ uuid: 253,
+ characteristics
+ );
+
+ return new Definition("GnssTracker", service);
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Connectivity/MapleRequestHandler.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Connectivity/MapleRequestHandler.cs
new file mode 100644
index 00000000..db312062
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Connectivity/MapleRequestHandler.cs
@@ -0,0 +1,88 @@
+using GnssTrackerConnectivity.Common.Models;
+using GnssTrackerConnectivity.Controllers;
+using Meadow;
+using Meadow.Foundation.Web.Maple;
+using Meadow.Foundation.Web.Maple.Routing;
+
+namespace GnssTrackerConnectivity.Connectivity;
+
+public class MapleRequestHandler : RequestHandlerBase
+{
+ public MapleRequestHandler() { }
+
+ [HttpPost("/toggle")]
+ public IActionResult Toggle()
+ {
+ var commandController = Resolver.Services.Get();
+ commandController.FireLedToggle();
+ return new OkResult();
+ }
+
+ [HttpPost("/blink")]
+ public IActionResult Blink()
+ {
+ var commandController = Resolver.Services.Get();
+ commandController.FireLedBlink();
+ return new OkResult();
+ }
+
+ [HttpPost("/pulse")]
+ public IActionResult Pulse()
+ {
+ var commandController = Resolver.Services.Get();
+ commandController.FireLedPulse();
+ return new OkResult();
+ }
+
+ [HttpGet("/getEnvironmentalData")]
+ public IActionResult GetEnvironmentalData()
+ {
+ var sensorController = Resolver.Services.Get();
+
+ var data = new AtmosphericReadingsDTO()
+ {
+ Temperature = $"{sensorController.AtmosphericConditions.Temperature.Celsius:N1}",
+ Humidity = $"{sensorController.AtmosphericConditions.Humidity.Percent:N1}",
+ Pressure = $"{sensorController.AtmosphericConditions.Pressure.StandardAtmosphere:N1}",
+ GasResistance = $"{sensorController.AtmosphericConditions.GasResistance.Megaohms:N1}",
+ Co2Concentration = $"{sensorController.AtmosphericConditions.Co2Concentration.PartsPerMillion:N1}"
+ };
+
+ Context.Response.ContentType = ContentTypes.Application_Json;
+ return new JsonResult(data);
+ }
+
+ [HttpGet("/getMotionData")]
+ public IActionResult GetMotionData()
+ {
+ var sensorController = Resolver.Services.Get();
+
+ var data = new MotionReadingsDTO()
+ {
+ Acceleration3dX = $"{sensorController.MotionConditions.Acceleration3D.X.CentimetersPerSecondSquared:N2}",
+ Acceleration3dY = $"{sensorController.MotionConditions.Acceleration3D.Y.CentimetersPerSecondSquared:N2}",
+ Acceleration3dZ = $"{sensorController.MotionConditions.Acceleration3D.Z.CentimetersPerSecondSquared:N2}",
+ AngularVelocity3dX = $"{sensorController.MotionConditions.AngularVelocity3D.X.DegreesPerSecond:N2}",
+ AngularVelocity3dY = $"{sensorController.MotionConditions.AngularVelocity3D.Y.DegreesPerSecond:N2}",
+ AngularVelocity3dZ = $"{sensorController.MotionConditions.AngularVelocity3D.Z.DegreesPerSecond:N2}",
+ };
+
+ Context.Response.ContentType = ContentTypes.Application_Json;
+ return new JsonResult(data);
+ }
+
+ [HttpGet("/getVoltageData")]
+ public IActionResult GetVoltageData()
+ {
+ var sensorController = Resolver.Services.Get();
+
+ var data = new VoltageReadingsDTO()
+ {
+ BatteryVoltage = $"{sensorController.VoltageReadings.BatteryVoltage:N1}",
+ SolarVoltage = $"{sensorController.VoltageReadings.SolarVoltage:N1}",
+ };
+
+ Context.Response.ContentType = ContentTypes.Application_Json;
+ return new JsonResult(data);
+ }
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/CommandController.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/CommandController.cs
similarity index 90%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/CommandController.cs
rename to Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/CommandController.cs
index 31845466..744f2712 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/CommandController.cs
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/CommandController.cs
@@ -1,7 +1,7 @@
using Meadow;
using System;
-namespace MeadowConnectedSample.Controllers;
+namespace GnssTrackerConnectivity.Controllers;
public class CommandController
{
@@ -34,4 +34,4 @@ public void FireLedPulse()
{
LedPulseValueSet?.Invoke(this, true);
}
-}
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/DisplayController.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/DisplayController.cs
new file mode 100644
index 00000000..637722f8
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/DisplayController.cs
@@ -0,0 +1,118 @@
+using Meadow;
+using Meadow.Foundation.Graphics;
+using Meadow.Foundation.Graphics.MicroLayout;
+using Meadow.Peripherals.Displays;
+
+namespace GnssTrackerConnectivity.Controllers;
+
+public class DisplayController
+{
+ // Screen height is 122 but buffer is 128
+ private readonly int OFFSET_Y = 6;
+
+ private Image ble = Image.LoadFromResource("GnssTrackerConnectivity.Resources.img-ble.bmp");
+ private Image wifi = Image.LoadFromResource("GnssTrackerConnectivity.Resources.img-wifi.bmp");
+
+ private readonly DisplayScreen displayScreen;
+ private readonly AbsoluteLayout dataLayout;
+
+ private Picture connectivityIcon;
+ private Label Line1;
+ private Label Line2;
+ private Label Line3;
+
+ public DisplayController(IPixelDisplay display)
+ {
+ displayScreen = new DisplayScreen(display, RotationType._90Degrees);
+
+ displayScreen.BeginUpdate();
+
+ dataLayout = new AbsoluteLayout(displayScreen, 0, 0, displayScreen.Width, displayScreen.Height);
+
+ displayScreen.Controls.Add(new Box(
+ 0,
+ 0 + OFFSET_Y,
+ displayScreen.Width,
+ displayScreen.Height - OFFSET_Y)
+ {
+ IsFilled = true,
+ ForeColor = Color.Red
+ });
+
+ displayScreen.Controls.Add(new Box(
+ 5,
+ 5 + OFFSET_Y,
+ displayScreen.Width - 10,
+ displayScreen.Height - 10 - OFFSET_Y)
+ {
+ IsFilled = true,
+ ForeColor = Color.White
+ });
+
+ connectivityIcon = new Picture(
+ 15,
+ 22 + OFFSET_Y,
+ 60,
+ 78,
+ wifi);
+ dataLayout.Controls.Add(connectivityIcon);
+
+ Line1 = new Label(
+ 84,
+ 22 + OFFSET_Y,
+ 151,
+ 16)
+ {
+ Text = "-",
+ TextColor = Color.Black,
+ Font = new Font12x16()
+ };
+ dataLayout.Controls.Add(Line1);
+
+ Line2 = new Label(
+ 84,
+ 55 + OFFSET_Y,
+ 151,
+ 16)
+ {
+ Text = "-",
+ TextColor = Color.Black,
+ Font = new Font8x12()
+ };
+ dataLayout.Controls.Add(Line2);
+
+ Line3 = new Label(
+ 84,
+ 84 + OFFSET_Y,
+ 151,
+ 16)
+ {
+ Text = "-",
+ TextColor = Color.Black,
+ Font = new Font12x16()
+ };
+ dataLayout.Controls.Add(Line3);
+
+ displayScreen.Controls.Add(dataLayout);
+ }
+
+ public void ShowBluetoothReady()
+ {
+ connectivityIcon.Image = ble;
+ Line1.Text = "Bluetooth";
+ Line2.Text = "Discoverable";
+ Line3.Text = "Ready";
+
+ displayScreen.EndUpdate();
+ }
+
+ public void ShowMapleReady(string ipAddress)
+ {
+ connectivityIcon.Image = wifi;
+ Line1.Text = "WiFi (Maple)";
+ Line2.Text = $"{ipAddress}";
+ Line3.Text = "Ready";
+
+ displayScreen.EndUpdate();
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/LedController.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/LedController.cs
new file mode 100644
index 00000000..51fe4933
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/LedController.cs
@@ -0,0 +1,59 @@
+using Meadow;
+using Meadow.Peripherals.Leds;
+using System;
+using System.Threading.Tasks;
+
+namespace GnssTrackerConnectivity.Controllers;
+
+public class LedController
+{
+ IRgbPwmLed rgbPwmLed;
+ bool isAnimating;
+
+ public LedController(IRgbPwmLed rgbPwmLed)
+ {
+ this.rgbPwmLed = rgbPwmLed;
+ }
+
+ public async Task SetColor(Color color)
+ {
+ await rgbPwmLed.StopAnimation();
+ rgbPwmLed.SetColor(color);
+ }
+
+ public async Task Toggle()
+ {
+ if (rgbPwmLed.IsOn || isAnimating)
+ {
+ await rgbPwmLed.StopAnimation();
+ rgbPwmLed.IsOn = false;
+ isAnimating = false;
+ }
+ else
+ {
+ await rgbPwmLed.StopAnimation();
+ rgbPwmLed.SetColor(GetRandomColor());
+ rgbPwmLed.IsOn = true;
+ }
+ }
+
+ public async Task StartBlink()
+ {
+ await rgbPwmLed.StopAnimation();
+ await rgbPwmLed.StartBlink(GetRandomColor());
+ isAnimating = true;
+ }
+
+ public async Task StartPulse()
+ {
+ await rgbPwmLed.StopAnimation();
+ await rgbPwmLed.StartPulse(GetRandomColor());
+ isAnimating = true;
+ }
+
+ protected Color GetRandomColor()
+ {
+ var random = new Random();
+ return new Color(random.Next(256), random.Next(256), random.Next(256));
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/MainController.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/MainController.cs
new file mode 100644
index 00000000..23a16c33
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/MainController.cs
@@ -0,0 +1,112 @@
+using GnssTrackerConnectivity.Connectivity;
+using Meadow;
+using Meadow.Devices;
+using Meadow.Foundation.Web.Maple;
+using Meadow.Gateways;
+using Meadow.Hardware;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace GnssTrackerConnectivity.Controllers;
+
+public class MainController
+{
+ // Connect via Maple (WiFi) or Bluetooth?
+ private ConnectionType connectionType = ConnectionType.Bluetooth;
+ //private ConnectionType connectionType = ConnectionType.WiFi;
+
+ private IGnssTrackerHardware hardware;
+ private IWiFiNetworkAdapter wifi;
+ private IBluetoothAdapter bluetooth;
+
+ private SensorController sensorController;
+ private CommandController commandController;
+ private BluetoothServer bluetoothServer;
+
+ private DisplayController displayController;
+ private LedController ledController;
+
+ public MainController(IGnssTrackerHardware hardware, IWiFiNetworkAdapter wifi, IBluetoothAdapter bluetooth)
+ {
+ this.hardware = hardware;
+ this.wifi = wifi;
+ this.bluetooth = bluetooth;
+ }
+
+ public async Task Initialize()
+ {
+ sensorController = new SensorController(hardware);
+ _ = sensorController.StartUpdating(TimeSpan.FromSeconds(15));
+
+ commandController = new CommandController();
+ SubscribeLedCommands();
+
+ displayController = new DisplayController(hardware.Display);
+
+ ledController = new LedController(hardware.OnboardRgbLed);
+
+ if (connectionType == ConnectionType.WiFi)
+ {
+ await StartMapleServer();
+ }
+ else
+ {
+ StartBluetoothServer();
+ }
+ }
+
+ private async Task StartMapleServer()
+ {
+ wifi.NetworkConnected += (s, e) =>
+ {
+ var mapleServer = new MapleServer(s.IpAddress, 5417, advertise: true, logger: Resolver.Log);
+ mapleServer.Start();
+
+ displayController.ShowMapleReady(e.IpAddress.ToString());
+ ledController.SetColor(Color.Green);
+ };
+
+ await wifi.Connect(Secrets.WIFI_NAME, Secrets.WIFI_PASSWORD);
+ }
+
+ private void StartBluetoothServer()
+ {
+ bluetoothServer = new BluetoothServer();
+
+ commandController.PairingValueSet += (s, e) =>
+ {
+ _ = ledController.StartBlink();
+
+ Thread.Sleep(300);
+
+ ledController.SetColor(Color.Green);
+ };
+
+ var definition = bluetoothServer.GetDefinition();
+ bluetooth.StartBluetoothServer(definition);
+
+ displayController.ShowBluetoothReady();
+
+ ledController.SetColor(Color.Green);
+ }
+
+ private void SubscribeLedCommands()
+ {
+ commandController.LedToggleValueSet += (s, e) =>
+ {
+ Resolver.Log.Info("LedToggleValueSet");
+ _ = ledController.Toggle();
+ };
+ commandController.LedBlinkValueSet += (s, e) =>
+ {
+ Resolver.Log.Info("LedBlinkValueSet");
+ _ = ledController.StartBlink();
+ };
+ commandController.LedPulseValueSet += (s, e) =>
+ {
+ Resolver.Log.Info("LedPulseValueSet");
+ _ = ledController.StartPulse();
+ };
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/SensorController.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/SensorController.cs
new file mode 100644
index 00000000..cc3da1cd
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Controllers/SensorController.cs
@@ -0,0 +1,110 @@
+using GnssTrackerConnectivity.Models;
+using Meadow;
+using Meadow.Devices;
+using Meadow.Hardware;
+using Meadow.Peripherals.Sensors;
+using Meadow.Peripherals.Sensors.Atmospheric;
+using Meadow.Peripherals.Sensors.Environmental;
+using Meadow.Peripherals.Sensors.Location.Gnss;
+using Meadow.Peripherals.Sensors.Motion;
+using System;
+using System.Threading.Tasks;
+
+namespace GnssTrackerConnectivity.Controllers;
+
+public class SensorController
+{
+ private TimeSpan SAMPLE_INTERVAL = TimeSpan.FromSeconds(15);
+
+ private ITemperatureSensor temperatureSensor;
+ private IBarometricPressureSensor pressureSensor;
+ private IHumiditySensor humiditySensor;
+ private IGasResistanceSensor gasResistanceSensor;
+ private ICO2ConcentrationSensor co2ConcentrationSensor;
+ private IGyroscope gyroscope;
+ private IAccelerometer accelerometer;
+ private IAnalogInputPort batteryVoltageInput;
+ private IAnalogInputPort solarVoltageInput;
+ private IGnssSensor gnssSensor;
+
+ public AtmosphericConditions AtmosphericConditions { get; set; }
+
+ public MotionConditions MotionConditions { get; set; }
+
+ public VoltageReadings VoltageReadings { get; set; }
+
+ public event EventHandler AtmosphericConditionsChanged = default!;
+
+ public event EventHandler MotionConditionsChanged = default!;
+
+ public event EventHandler VoltageReadingsChanged = default!;
+
+ public SensorController(IGnssTrackerHardware hardware)
+ {
+ Resolver.Services.Add(this);
+
+ temperatureSensor = hardware.TemperatureSensor;
+ pressureSensor = hardware.BarometricPressureSensor;
+ humiditySensor = hardware.HumiditySensor;
+ gasResistanceSensor = hardware.GasResistanceSensor;
+ co2ConcentrationSensor = hardware.CO2ConcentrationSensor;
+ gyroscope = hardware.Gyroscope;
+ accelerometer = hardware.Accelerometer;
+ batteryVoltageInput = hardware.BatteryVoltageInput;
+ solarVoltageInput = hardware.SolarVoltageInput;
+ gnssSensor = hardware.Gnss;
+ }
+
+ public async Task StartUpdating(TimeSpan updateInterval)
+ {
+ while (true)
+ {
+ var temperature = await temperatureSensor.Read();
+ var pressure = await pressureSensor.Read();
+ var humidity = await humiditySensor.Read();
+ var gasResistance = await gasResistanceSensor.Read();
+ //var co2Concentration = await co2ConcentrationSensor.Read();
+ var angularVelocityReading = await gyroscope.Read();
+ var acceleration3DReading = await accelerometer.Read();
+ var batteryVoltageReading = await batteryVoltageInput.Read();
+ var solarVoltageReading = await solarVoltageInput.Read();
+
+ Resolver.Log.Info($"" +
+ $"Temperature: {temperature.Celsius:N1} | " +
+ $"Pressure: {pressure.StandardAtmosphere:N1} | " +
+ $"Humidity: {humidity.Percent:N1} | " +
+ $"Gas Resistance: {gasResistance.Megaohms:N1} | " +
+ //$"CO2 Concentration: {co2Concentration.PartsPerMillion:N1} | " +
+ $"AngularVelocity3D: ({angularVelocityReading.X.RevolutionsPerMinute:N1},{angularVelocityReading.Y.RevolutionsPerMinute:N1},{angularVelocityReading.Z.RevolutionsPerMinute:N1}) | " +
+ $"Acceleration3D: ({acceleration3DReading.X.CentimetersPerSecondSquared:N1}, {acceleration3DReading.Y.CentimetersPerSecondSquared:N1}, {acceleration3DReading.Z.CentimetersPerSecondSquared:N1}) | " +
+ $"Battery Voltage: {batteryVoltageReading.Volts:N1} | " +
+ $"Solar Voltage: {solarVoltageReading.Volts:N1} ");
+
+ AtmosphericConditions = new AtmosphericConditions()
+ {
+ Temperature = temperature,
+ Pressure = pressure,
+ Humidity = humidity,
+ GasResistance = gasResistance,
+ //Co2Concentration = co2Concentration
+ };
+ AtmosphericConditionsChanged?.Invoke(this, AtmosphericConditions);
+
+ MotionConditions = new MotionConditions()
+ {
+ Acceleration3D = acceleration3DReading,
+ AngularVelocity3D = angularVelocityReading
+ };
+ MotionConditionsChanged?.Invoke(this, MotionConditions);
+
+ VoltageReadings = new VoltageReadings()
+ {
+ BatteryVoltage = batteryVoltageReading,
+ SolarVoltage = solarVoltageReading
+ };
+ VoltageReadingsChanged?.Invoke(this, VoltageReadings);
+
+ await Task.Delay(updateInterval);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/GnssTrackerConnectivity.csproj b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/GnssTrackerConnectivity.csproj
new file mode 100644
index 00000000..3b850b1b
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/GnssTrackerConnectivity.csproj
@@ -0,0 +1,28 @@
+
+
+ netstandard2.1
+ true
+ Library
+ App
+ 10.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/MeadowApp.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/MeadowApp.cs
new file mode 100644
index 00000000..8c4da4d4
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/MeadowApp.cs
@@ -0,0 +1,24 @@
+using GnssTrackerConnectivity.Controllers;
+using Meadow;
+using Meadow.Devices;
+using Meadow.Hardware;
+using System.Threading.Tasks;
+
+namespace GnssTrackerConnectivity;
+
+public class MeadowApp : App
+{
+ public override async Task Initialize()
+ {
+ Resolver.Log.Info("Initialize...");
+
+ var gnssTracker = GnssTracker.Create();
+ Resolver.Log.Info($"Running on GnssTracker Hardware");
+
+ var wifi = Device.NetworkAdapters.Primary();
+ var ble = Device.BluetoothAdapter;
+
+ var mainController = new MainController(gnssTracker, wifi, ble);
+ await mainController.Initialize();
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/AtmosphericConditions.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/AtmosphericConditions.cs
new file mode 100644
index 00000000..ba6309c5
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/AtmosphericConditions.cs
@@ -0,0 +1,16 @@
+using Meadow.Units;
+
+namespace GnssTrackerConnectivity.Models;
+
+public class AtmosphericConditions
+{
+ public Temperature Temperature { get; set; }
+
+ public Pressure Pressure { get; set; }
+
+ public RelativeHumidity Humidity { get; set; }
+
+ public Resistance GasResistance { get; set; }
+
+ public Concentration Co2Concentration { get; set; }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/GnssConditions.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/GnssConditions.cs
new file mode 100644
index 00000000..c139461f
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/GnssConditions.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace GnssTrackerConnectivity.Models
+{
+ internal class GnssConditions
+ {
+ }
+}
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/MotionConditions.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/MotionConditions.cs
new file mode 100644
index 00000000..eebaa949
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/MotionConditions.cs
@@ -0,0 +1,10 @@
+using Meadow.Units;
+
+namespace GnssTrackerConnectivity.Models;
+
+public class MotionConditions
+{
+ public Acceleration3D Acceleration3D { get; set; }
+
+ public AngularVelocity3D AngularVelocity3D { get; set; }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/VoltageReadings.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/VoltageReadings.cs
new file mode 100644
index 00000000..faf2dabe
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Models/VoltageReadings.cs
@@ -0,0 +1,10 @@
+using Meadow.Units;
+
+namespace GnssTrackerConnectivity.Models;
+
+public class VoltageReadings
+{
+ public Voltage BatteryVoltage { get; set; }
+
+ public Voltage SolarVoltage { get; set; }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Resources/img-ble.bmp b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Resources/img-ble.bmp
new file mode 100644
index 00000000..935962cf
Binary files /dev/null and b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Resources/img-ble.bmp differ
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Resources/img-wifi.bmp b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Resources/img-wifi.bmp
new file mode 100644
index 00000000..68a0e00c
Binary files /dev/null and b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Resources/img-wifi.bmp differ
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Secrets.cs b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Secrets.cs
similarity index 56%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Secrets.cs
rename to Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Secrets.cs
index 23253814..ee5559f7 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Secrets.cs
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/Secrets.cs
@@ -1,14 +1,14 @@
-namespace MeadowConnectedSample;
+namespace GnssTrackerConnectivity;
public class Secrets
{
///
/// Name of the WiFi network to use.
///
- public const string WIFI_NAME = "WIFI_NAME";
+ public const string WIFI_NAME = "YourSSID";
///
/// Password for the WiFi network names in WIFI_NAME.
///
- public const string WIFI_PASSWORD = "WIFI_PASSWORD";
+ public const string WIFI_PASSWORD = "SSIDPassword";
}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/app.config.yaml b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/app.config.yaml
new file mode 100644
index 00000000..e208dbf7
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/GnssTrackerConnectivity/app.config.yaml
@@ -0,0 +1,36 @@
+# Uncomment additional options as needed.
+# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation.
+# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/Application_Settings_Configuration/
+
+# App lifecycle configuration.
+Lifecycle:
+
+ # Control whether Meadow will restart when an unhandled app exception occurs. Combine with Lifecycle > AppFailureRestartDelaySeconds to control restart timing.
+ RestartOnAppFailure: false
+
+ # When app set to restart automatically on app failure,
+# AppFailureRestartDelaySeconds: 15
+
+# Logging configuration.
+Logging:
+
+ # Adjust the level of logging detail.
+ LogLevel:
+
+ # Trace, Debug, Information, Warning, or Error
+ Default: Information
+
+# Meadow.Cloud configuration.
+MeadowCloud:
+
+ # Enable Logging, Events, Command + Control
+# Enabled: false
+
+ # Enable Over-the-air Updates
+# EnableUpdates: false
+
+ # Enable Health Metrics
+# EnableHealthMetrics: false
+
+ # How often to send metrics to Meadow.Cloud
+# HealthMetricsIntervalMinutes: 60
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/App.xaml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/App.xaml
new file mode 100644
index 00000000..57c1c550
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/App.xaml.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/App.xaml.cs
new file mode 100644
index 00000000..b7012705
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/App.xaml.cs
@@ -0,0 +1,12 @@
+namespace MobileGnssTrackerConnectivity
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ InitializeComponent();
+
+ MainPage = new AppShell();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/AppShell.xaml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/AppShell.xaml
new file mode 100644
index 00000000..a24701c7
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/AppShell.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/AppShell.xaml.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/AppShell.xaml.cs
new file mode 100644
index 00000000..256f082f
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/AppShell.xaml.cs
@@ -0,0 +1,9 @@
+namespace MobileGnssTrackerConnectivity;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+ }
+}
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Converter/InverseBoolConverter.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Converter/InverseBoolConverter.cs
new file mode 100644
index 00000000..6cd10824
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Converter/InverseBoolConverter.cs
@@ -0,0 +1,17 @@
+using System.Globalization;
+
+namespace MobileGnssTrackerConnectivity.Converter
+{
+ public class InverseBoolConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return !(bool)value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return !(bool)value;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MauiProgram.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MauiProgram.cs
new file mode 100644
index 00000000..18ec5d40
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MauiProgram.cs
@@ -0,0 +1,18 @@
+namespace MobileGnssTrackerConnectivity;
+
+public static class MauiProgram
+{
+ public static MauiApp CreateMauiApp()
+ {
+ var builder = MauiApp.CreateBuilder();
+ builder
+ .UseMauiApp()
+ .ConfigureFonts(fonts =>
+ {
+ fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
+ fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
+ });
+
+ return builder.Build();
+ }
+}
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MobileGnssTrackerConnectivity.csproj b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MobileGnssTrackerConnectivity.csproj
new file mode 100644
index 00000000..627bdb65
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MobileGnssTrackerConnectivity.csproj
@@ -0,0 +1,59 @@
+
+
+ net8.0-android
+
+
+ Exe
+ MobileGnssTrackerConnectivity
+ true
+ true
+ enable
+
+
+ GnssTracker
+
+
+ com.companyname.MobileGnssTrackerConnectivity
+ 2750A062-72A3-4E67-A82F-AAC0A348C7B4
+
+
+ 1.0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MobileGnssTrackerConnectivity.sln b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MobileGnssTrackerConnectivity.sln
new file mode 100644
index 00000000..8d15ad91
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/MobileGnssTrackerConnectivity.sln
@@ -0,0 +1,27 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.002.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileGnssTrackerConnectivity", "MobileGnssTrackerConnectivity.csproj", "{4C49DDDB-583D-4A7D-8BB1-9C2E935CFCB0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4C49DDDB-583D-4A7D-8BB1-9C2E935CFCB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4C49DDDB-583D-4A7D-8BB1-9C2E935CFCB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4C49DDDB-583D-4A7D-8BB1-9C2E935CFCB0}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {4C49DDDB-583D-4A7D-8BB1-9C2E935CFCB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4C49DDDB-583D-4A7D-8BB1-9C2E935CFCB0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4C49DDDB-583D-4A7D-8BB1-9C2E935CFCB0}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {CA026A2F-B423-420E-A260-A03C6DB53413}
+ EndGlobalSection
+EndGlobal
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/AndroidManifest.xml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/AndroidManifest.xml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/AndroidManifest.xml
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/AndroidManifest.xml
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/MainActivity.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/MainActivity.cs
new file mode 100644
index 00000000..bf781653
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/MainActivity.cs
@@ -0,0 +1,14 @@
+using Android.App;
+using Android.Content.PM;
+
+namespace MobileGnssTrackerConnectivity
+{
+ [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true,
+ ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation |
+ ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize |
+ ConfigChanges.Density)]
+ public class MainActivity : MauiAppCompatActivity
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/MainApplication.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/MainApplication.cs
new file mode 100644
index 00000000..b2d0eeef
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/MainApplication.cs
@@ -0,0 +1,15 @@
+using Android.App;
+using Android.Runtime;
+
+namespace MobileGnssTrackerConnectivity;
+
+[Application]
+public class MainApplication : MauiApplication
+{
+ public MainApplication(IntPtr handle, JniHandleOwnership ownership)
+ : base(handle, ownership)
+ {
+ }
+
+ protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
+}
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/Resources/values/colors.xml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/Resources/values/colors.xml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/Resources/values/colors.xml
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/Resources/values/colors.xml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/Resources/xml/network_security_config.xml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/Resources/xml/network_security_config.xml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/Resources/xml/network_security_config.xml
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Platforms/Android/Resources/xml/network_security_config.xml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Properties/launchSettings.json b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Properties/launchSettings.json
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Properties/launchSettings.json
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Properties/launchSettings.json
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/AppIcon/appicon.svg b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/AppIcon/appicon.svg
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/AppIcon/appicon.svg
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/AppIcon/appicon.svg
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/AppIcon/appiconfg.svg b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/AppIcon/appiconfg.svg
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/AppIcon/appiconfg.svg
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/AppIcon/appiconfg.svg
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Fonts/OpenSans-Regular.ttf b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Fonts/OpenSans-Regular.ttf
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Fonts/OpenSans-Regular.ttf
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Fonts/OpenSans-Regular.ttf
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Fonts/OpenSans-Semibold.ttf b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Fonts/OpenSans-Semibold.ttf
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Fonts/OpenSans-Semibold.ttf
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Fonts/OpenSans-Semibold.ttf
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_ble_pair.svg b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_ble_pair.svg
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_ble_pair.svg
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_ble_pair.svg
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_ble_paired.svg b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_ble_paired.svg
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_ble_paired.svg
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_ble_paired.svg
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_project_lab.png b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_project_lab.png
new file mode 100644
index 00000000..bc99a993
Binary files /dev/null and b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_project_lab.png differ
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_search.svg b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_search.svg
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_search.svg
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Images/img_search.svg
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Raw/AboutAssets.txt b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Raw/AboutAssets.txt
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Raw/AboutAssets.txt
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Raw/AboutAssets.txt
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Splash/splash.svg b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Splash/splash.svg
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Splash/splash.svg
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Splash/splash.svg
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Styles/Colors.xaml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Styles/Colors.xaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Styles/Colors.xaml
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Styles/Colors.xaml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Styles/Styles.xaml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Styles/Styles.xaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Styles/Styles.xaml
rename to Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Resources/Styles/Styles.xaml
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Utils/BleConstants.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Utils/BleConstants.cs
new file mode 100644
index 00000000..b4b58570
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/Utils/BleConstants.cs
@@ -0,0 +1,14 @@
+namespace MobileGnssTrackerConnectivity.Utils
+{
+ public static class CharacteristicsConstants
+ {
+ public const string ON = "73cfbc6f-61fa-4d80-a92f-eec2a90f8a3e";
+ public const string OFF = "6315119d-d619-49bb-a21d-ef9e99941948";
+ public const string PULSING = "d7551801-31fc-435d-a994-1e7f15e17baf";
+ public const string BLINKING = "3a6cc4f2-a6ab-4709-a9bf-c9611c6bf892";
+ public const string RUNNING_COLORS = "30df1258-f42b-4788-af2e-a8ed9d0b932f";
+
+ public const string IS_CYCLING = "24517ccc-888e-4ffc-9da5-21884353b08d";
+ public const string ANGLE = "5a0bb016-69ab-4a49-a2f2-de5b292458f3";
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/BluetoothPage.xaml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/BluetoothPage.xaml
new file mode 100644
index 00000000..5936ab1a
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/BluetoothPage.xaml
@@ -0,0 +1,267 @@
+
+
+
+
+
+ #555
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/BluetoothPage.xaml.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/BluetoothPage.xaml.cs
new file mode 100644
index 00000000..b2e734f4
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/BluetoothPage.xaml.cs
@@ -0,0 +1,37 @@
+using MobileGnssTrackerConnectivity.ViewModel;
+
+namespace MobileGnssTrackerConnectivity.View
+{
+ public partial class BluetoothPage : ContentPage
+ {
+ BluetoothViewModel vm;
+
+ public BluetoothPage()
+ {
+ InitializeComponent();
+ BindingContext = vm = new BluetoothViewModel();
+
+
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+
+ PermissionStatus location = await Permissions.RequestAsync();
+ PermissionStatus mearby = await Permissions.RequestAsync();
+
+ vm.CmdSearchForDevices.Execute(null);
+ }
+
+ protected override void OnDisappearing()
+ {
+ base.OnDisappearing();
+
+ if (vm.IsConnected)
+ {
+ vm.CmdToggleConnection.Execute(null);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MainPage.xaml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MainPage.xaml
new file mode 100644
index 00000000..901cbae0
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MainPage.xaml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ #555
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MainPage.xaml.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MainPage.xaml.cs
new file mode 100644
index 00000000..04999b89
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MainPage.xaml.cs
@@ -0,0 +1,20 @@
+namespace MobileGnssTrackerConnectivity.View
+{
+ public partial class MainPage : ContentPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ void BtnMapleClicked(object sender, EventArgs e)
+ {
+ Navigation.PushAsync(new MaplePage());
+ }
+
+ void BtnBluetoothClicked(object sender, EventArgs e)
+ {
+ Navigation.PushAsync(new BluetoothPage());
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MaplePage.xaml b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MaplePage.xaml
new file mode 100644
index 00000000..88e26eba
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MaplePage.xaml
@@ -0,0 +1,275 @@
+
+
+
+
+
+ #555
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MaplePage.xaml.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MaplePage.xaml.cs
new file mode 100644
index 00000000..1bdb2e40
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/View/MaplePage.xaml.cs
@@ -0,0 +1,19 @@
+using MobileGnssTrackerConnectivity.ViewModel;
+
+namespace MobileGnssTrackerConnectivity.View
+{
+ public partial class MaplePage : ContentPage
+ {
+ public MaplePage()
+ {
+ InitializeComponent();
+ BindingContext = new MapleViewModel();
+ }
+
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+ (BindingContext as MapleViewModel).CmdSearchServers.Execute(null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/BaseViewModel.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/BaseViewModel.cs
new file mode 100644
index 00000000..de706c52
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/BaseViewModel.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+namespace MobileGnssTrackerConnectivity.ViewModel
+{
+ public class BaseViewModel : INotifyPropertyChanged
+ {
+ bool isBusy;
+ public bool IsBusy
+ {
+ get => isBusy;
+ set { isBusy = value; OnPropertyChanged(nameof(IsBusy)); }
+ }
+
+ #region INotifyPropertyChanged Implementation
+ public event PropertyChangedEventHandler PropertyChanged;
+ public void OnPropertyChanged([CallerMemberName] string name = null)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/BluetoothViewModel.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/BluetoothViewModel.cs
new file mode 100644
index 00000000..ce89e9f6
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/BluetoothViewModel.cs
@@ -0,0 +1,375 @@
+using GnssTrackerConnectivity.Common.Bluetooth;
+using Plugin.BLE;
+using Plugin.BLE.Abstractions.Contracts;
+using Plugin.BLE.Abstractions.EventArgs;
+using Plugin.BLE.Abstractions.Exceptions;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Text;
+using System.Windows.Input;
+
+namespace MobileGnssTrackerConnectivity.ViewModel
+{
+ public class BluetoothViewModel : BaseViewModel
+ {
+ int listenTimeout = 5000;
+
+ ushort DEVICE_ID = 253;
+
+ IAdapter adapter;
+ IService service;
+
+ ICharacteristic ledPairingCharacteristic;
+ ICharacteristic ledToggleCharacteristic;
+ ICharacteristic ledBlinkCharacteristic;
+ ICharacteristic ledPulseCharacteristic;
+ ICharacteristic atmosphericDataCharacteristic;
+ ICharacteristic motionDataCharacteristic;
+ ICharacteristic voltageDataCharacteristic;
+
+ public ObservableCollection DeviceList { get; set; }
+
+ IDevice deviceSelected;
+ public IDevice DeviceSelected
+ {
+ get => deviceSelected;
+ set { deviceSelected = value; OnPropertyChanged(nameof(DeviceSelected)); }
+ }
+
+ bool isScanning;
+ public bool IsScanning
+ {
+ get => isScanning;
+ set { isScanning = value; OnPropertyChanged(nameof(IsScanning)); }
+ }
+
+ bool isConnected;
+ public bool IsConnected
+ {
+ get => isConnected;
+ set { isConnected = value; OnPropertyChanged(nameof(IsConnected)); }
+ }
+
+ bool isDeviceListEmpty;
+ public bool IsDeviceListEmpty
+ {
+ get => isDeviceListEmpty;
+ set { isDeviceListEmpty = value; OnPropertyChanged(nameof(IsDeviceListEmpty)); }
+ }
+
+ public ICommand CmdToggleConnection { get; set; }
+
+ public ICommand CmdSearchForDevices { get; set; }
+
+ // Onboard RGB LED
+ string ledStatus;
+ public string LedStatus
+ {
+ get => ledStatus;
+ set { ledStatus = value; OnPropertyChanged(nameof(LedStatus)); }
+ }
+ public ICommand CmdSetOnboardLed { get; private set; }
+
+ // Environmental Sensor
+ public string Temperature
+ {
+ get => temperature;
+ set { temperature = value; OnPropertyChanged(nameof(Temperature)); }
+ }
+ string temperature = "0";
+
+ public string Humidity
+ {
+ get => humidity;
+ set { humidity = value; OnPropertyChanged(nameof(Humidity)); }
+ }
+ string humidity = "0";
+
+ public string Pressure
+ {
+ get => pressure;
+ set { pressure = value; OnPropertyChanged(nameof(Pressure)); }
+ }
+ string pressure = "0";
+
+ public string GasResistance
+ {
+ get => gasResistance;
+ set { gasResistance = value; OnPropertyChanged(nameof(GasResistance)); }
+ }
+ string gasResistance = "0";
+
+ public string Co2Concentration
+ {
+ get => cO2Concentration;
+ set { cO2Concentration = value; OnPropertyChanged(nameof(Co2Concentration)); }
+ }
+ string cO2Concentration = "0";
+
+ public ICommand CmdEnvironmentData { get; private set; }
+
+ // Motion Sensor
+ public string Acceleration3dX
+ {
+ get => acceleration3dX;
+ set { acceleration3dX = value; OnPropertyChanged(nameof(Acceleration3dX)); }
+ }
+ string acceleration3dX = "0";
+
+ public string Acceleration3dY
+ {
+ get => acceleration3dY;
+ set { acceleration3dY = value; OnPropertyChanged(nameof(Acceleration3dY)); }
+ }
+ string acceleration3dY = "0";
+
+ public string Acceleration3dZ
+ {
+ get => acceleration3dZ;
+ set { acceleration3dZ = value; OnPropertyChanged(nameof(Acceleration3dZ)); }
+ }
+ string acceleration3dZ = "0";
+
+ public string AngularVelocity3dX
+ {
+ get => angularVelocity3dX;
+ set { angularVelocity3dX = value; OnPropertyChanged(nameof(AngularVelocity3dX)); }
+ }
+ string angularVelocity3dX = "0";
+
+ public string AngularVelocity3dY
+ {
+ get => angularVelocity3dY;
+ set { angularVelocity3dY = value; OnPropertyChanged(nameof(AngularVelocity3dY)); }
+ }
+ string angularVelocity3dY = "0";
+
+ public string AngularVelocity3dZ
+ {
+ get => angularVelocity3dZ;
+ set { angularVelocity3dZ = value; OnPropertyChanged(nameof(AngularVelocity3dZ)); }
+ }
+ string angularVelocity3dZ = "0";
+
+ public ICommand CmdGetMotionData { get; private set; }
+
+ // Voltages
+ public string BatteryVoltage
+ {
+ get => batteryVoltage;
+ set { batteryVoltage = value; OnPropertyChanged(nameof(BatteryVoltage)); }
+ }
+ string batteryVoltage = "0";
+
+ public string SolarVoltage
+ {
+ get => solarVoltage;
+ set { solarVoltage = value; OnPropertyChanged(nameof(SolarVoltage)); }
+ }
+ string solarVoltage = "0";
+
+ public ICommand CmdGetVoltageData { get; private set; }
+
+ public BluetoothViewModel()
+ {
+ DeviceList = new ObservableCollection();
+
+ adapter = CrossBluetoothLE.Current.Adapter;
+ adapter.ScanTimeout = listenTimeout;
+ adapter.ScanMode = ScanMode.LowLatency;
+ adapter.DeviceConnected += AdapterDeviceConnected;
+ adapter.DeviceDiscovered += AdapterDeviceDiscovered;
+ adapter.DeviceDisconnected += AdapterDeviceDisconnected;
+
+ CmdToggleConnection = new Command(async () => await ToggleConnection());
+
+ CmdSearchForDevices = new Command(async () => await SearchForDevices());
+
+ CmdSetOnboardLed = new Command(async (obj) => await SetOnboardLed(obj as string));
+
+ CmdEnvironmentData = new Command(async () => await GetEnvironmentalData());
+
+ CmdGetMotionData = new Command(async () => await GetMotionData());
+
+ CmdGetVoltageData = new Command(async () => await GetVoltageData());
+ }
+
+ void AdapterDeviceDisconnected(object sender, DeviceEventArgs e)
+ {
+ IsConnected = false;
+ }
+
+ async void AdapterDeviceConnected(object sender, DeviceEventArgs e)
+ {
+ IsConnected = true;
+
+ IDevice device = e.Device;
+
+ var services = await device.GetServicesAsync();
+
+ foreach (var serviceItem in services)
+ {
+ if (UuidToUshort(serviceItem.Id.ToString()) == DEVICE_ID)
+ {
+ service = serviceItem;
+ }
+ }
+
+ ledPairingCharacteristic = await service.GetCharacteristicAsync(Guid.Parse(CharacteristicsConstants.LED_PAIRING));
+ ledToggleCharacteristic = await service.GetCharacteristicAsync(Guid.Parse(CharacteristicsConstants.LED_TOGGLE));
+ ledBlinkCharacteristic = await service.GetCharacteristicAsync(Guid.Parse(CharacteristicsConstants.LED_BLINK));
+ ledPulseCharacteristic = await service.GetCharacteristicAsync(Guid.Parse(CharacteristicsConstants.LED_PULSE));
+ atmosphericDataCharacteristic = await service.GetCharacteristicAsync(Guid.Parse(CharacteristicsConstants.ATMOSPHERIC_DATA));
+ motionDataCharacteristic = await service.GetCharacteristicAsync(Guid.Parse(CharacteristicsConstants.MOTION_DATA));
+ voltageDataCharacteristic = await service.GetCharacteristicAsync(Guid.Parse(CharacteristicsConstants.VOLTAGE_DATA));
+
+ await SetPairingStatus();
+ await GetEnvironmentalData();
+ await GetMotionData();
+ await GetVoltageData();
+ }
+
+ async void AdapterDeviceDiscovered(object sender, DeviceEventArgs e)
+ {
+ if (DeviceList.FirstOrDefault(x => x.Name == e.Device.Name) == null &&
+ !string.IsNullOrEmpty(e.Device.Name))
+ {
+ DeviceList.Add(e.Device);
+ }
+
+ if (e.Device.Name == "GnssTracker")
+ {
+ await adapter.StopScanningForDevicesAsync();
+ IsDeviceListEmpty = false;
+ DeviceSelected = e.Device;
+ }
+ }
+
+ async Task ScanTimeoutTask()
+ {
+ await Task.Delay(listenTimeout);
+ await adapter.StopScanningForDevicesAsync();
+ IsScanning = false;
+ }
+
+ async Task ToggleConnection()
+ {
+ try
+ {
+ if (IsConnected)
+ {
+ IsConnected = false;
+ await SetPairingStatus();
+ await adapter.DisconnectDeviceAsync(DeviceSelected);
+
+ }
+ else
+ {
+ await adapter.ConnectToDeviceAsync(DeviceSelected);
+ IsConnected = true;
+ }
+ }
+ catch (DeviceConnectionException ex)
+ {
+ Debug.WriteLine(ex.Message);
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(ex.Message);
+ }
+ }
+
+ async Task SearchForDevices()
+ {
+ try
+ {
+ IsScanning = true;
+
+ var tasks = new Task[]
+ {
+ ScanTimeoutTask(),
+ adapter.StartScanningForDevicesAsync()
+ };
+
+ await Task.WhenAny(tasks);
+ }
+ catch (DeviceConnectionException ex)
+ {
+ Debug.WriteLine(ex.Message);
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(ex.Message);
+ }
+ }
+
+ async Task SetOnboardLed(string command)
+ {
+ byte[] array = new byte[1];
+
+ switch (command)
+ {
+ case "toggle":
+ array[0] = 1;
+ await ledToggleCharacteristic.WriteAsync(array);
+ LedStatus = "Toggled";
+ break;
+
+ case "blink":
+ await ledBlinkCharacteristic.WriteAsync(array);
+ LedStatus = "Blinking";
+ break;
+
+ case "pulse":
+ await ledPulseCharacteristic.WriteAsync(array);
+ LedStatus = "Pulsing";
+ break;
+ }
+ }
+
+ async Task GetEnvironmentalData()
+ {
+ var eDC = await atmosphericDataCharacteristic.ReadAsync();
+ var value = Encoding.Default.GetString(eDC.data).Split(';');
+
+ Temperature = value[0];
+ Humidity = value[1];
+ Pressure = value[2];
+ GasResistance = value[3];
+ Co2Concentration = "0";
+ }
+
+ async Task GetMotionData()
+ {
+ var mADC = await motionDataCharacteristic.ReadAsync();
+ var motionValues = Encoding.Default.GetString(mADC.data).Split(';');
+ Acceleration3dX = motionValues[0];
+ Acceleration3dY = motionValues[1];
+ Acceleration3dZ = motionValues[2];
+ AngularVelocity3dX = motionValues[3];
+ AngularVelocity3dY = motionValues[4];
+ AngularVelocity3dZ = motionValues[5];
+ }
+
+ async Task GetVoltageData()
+ {
+ var vDC = await voltageDataCharacteristic.ReadAsync();
+ var values = Encoding.Default.GetString(vDC.data).Split(';');
+ BatteryVoltage = values[0];
+ SolarVoltage = values[1];
+ }
+
+ async Task SetPairingStatus()
+ {
+ byte[] array = new byte[1];
+ array[0] = IsConnected ? (byte)1 : (byte)0;
+
+ await ledPairingCharacteristic.WriteAsync(array);
+ }
+
+ protected int UuidToUshort(string uuid)
+ {
+ return int.Parse(uuid.Substring(4, 4), System.Globalization.NumberStyles.HexNumber); ;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/MapleViewModel.cs b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/MapleViewModel.cs
new file mode 100644
index 00000000..26ae6312
--- /dev/null
+++ b/Source/GnssTracker/Connectivity/MobileGnssTrackerConnectivity/ViewModel/MapleViewModel.cs
@@ -0,0 +1,360 @@
+using GnssTrackerConnectivity.Common.Models;
+using Meadow.Foundation.Web.Maple;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.Text.Json;
+using System.Windows.Input;
+
+namespace MobileGnssTrackerConnectivity.ViewModel
+{
+ public class MapleViewModel : BaseViewModel
+ {
+ public MapleClient client { get; private set; }
+
+ int _serverPort;
+ public int ServerPort
+ {
+ get => _serverPort;
+ set { _serverPort = value; OnPropertyChanged(nameof(ServerPort)); }
+ }
+
+ bool _isScanning;
+ public bool IsScanning
+ {
+ get => _isScanning;
+ set { _isScanning = value; OnPropertyChanged(nameof(IsScanning)); }
+ }
+
+ bool _isServerListEmpty;
+ public bool IsServerListEmpty
+ {
+ get => _isServerListEmpty;
+ set { _isServerListEmpty = value; OnPropertyChanged(nameof(IsServerListEmpty)); }
+ }
+
+ string ipAddress;
+ public string IpAddress
+ {
+ get => ipAddress;
+ set { ipAddress = value; OnPropertyChanged(nameof(IpAddress)); }
+ }
+
+ ServerModel _selectedServer;
+ public ServerModel SelectedServer
+ {
+ get => _selectedServer;
+ set
+ {
+ if (value == null) return;
+ _selectedServer = value;
+ IpAddress = _selectedServer.IpAddress;
+ OnPropertyChanged(nameof(SelectedServer));
+ }
+ }
+
+ public ObservableCollection HostList { get; set; }
+
+ public ICommand CmdSearchServers { get; private set; }
+
+ // Onboard RGB LED
+ string ledStatus;
+ public string LedStatus
+ {
+ get => ledStatus;
+ set { ledStatus = value; OnPropertyChanged(nameof(LedStatus)); }
+ }
+ public ICommand CmdSetOnboardLed { get; private set; }
+
+ // Environmental Sensor
+ public string Temperature
+ {
+ get => temperature;
+ set { temperature = value; OnPropertyChanged(nameof(Temperature)); }
+ }
+ string temperature = "0";
+
+ public string Humidity
+ {
+ get => humidity;
+ set { humidity = value; OnPropertyChanged(nameof(Humidity)); }
+ }
+ string humidity = "0";
+
+ public string Pressure
+ {
+ get => pressure;
+ set { pressure = value; OnPropertyChanged(nameof(Pressure)); }
+ }
+ string pressure = "0";
+
+ public string GasResistance
+ {
+ get => gasResistance;
+ set { gasResistance = value; OnPropertyChanged(nameof(GasResistance)); }
+ }
+ string gasResistance = "0";
+
+ public string Co2Concentration
+ {
+ get => cO2Concentration;
+ set { cO2Concentration = value; OnPropertyChanged(nameof(Co2Concentration)); }
+ }
+ string cO2Concentration = "0";
+
+ public ICommand CmdEnvironmentData { get; private set; }
+
+ // Motion Sensor
+ public string Acceleration3dX
+ {
+ get => acceleration3dX;
+ set { acceleration3dX = value; OnPropertyChanged(nameof(Acceleration3dX)); }
+ }
+ string acceleration3dX = "0";
+
+ public string Acceleration3dY
+ {
+ get => acceleration3dY;
+ set { acceleration3dY = value; OnPropertyChanged(nameof(Acceleration3dY)); }
+ }
+ string acceleration3dY = "0";
+
+ public string Acceleration3dZ
+ {
+ get => acceleration3dZ;
+ set { acceleration3dZ = value; OnPropertyChanged(nameof(Acceleration3dZ)); }
+ }
+ string acceleration3dZ = "0";
+
+ public string AngularVelocity3dX
+ {
+ get => angularVelocity3dX;
+ set { angularVelocity3dX = value; OnPropertyChanged(nameof(AngularVelocity3dX)); }
+ }
+ string angularVelocity3dX = "0";
+
+ public string AngularVelocity3dY
+ {
+ get => angularVelocity3dY;
+ set { angularVelocity3dY = value; OnPropertyChanged(nameof(AngularVelocity3dY)); }
+ }
+ string angularVelocity3dY = "0";
+
+ public string AngularVelocity3dZ
+ {
+ get => angularVelocity3dZ;
+ set { angularVelocity3dZ = value; OnPropertyChanged(nameof(AngularVelocity3dZ)); }
+ }
+ string angularVelocity3dZ = "0";
+
+ public string MotionTemperature
+ {
+ get => motionTemperature;
+ set { motionTemperature = value; OnPropertyChanged(nameof(MotionTemperature)); }
+ }
+ string motionTemperature = "0";
+
+ public ICommand CmdGetMotionData { get; private set; }
+
+ // Voltages
+ public string BatteryVoltage
+ {
+ get => batteryVoltage;
+ set { batteryVoltage = value; OnPropertyChanged(nameof(BatteryVoltage)); }
+ }
+ string batteryVoltage = "0";
+
+ public string SolarVoltage
+ {
+ get => solarVoltage;
+ set { solarVoltage = value; OnPropertyChanged(nameof(SolarVoltage)); }
+ }
+ string solarVoltage = "0";
+
+ public ICommand CmdGetVoltageData { get; private set; }
+
+ public MapleViewModel()
+ {
+ HostList = new ObservableCollection();
+
+ ServerPort = 5417;
+
+ client = new MapleClient();
+ client.Servers.CollectionChanged += ServersCollectionChanged;
+
+ CmdSearchServers = new Command(async () => await GetServers());
+
+ CmdSetOnboardLed = new Command(async (obj) => await SetOnboardLed(obj as string));
+
+ CmdEnvironmentData = new Command(async () => await GetEnvironmentalData());
+
+ CmdGetMotionData = new Command(async () => await GetMotionData());
+
+ CmdGetVoltageData = new Command(async () => await GetVoltageData());
+ }
+
+ void ServersCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+ {
+ switch (e.Action)
+ {
+ case NotifyCollectionChangedAction.Add:
+ foreach (ServerModel server in e.NewItems)
+ {
+ HostList.Add(new ServerModel() { Name = $"{server.Name} ({server.IpAddress})", IpAddress = server.IpAddress });
+ Console.WriteLine($"'{server.Name}' @ ip:[{server.IpAddress}]");
+ }
+ break;
+ }
+ }
+
+ async Task GetServers()
+ {
+ if (IsScanning)
+ return;
+ IsScanning = true;
+
+ try
+ {
+ IsServerListEmpty = false;
+
+ await client.StartScanningForAdvertisingServers();
+
+ //HostList.Add(new ServerModel() { Name = "Meadow (192.168.1.81)", IpAddress = "192.168.1.81" });
+
+ if (HostList.Count == 0)
+ {
+ IsServerListEmpty = true;
+ }
+ else
+ {
+ IsServerListEmpty = false;
+ SelectedServer = HostList[0];
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ finally
+ {
+ IsScanning = false;
+ }
+ }
+
+ async Task SetOnboardLed(string command)
+ {
+ if (SelectedServer == null && string.IsNullOrEmpty(IpAddress))
+ return;
+
+ try
+ {
+ bool response = await client.PostAsync(SelectedServer != null ? SelectedServer.IpAddress : IpAddress, ServerPort, command, string.Empty);
+
+ if (response)
+ {
+ switch (command)
+ {
+ case "toggle": LedStatus = "Toggled"; break;
+ case "blink": LedStatus = "Blinking"; break;
+ case "pulse": LedStatus = "Pulsing"; break;
+ }
+ }
+ else
+ {
+ Console.WriteLine("Request failed.");
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ }
+
+ async Task GetEnvironmentalData()
+ {
+ if (SelectedServer == null && string.IsNullOrEmpty(IpAddress))
+ {
+ return;
+ }
+
+ try
+ {
+ var response = await client.GetAsync(SelectedServer != null ? SelectedServer.IpAddress : IpAddress, ServerPort, "getEnvironmentalData");
+
+ if (response == null)
+ {
+ return;
+ }
+
+ var value = JsonSerializer.Deserialize(response);
+
+ Temperature = value.Temperature;
+ Humidity = value.Humidity;
+ Pressure = value.Pressure;
+ GasResistance = value.GasResistance;
+ Co2Concentration = value.Co2Concentration;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ }
+
+ async Task GetMotionData()
+ {
+ if (SelectedServer == null && string.IsNullOrEmpty(IpAddress))
+ {
+ return;
+ }
+
+ try
+ {
+ var response = await client.GetAsync(SelectedServer != null ? SelectedServer.IpAddress : IpAddress, ServerPort, "getMotionData");
+
+ if (response == null)
+ {
+ return;
+ }
+
+ var value = JsonSerializer.Deserialize(response);
+
+ Acceleration3dX = value.Acceleration3dX;
+ Acceleration3dY = value.Acceleration3dY;
+ Acceleration3dZ = value.Acceleration3dZ;
+ AngularVelocity3dX = value.AngularVelocity3dX;
+ AngularVelocity3dY = value.AngularVelocity3dY;
+ AngularVelocity3dZ = value.AngularVelocity3dZ;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ }
+
+ async Task GetVoltageData()
+ {
+ if (SelectedServer == null && string.IsNullOrEmpty(IpAddress))
+ {
+ return;
+ }
+
+ try
+ {
+ var response = await client.GetAsync(SelectedServer != null ? SelectedServer.IpAddress : IpAddress, ServerPort, "getVoltageData");
+
+ if (response == null)
+ {
+ return;
+ }
+
+ var value = JsonSerializer.Deserialize(response);
+
+ BatteryVoltage = value.BatteryVoltage;
+ SolarVoltage = value.SolarVoltage;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Connectivity/BluetoothServer.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Connectivity/BluetoothServer.cs
index 95b62e78..fb129b0e 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Connectivity/BluetoothServer.cs
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Connectivity/BluetoothServer.cs
@@ -12,7 +12,7 @@ public class BluetoothServer
readonly string BLINKING = "3a6cc4f2a6ab4709a9bfc9611c6bf892";
readonly string RUNNING_COLORS = "30df1258f42b4788af2ea8ed9d0b932f";
- private CommandController commandController;
+ private LedController ledController;
ICharacteristic LedOn;
ICharacteristic LedOff;
@@ -22,32 +22,32 @@ public class BluetoothServer
public BluetoothServer()
{
- commandController = Resolver.Services.Get();
+ ledController = Resolver.Services.Get();
}
private void LedOnCharacteristicValueSet(ICharacteristic c, object data)
{
- commandController.FireLedOn();
+ ledController.TurnOn();
}
private void LedOffCharacteristicValueSet(ICharacteristic c, object data)
{
- commandController.FireLedOff();
+ ledController.TurnOff();
}
private void LedBlinkCharacteristicValueSet(ICharacteristic c, object data)
{
- commandController.FireLedBlink();
+ ledController.StartBlink();
}
private void LedPulseCharacteristicValueSet(ICharacteristic c, object data)
{
- commandController.FireLedPulse();
+ ledController.StartPulse();
}
private void LedRunColorsCharacteristicValueSet(ICharacteristic c, object data)
{
- commandController.FireLedRunColors();
+ ledController.StartRunningColors();
}
public Definition GetDefinition()
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/CommandController.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/CommandController.cs
deleted file mode 100644
index e3cf3e33..00000000
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/CommandController.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using Meadow;
-using System;
-
-namespace MeadowBleLed.Controllers;
-
-public class CommandController
-{
- public event EventHandler LedOnValueSet = default!;
- public event EventHandler LedOffValueSet = default!;
- public event EventHandler LedBlinkValueSet = default!;
- public event EventHandler LedPulseValueSet = default!;
- public event EventHandler LedRunColorsValueSet = default!;
-
- public CommandController()
- {
- Resolver.Services.Add(this);
- }
-
- public void FireLedOn()
- {
- LedOnValueSet?.Invoke(this, true);
- }
-
- public void FireLedOff()
- {
- LedOffValueSet?.Invoke(this, true);
- }
-
- public void FireLedBlink()
- {
- LedBlinkValueSet?.Invoke(this, true);
- }
-
- public void FireLedPulse()
- {
- LedPulseValueSet?.Invoke(this, true);
- }
-
- public void FireLedRunColors()
- {
- LedRunColorsValueSet?.Invoke(this, true);
- }
-}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/LedController.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/LedController.cs
index ffdb77c2..d5b37d42 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/LedController.cs
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/LedController.cs
@@ -1,6 +1,5 @@
using Meadow;
using Meadow.Foundation.Leds;
-using Meadow.Hardware;
using Meadow.Peripherals.Leds;
using System;
using System.Threading;
@@ -10,28 +9,27 @@ namespace MeadowBleLed.Controllers;
public class LedController
{
- IRgbPwmLed rgbPwmLed;
+ private IRgbPwmLed rgbPwmLed;
- Task animationTask = null;
- CancellationTokenSource cancellationTokenSource = null;
+ private Task animationTask = null;
+ private CancellationTokenSource cancellationTokenSource = null;
- public LedController(IPin redPwmPin, IPin greenPwmPin, IPin bluePwmPin)
+ public LedController()
{
- rgbPwmLed = new RgbPwmLed(redPwmPin, greenPwmPin, bluePwmPin);
+ Resolver.Services.Add(this);
+
+ rgbPwmLed = new RgbPwmLed(
+ redPwmPin: MeadowApp.Device.Pins.D12,
+ greenPwmPin: MeadowApp.Device.Pins.D11,
+ bluePwmPin: MeadowApp.Device.Pins.D10);
}
- void Stop()
+ private void Stop()
{
rgbPwmLed.StopAnimation();
cancellationTokenSource?.Cancel();
}
- public void SetColor(Color color)
- {
- Stop();
- rgbPwmLed.SetColor(color);
- }
-
public void TurnOn()
{
Stop();
@@ -45,13 +43,21 @@ public void TurnOff()
rgbPwmLed.IsOn = false;
}
+ public void SetColor(Color color)
+ {
+ Stop();
+ rgbPwmLed.SetColor(color);
+ }
+
public void StartBlink()
{
+ Stop();
rgbPwmLed.StartBlink(GetRandomColor());
}
public void StartPulse()
{
+ Stop();
rgbPwmLed.StartPulse(GetRandomColor());
}
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/MainController.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/MainController.cs
deleted file mode 100644
index 63b2fc58..00000000
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/Controllers/MainController.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using Meadow;
-using Meadow.Devices;
-using Meadow.Gateways;
-using MeadowBleLed.Connectivity;
-
-namespace MeadowBleLed.Controllers;
-
-public class MainController
-{
- private IBluetoothAdapter bluetooth;
-
- private LedController ledController;
- private BluetoothServer bluetoothServer;
- private CommandController commandController;
-
- public MainController(F7FeatherV2 hardware, IBluetoothAdapter bluetooth)
- {
- this.bluetooth = bluetooth;
-
- commandController = new CommandController();
-
- ledController = new LedController(hardware.Pins.OnboardLedRed, hardware.Pins.OnboardLedGreen, hardware.Pins.OnboardLedBlue);
- //ledController = new LedController(hardware.Pins.D12, hardware.Pins.D11, hardware.Pins.D12);
-
- StartBluetoothServer();
- }
-
- private void StartBluetoothServer()
- {
- bluetoothServer = new BluetoothServer();
-
- var definition = bluetoothServer.GetDefinition();
- bluetooth.StartBluetoothServer(definition);
-
- commandController.LedOnValueSet += (s, e) =>
- {
- Resolver.Log.Info("LedOnValueSet");
- ledController.TurnOn();
- };
- commandController.LedOffValueSet += (s, e) =>
- {
- Resolver.Log.Info("LedOffValueSet");
- ledController.TurnOff();
- };
- commandController.LedBlinkValueSet += (s, e) =>
- {
- Resolver.Log.Info("LedBlinkValueSet");
- ledController.StartBlink();
- };
- commandController.LedPulseValueSet += (s, e) =>
- {
- Resolver.Log.Info("LedPulseValueSet");
- ledController.StartPulse();
- };
- commandController.LedRunColorsValueSet += (s, e) =>
- {
- Resolver.Log.Info("LedRunColorsValueSet");
- ledController.StartRunningColors();
- };
- }
-}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/MeadowApp.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/MeadowApp.cs
index 54dd5ab8..b49372df 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/MeadowApp.cs
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleLed/MeadowApp.cs
@@ -1,5 +1,7 @@
using Meadow;
using Meadow.Devices;
+using Meadow.Gateways;
+using MeadowBleLed.Connectivity;
using MeadowBleLed.Controllers;
using System.Threading.Tasks;
@@ -8,13 +10,20 @@ namespace MeadowBleLed;
// public class MeadowApp : App <- If you have a Meadow F7v1.*
public class MeadowApp : App
{
+ private IBluetoothAdapter ble;
+
+ private LedController ledController;
+
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
- var ble = Device.BluetoothAdapter;
+ ledController = new LedController();
+ ledController.SetColor(Color.Red);
- var mainController = new MainController(Device, ble);
+ var bluetoothServer = new BluetoothServer();
+ ble = Device.BluetoothAdapter;
+ ble.StartBluetoothServer(bluetoothServer.GetDefinition());
return base.Initialize();
}
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/Connectivity/BluetoothServer.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/Connectivity/BluetoothServer.cs
new file mode 100644
index 00000000..c4c9b03d
--- /dev/null
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/Connectivity/BluetoothServer.cs
@@ -0,0 +1,74 @@
+using Meadow;
+using Meadow.Gateways.Bluetooth;
+using Meadow.Units;
+using MeadowBleServo.Controllers;
+
+namespace MeadowBleServo.Connectivity;
+
+public class BluetoothServer
+{
+ readonly string IS_SWEEPING = "24517ccc888e4ffc9da521884353b08d";
+ readonly string ANGLE = "5a0bb01669ab4a49a2f2de5b292458f3";
+
+ private ServoController servoController;
+
+ ICharacteristic isSweepingCharacteristic;
+ ICharacteristic angleCharacteristic;
+
+ public BluetoothServer()
+ {
+ servoController = Resolver.Services.Get();
+ }
+
+ void IsSweepingCharacteristicValueSet(ICharacteristic c, object data)
+ {
+ if ((bool)data)
+ {
+ servoController.StopSweep();
+ isSweepingCharacteristic.SetValue(false);
+ }
+ else
+ {
+ servoController.StartSweep();
+ isSweepingCharacteristic.SetValue(true);
+ }
+ }
+
+ void AngleCharacteristicValueSet(ICharacteristic c, object data)
+ {
+ int angle = (int)data;
+
+ servoController.RotateTo(new Angle(angle));
+ }
+
+ public Definition GetDefinition()
+ {
+ isSweepingCharacteristic = new CharacteristicBool(
+ name: "IsSweeping",
+ uuid: IS_SWEEPING,
+ permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
+ properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
+ isSweepingCharacteristic.ValueSet += IsSweepingCharacteristicValueSet;
+
+ angleCharacteristic = new CharacteristicInt32(
+ name: "Angle",
+ uuid: ANGLE,
+ permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
+ properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
+ angleCharacteristic.ValueSet += AngleCharacteristicValueSet;
+
+ ICharacteristic[] characteristics =
+ {
+ isSweepingCharacteristic,
+ angleCharacteristic
+ };
+
+ var service = new Service(
+ name: "Service",
+ uuid: 253,
+ characteristics
+ );
+
+ return new Definition("MeadowServo", service);
+ }
+}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/Controllers/ServoController.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/Controllers/ServoController.cs
index 0aea22dd..9f808552 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/Controllers/ServoController.cs
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/Controllers/ServoController.cs
@@ -1,6 +1,6 @@
-using Meadow.Foundation.Servos;
+using Meadow;
+using Meadow.Foundation.Servos;
using Meadow.Units;
-using System;
using System.Threading;
using System.Threading.Tasks;
@@ -8,31 +8,25 @@ namespace MeadowBleServo.Controllers;
public class ServoController
{
- private static readonly Lazy instance =
- new Lazy(() => new ServoController());
- public static ServoController Instance => instance.Value;
+ private Servo servo;
- Servo servo;
-
- Task animationTask = null;
- CancellationTokenSource cancellationTokenSource = null;
+ private Task animationTask = null;
+ private CancellationTokenSource cancellationTokenSource = null;
protected int _rotationAngle;
- private ServoController()
+ public ServoController()
{
- Initialize();
- }
+ Resolver.Services.Add(this);
- public void Initialize()
- {
- servo = new Servo(pwmPin: MeadowApp.Device.Pins.D10,
+ servo = new Servo(
+ pwmPin: MeadowApp.Device.Pins.D10,
config: NamedServoConfigs.SG90);
}
public void RotateTo(Angle angle)
{
- servo.RotateTo(new Angle(angle));
+ _ = servo.RotateTo(angle);
}
public void StopSweep()
@@ -60,7 +54,7 @@ protected async Task StartSweep(CancellationToken cancellationToken)
if (cancellationToken.IsCancellationRequested) { break; }
_rotationAngle++;
- servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
+ _ = servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
await Task.Delay(50);
}
@@ -69,7 +63,7 @@ protected async Task StartSweep(CancellationToken cancellationToken)
if (cancellationToken.IsCancellationRequested) { break; }
_rotationAngle--;
- servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
+ _ = servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
await Task.Delay(50);
}
}
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/MeadowApp.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/MeadowApp.cs
index 4da3ff19..f7a6af63 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/MeadowApp.cs
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleServo/MeadowApp.cs
@@ -1,8 +1,8 @@
using Meadow;
using Meadow.Devices;
-using Meadow.Foundation.Leds;
-using Meadow.Gateways.Bluetooth;
+using Meadow.Gateways;
using Meadow.Units;
+using MeadowBleServo.Connectivity;
using MeadowBleServo.Controllers;
using System.Threading.Tasks;
@@ -11,77 +11,21 @@ namespace MeadowBleServo;
// public class MeadowApp : App <- If you have a Meadow F7v1.*
public class MeadowApp : App
{
- readonly string IS_SWEEPING = "24517ccc888e4ffc9da521884353b08d";
- readonly string ANGLE = "5a0bb01669ab4a49a2f2de5b292458f3";
+ private IBluetoothAdapter ble;
- IDefinition bleTreeDefinition;
-
- ICharacteristic isSweepingCharacteristic;
- ICharacteristic angleCharacteristic;
+ private ServoController servoController;
public override Task Initialize()
{
- var onboardLed = new RgbPwmLed(
- redPwmPin: Device.Pins.OnboardLedRed,
- greenPwmPin: Device.Pins.OnboardLedGreen,
- bluePwmPin: Device.Pins.OnboardLedBlue);
- onboardLed.SetColor(Color.Red);
-
- ServoController.Instance.Initialize();
+ Resolver.Log.Info("Initialize...");
- bleTreeDefinition = GetDefinition();
- Device.BluetoothAdapter.StartBluetoothServer(bleTreeDefinition);
+ servoController = new ServoController();
+ servoController.RotateTo(new Angle(0));
- isSweepingCharacteristic.ValueSet += IsSweepingCharacteristicValueSet;
- angleCharacteristic.ValueSet += AngleCharacteristicValueSet;
-
- onboardLed.SetColor(Color.Green);
+ var bluetoothServer = new BluetoothServer();
+ ble = Device.BluetoothAdapter;
+ ble.StartBluetoothServer(bluetoothServer.GetDefinition());
return base.Initialize();
}
-
- void IsSweepingCharacteristicValueSet(ICharacteristic c, object data)
- {
- if ((bool)data)
- {
- ServoController.Instance.StopSweep();
- isSweepingCharacteristic.SetValue(false);
- }
- else
- {
- ServoController.Instance.StartSweep();
- isSweepingCharacteristic.SetValue(true);
- }
- }
-
- void AngleCharacteristicValueSet(ICharacteristic c, object data)
- {
- int angle = (int)data;
-
- ServoController.Instance.RotateTo(new Angle(angle));
- }
-
- Definition GetDefinition()
- {
- isSweepingCharacteristic = new CharacteristicBool(
- name: "IsSweeping",
- uuid: IS_SWEEPING,
- permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
- properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
-
- angleCharacteristic = new CharacteristicInt32(
- name: "Angle",
- uuid: ANGLE,
- permissions: CharacteristicPermission.Read | CharacteristicPermission.Write,
- properties: CharacteristicProperty.Read | CharacteristicProperty.Write);
-
- var service = new Service(
- name: "ServiceA",
- uuid: 253,
- isSweepingCharacteristic,
- angleCharacteristic
- );
-
- return new Definition("MeadowServo", service);
- }
}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/Connectivity/BluetoothServer.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/Connectivity/BluetoothServer.cs
new file mode 100644
index 00000000..dadbfd3c
--- /dev/null
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/Connectivity/BluetoothServer.cs
@@ -0,0 +1,40 @@
+using Meadow;
+using Meadow.Gateways.Bluetooth;
+using Meadow.Units;
+
+namespace MeadowBleTemperature.Connectivity;
+
+public class BluetoothServer
+{
+ readonly string TEMPERATURE = "e78f7b5e-842b-4b99-94e3-7401bf72b870";
+
+ ICharacteristic temperatureCharacteristic;
+
+ public BluetoothServer()
+ {
+ Resolver.Services.Add(this);
+ }
+
+ public void UpdateTemperatureCharacteristic(Temperature e)
+ {
+ temperatureCharacteristic.SetValue($"{e.Celsius:N2}°C;");
+ }
+
+ public Definition GetDefinition()
+ {
+ temperatureCharacteristic = new CharacteristicString(
+ name: "Temperature",
+ uuid: TEMPERATURE,
+ maxLength: 20,
+ permissions: CharacteristicPermission.Read,
+ properties: CharacteristicProperty.Read);
+
+ var service = new Service(
+ name: "Service",
+ uuid: 253,
+ temperatureCharacteristic
+ );
+
+ return new Definition("MeadowTemperature", service);
+ }
+}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/Controllers/TemperatureController.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/Controllers/TemperatureController.cs
index c8d34a49..9bb6dba7 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/Controllers/TemperatureController.cs
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/Controllers/TemperatureController.cs
@@ -1,34 +1,26 @@
-using Meadow.Foundation.Sensors.Temperature;
+using Meadow;
+using Meadow.Foundation.Sensors.Temperature;
using Meadow.Units;
+using MeadowBleTemperature.Connectivity;
using System;
namespace MeadowBleTemperature.Controllers;
public class TemperatureController
{
- private static readonly Lazy instance =
- new Lazy(() => new TemperatureController());
- public static TemperatureController Instance => instance.Value;
+ private AnalogTemperature analogTemperature;
- public event EventHandler TemperatureUpdated = delegate { };
-
- AnalogTemperature analogTemperature;
-
- private TemperatureController()
- {
- Initialize();
- }
-
- private void Initialize()
+ public TemperatureController()
{
- analogTemperature = new AnalogTemperature(MeadowApp.Device.Pins.A01,
+ analogTemperature = new AnalogTemperature(
+ MeadowApp.Device.Pins.A01,
AnalogTemperature.KnownSensorType.LM35);
analogTemperature.Updated += AnalogTemperatureUpdated;
}
- void AnalogTemperatureUpdated(object sender, Meadow.IChangeResult e)
+ private void AnalogTemperatureUpdated(object sender, IChangeResult e)
{
- TemperatureUpdated.Invoke(this, e.New);
+ Resolver.Services.Get().UpdateTemperatureCharacteristic(e.New);
}
public void StartUpdating(TimeSpan timeSpan)
diff --git a/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/MeadowApp.cs b/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/MeadowApp.cs
index 5eab04d5..09eb1ccf 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/MeadowApp.cs
+++ b/Source/Meadow F7 Feather/Bluetooth/MeadowBleTemperature/MeadowApp.cs
@@ -1,7 +1,7 @@
using Meadow;
using Meadow.Devices;
-using Meadow.Foundation.Leds;
-using Meadow.Gateways.Bluetooth;
+using Meadow.Gateways;
+using MeadowBleTemperature.Connectivity;
using MeadowBleTemperature.Controllers;
using System;
using System.Threading.Tasks;
@@ -11,51 +11,21 @@ namespace MeadowBleTemperature;
// public class MeadowApp : App <- If you have a Meadow F7v1.*
public class MeadowApp : App
{
- readonly string TEMPERATURE = "e78f7b5e-842b-4b99-94e3-7401bf72b870";
+ private IBluetoothAdapter ble;
- IDefinition bleTreeDefinition;
-
- ICharacteristic temperatureCharacteristic;
+ TemperatureController temperatureController;
public override Task Initialize()
{
- var onboardLed = new RgbPwmLed(
- redPwmPin: Device.Pins.OnboardLedRed,
- greenPwmPin: Device.Pins.OnboardLedGreen,
- bluePwmPin: Device.Pins.OnboardLedBlue);
- onboardLed.SetColor(Color.Red);
-
- TemperatureController.Instance.StartUpdating(TimeSpan.FromSeconds(5));
+ Resolver.Log.Info("Initialize...");
- bleTreeDefinition = GetDefinition();
- TemperatureController.Instance.TemperatureUpdated += TemperatureUpdated;
- Device.BluetoothAdapter.StartBluetoothServer(bleTreeDefinition);
+ temperatureController = new TemperatureController();
+ temperatureController.StartUpdating(TimeSpan.FromSeconds(5));
- onboardLed.SetColor(Color.Green);
+ var bluetoothServer = new BluetoothServer();
+ ble = Device.BluetoothAdapter;
+ ble.StartBluetoothServer(bluetoothServer.GetDefinition());
return base.Initialize();
}
-
- private void TemperatureUpdated(object sender, Meadow.Units.Temperature e)
- {
- temperatureCharacteristic.SetValue($"{e.Celsius:N2}°C;");
- }
-
- Definition GetDefinition()
- {
- temperatureCharacteristic = new CharacteristicString(
- name: "Temperature",
- uuid: TEMPERATURE,
- maxLength: 20,
- permissions: CharacteristicPermission.Read,
- properties: CharacteristicProperty.Read);
-
- var service = new Service(
- name: "ServiceA",
- uuid: 253,
- temperatureCharacteristic
- );
-
- return new Definition("MeadowTemperature", service);
- }
}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Bluetooth/MobileBle/MobileBle.csproj b/Source/Meadow F7 Feather/Bluetooth/MobileBle/MobileBle.csproj
index c4cb867f..748e35e6 100644
--- a/Source/Meadow F7 Feather/Bluetooth/MobileBle/MobileBle.csproj
+++ b/Source/Meadow F7 Feather/Bluetooth/MobileBle/MobileBle.csproj
@@ -47,6 +47,6 @@
-
+
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleLed/Controllers/LedController.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleLed/Controllers/LedController.cs
index 044d05f2..679c5303 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleLed/Controllers/LedController.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleLed/Controllers/LedController.cs
@@ -1,47 +1,35 @@
using Meadow;
using Meadow.Foundation.Leds;
+using Meadow.Peripherals.Leds;
using System;
using System.Threading;
using System.Threading.Tasks;
-namespace MeadowMapleLed.Controller;
+namespace MeadowMapleLed.Controllers;
public class LedController
{
- private static readonly Lazy instance =
- new Lazy(() => new LedController());
- public static LedController Instance => instance.Value;
+ private IRgbPwmLed rgbPwmLed;
- RgbPwmLed rgbPwmLed;
+ private Task animationTask = null;
+ private CancellationTokenSource cancellationTokenSource = null;
- Task animationTask = null;
- CancellationTokenSource cancellationTokenSource = null;
-
- private LedController()
+ public LedController()
{
- Initialize();
- }
+ Resolver.Services.Add(this);
- private void Initialize()
- {
rgbPwmLed = new RgbPwmLed(
redPwmPin: MeadowApp.Device.Pins.D12,
greenPwmPin: MeadowApp.Device.Pins.D11,
bluePwmPin: MeadowApp.Device.Pins.D10);
}
- void Stop()
+ private void Stop()
{
rgbPwmLed.StopAnimation();
cancellationTokenSource?.Cancel();
}
- public void SetColor(Color color)
- {
- Stop();
- rgbPwmLed.SetColor(color);
- }
-
public void TurnOn()
{
Stop();
@@ -55,6 +43,12 @@ public void TurnOff()
rgbPwmLed.IsOn = false;
}
+ public void SetColor(Color color)
+ {
+ Stop();
+ rgbPwmLed.SetColor(color);
+ }
+
public void StartBlink()
{
Stop();
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MapleRequestHandlers/LedControllerRequestHandler.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MapleRequestHandlers/LedControllerRequestHandler.cs
index ffe36755..8be87824 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MapleRequestHandlers/LedControllerRequestHandler.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MapleRequestHandlers/LedControllerRequestHandler.cs
@@ -1,6 +1,7 @@
-using Meadow.Foundation.Web.Maple;
+using Meadow;
+using Meadow.Foundation.Web.Maple;
using Meadow.Foundation.Web.Maple.Routing;
-using MeadowMapleLed.Controller;
+using MeadowMapleLed.Controllers;
namespace MeadowMapleLed.MapleRequestHandlers;
@@ -11,35 +12,35 @@ public LedControllerRequestHandler() { }
[HttpPost("/turnon")]
public IActionResult TurnOn()
{
- LedController.Instance.TurnOn();
+ Resolver.Services.Get().TurnOn();
return new OkResult();
}
[HttpPost("/turnoff")]
public IActionResult TurnOff()
{
- LedController.Instance.TurnOff();
+ Resolver.Services.Get().TurnOff();
return new OkResult();
}
[HttpPost("/startblink")]
public IActionResult StartBlink()
{
- LedController.Instance.StartBlink();
+ Resolver.Services.Get().StartBlink();
return new OkResult();
}
[HttpPost("/startpulse")]
public IActionResult StartPulse()
{
- LedController.Instance.StartPulse();
+ Resolver.Services.Get().StartPulse();
return new OkResult();
}
[HttpPost("/startrunningcolors")]
public IActionResult StartRunningColors()
{
- LedController.Instance.StartRunningColors();
+ Resolver.Services.Get().StartRunningColors();
return new OkResult();
}
}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MeadowApp.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MeadowApp.cs
index bbe94fd8..43b98feb 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MeadowApp.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleLed/MeadowApp.cs
@@ -2,7 +2,7 @@
using Meadow.Devices;
using Meadow.Foundation.Web.Maple;
using Meadow.Hardware;
-using MeadowMapleLed.Controller;
+using MeadowMapleLed.Controllers;
using System;
using System.Threading.Tasks;
@@ -11,13 +11,16 @@ namespace MeadowMapleLed;
// public class MeadowApp : App <- If you have a Meadow F7v1.*
public class MeadowApp : App
{
- MapleServer mapleServer;
+ private IWiFiNetworkAdapter wifi;
+
+ private LedController ledController;
public override async Task Initialize()
{
- LedController.Instance.SetColor(Color.Red);
+ ledController = new LedController();
+ ledController.SetColor(Color.Red);
- var wifi = Device.NetworkAdapters.Primary();
+ wifi = Device.NetworkAdapters.Primary();
wifi.NetworkConnected += NetworkConnected;
await wifi.Connect(Secrets.WIFI_NAME, Secrets.WIFI_PASSWORD, TimeSpan.FromSeconds(45));
@@ -25,9 +28,9 @@ public override async Task Initialize()
private void NetworkConnected(INetworkAdapter sender, NetworkConnectionEventArgs args)
{
- mapleServer = new MapleServer(sender.IpAddress, 5417, true, logger: Resolver.Log);
+ var mapleServer = new MapleServer(sender.IpAddress, 5417, true, logger: Resolver.Log);
mapleServer.Start();
- LedController.Instance.SetColor(Color.Green);
+ ledController.SetColor(Color.Green);
}
}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleServo/Controllers/ServoController.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleServo/Controllers/ServoController.cs
index 7f343b2b..72edb625 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleServo/Controllers/ServoController.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleServo/Controllers/ServoController.cs
@@ -1,6 +1,6 @@
-using Meadow.Foundation.Servos;
+using Meadow;
+using Meadow.Foundation.Servos;
using Meadow.Units;
-using System;
using System.Threading;
using System.Threading.Tasks;
@@ -8,24 +8,17 @@ namespace MeadowMapleServo.Controllers;
public class ServoController
{
- private static readonly Lazy instance =
- new Lazy(() => new ServoController());
- public static ServoController Instance => instance.Value;
+ private Servo servo;
- Servo servo;
-
- Task animationTask = null;
- CancellationTokenSource cancellationTokenSource = null;
+ private Task animationTask = null;
+ private CancellationTokenSource cancellationTokenSource = null;
protected int _rotationAngle;
- private ServoController()
+ public ServoController()
{
- Initialize();
- }
+ Resolver.Services.Add(this);
- private void Initialize()
- {
servo = new Servo(
pwmPin: MeadowApp.Device.Pins.D10,
config: NamedServoConfigs.SG90);
@@ -33,7 +26,7 @@ private void Initialize()
public void RotateTo(Angle angle)
{
- servo.RotateTo(angle);
+ _ = servo.RotateTo(angle);
}
public void StopSweep()
@@ -61,7 +54,7 @@ protected async Task StartSweep(CancellationToken cancellationToken)
if (cancellationToken.IsCancellationRequested) { break; }
_rotationAngle++;
- servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
+ _ = servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
await Task.Delay(50);
}
@@ -70,7 +63,7 @@ protected async Task StartSweep(CancellationToken cancellationToken)
if (cancellationToken.IsCancellationRequested) { break; }
_rotationAngle--;
- servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
+ _ = servo.RotateTo(new Angle(_rotationAngle, Angle.UnitType.Degrees));
await Task.Delay(50);
}
}
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MapleRequestHandlers/ServoControllerRequestHandler.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MapleRequestHandlers/ServoControllerRequestHandler.cs
index 4f8a045f..8f9d0b76 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MapleRequestHandlers/ServoControllerRequestHandler.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MapleRequestHandlers/ServoControllerRequestHandler.cs
@@ -1,4 +1,5 @@
-using Meadow.Foundation.Web.Maple;
+using Meadow;
+using Meadow.Foundation.Web.Maple;
using Meadow.Foundation.Web.Maple.Routing;
using Meadow.Units;
using MeadowMapleServo.Controllers;
@@ -13,21 +14,21 @@ public ServoControllerRequestHandler() { }
public IActionResult RotateTo()
{
int angle = int.Parse(Body);
- ServoController.Instance.RotateTo(new Angle(angle, Angle.UnitType.Degrees));
+ Resolver.Services.Get().RotateTo(new Angle(angle));
return new OkResult();
}
[HttpPost("/startsweep")]
public IActionResult StartSweep()
{
- ServoController.Instance.StartSweep();
+ Resolver.Services.Get().StartSweep();
return new OkResult();
}
[HttpPost("/stopsweep")]
public IActionResult StopSweep()
{
- ServoController.Instance.StopSweep();
+ Resolver.Services.Get().StopSweep();
return new OkResult();
}
}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MeadowApp.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MeadowApp.cs
index afdcc7c1..e8e18b40 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MeadowApp.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleServo/MeadowApp.cs
@@ -14,8 +14,11 @@ namespace MeadowMapleServo;
// public class MeadowApp : App <- If you have a Meadow F7v1.*
public class MeadowApp : App
{
- RgbPwmLed onboardLed;
- MapleServer mapleServer;
+ private RgbPwmLed onboardLed;
+
+ private IWiFiNetworkAdapter wifi;
+
+ private ServoController servoController;
public override async Task Initialize()
{
@@ -25,9 +28,10 @@ public override async Task Initialize()
bluePwmPin: Device.Pins.OnboardLedBlue);
onboardLed.SetColor(Color.Red);
- ServoController.Instance.RotateTo(new Angle(NamedServoConfigs.SG90.MinimumAngle));
+ servoController = new ServoController();
+ servoController.RotateTo(new Angle(NamedServoConfigs.SG90.MinimumAngle));
- var wifi = Device.NetworkAdapters.Primary();
+ wifi = Device.NetworkAdapters.Primary();
wifi.NetworkConnected += NetworkConnected;
await wifi.Connect(Secrets.WIFI_NAME, Secrets.WIFI_PASSWORD, TimeSpan.FromSeconds(45));
@@ -35,7 +39,7 @@ public override async Task Initialize()
private void NetworkConnected(INetworkAdapter sender, NetworkConnectionEventArgs args)
{
- mapleServer = new MapleServer(sender.IpAddress, 5417, true, logger: Resolver.Log);
+ var mapleServer = new MapleServer(sender.IpAddress, 5417, true, logger: Resolver.Log);
mapleServer.Start();
onboardLed.SetColor(Color.Green);
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/LedController.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/LedController.cs
index b1d56140..23e9bf02 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/LedController.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/LedController.cs
@@ -1,25 +1,17 @@
using Meadow;
using Meadow.Foundation.Leds;
-using System;
using System.Threading.Tasks;
namespace MeadowMapleTemperature.Controllers;
public class LedController
{
- RgbPwmLed led;
+ private RgbPwmLed led;
- private static readonly Lazy instance =
- new Lazy(() => new LedController());
- public static LedController Instance => instance.Value;
-
- private LedController()
+ public LedController()
{
- Initialize();
- }
+ Resolver.Services.Add(this);
- private void Initialize()
- {
led = new RgbPwmLed(
MeadowApp.Device.Pins.OnboardLedRed,
MeadowApp.Device.Pins.OnboardLedGreen,
@@ -27,15 +19,13 @@ private void Initialize()
);
}
- public async Task SetColor(Color color)
+ public void SetColor(Color color)
{
- await led.StopAnimation();
led.SetColor(color);
}
public async Task StartBlink(Color color)
{
- await led.StopAnimation();
await led.StartBlink(color);
}
-}
+}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/TemperatureController.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/TemperatureController.cs
index 250c6f67..e1392fc7 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/TemperatureController.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/Controllers/TemperatureController.cs
@@ -9,31 +9,31 @@ namespace MeadowMapleTemperature.Controllers;
public class TemperatureController
{
- ITemperatureSensor analogTemperature;
-
- private static readonly Lazy instance =
- new Lazy(() => new TemperatureController());
- public static TemperatureController Instance => instance.Value;
+ private ITemperatureSensor analogTemperature;
public ObservableCollection TemperatureLogs { get; private set; }
- private TemperatureController() { }
+ public TemperatureController() { }
public void Initialize()
{
+ Resolver.Services.Add(this);
+
TemperatureLogs = new ObservableCollection();
- analogTemperature = new AnalogTemperature(MeadowApp.Device.Pins.A01,
+ analogTemperature = new AnalogTemperature(
+ MeadowApp.Device.Pins.A01,
AnalogTemperature.KnownSensorType.LM35);
analogTemperature.Updated += AnalogTemperatureUpdated;
analogTemperature.StartUpdating(TimeSpan.FromSeconds(30));
}
- private void AnalogTemperatureUpdated(object sender, Meadow.IChangeResult e)
+ private void AnalogTemperatureUpdated(object sender, IChangeResult e)
{
int TIMEZONE_OFFSET = -8;
- LedController.Instance.SetColor(Color.Magenta);
+ var ledController = Resolver.Services.Get();
+ ledController.SetColor(Color.Magenta);
TemperatureLogs.Add(new TemperatureModel()
{
@@ -41,6 +41,6 @@ private void AnalogTemperatureUpdated(object sender, Meadow.IChangeResult();
+ ledController.SetColor(Color.Cyan);
- var data = TemperatureController.Instance.TemperatureLogs;
+ var data = Resolver.Services.Get().TemperatureLogs;
- LedController.Instance.SetColor(Color.Green);
+ ledController.SetColor(Color.Green);
return new JsonResult(data);
}
}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/MeadowApp.cs b/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/MeadowApp.cs
index b4314b28..a10db36e 100644
--- a/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/MeadowApp.cs
+++ b/Source/Meadow F7 Feather/Maple/MeadowMapleTemperature/MeadowApp.cs
@@ -11,15 +11,18 @@ namespace MeadowMapleTemperature;
// public class MeadowApp : App <- If you have a Meadow F7v1.*
public class MeadowApp : App
{
- MapleServer mapleServer;
+ private IWiFiNetworkAdapter wifi;
+
+ private LedController ledController;
public override async Task Initialize()
{
- LedController.Instance.SetColor(Color.Red);
+ ledController = new LedController();
+ ledController.SetColor(Color.Red);
- TemperatureController.Instance.Initialize();
+ var temperatureController = new TemperatureController();
- var wifi = Device.NetworkAdapters.Primary();
+ wifi = Device.NetworkAdapters.Primary();
wifi.NetworkConnected += NetworkConnected;
await wifi.Connect(Secrets.WIFI_NAME, Secrets.WIFI_PASSWORD, TimeSpan.FromSeconds(45));
@@ -27,9 +30,9 @@ public override async Task Initialize()
private void NetworkConnected(INetworkAdapter sender, NetworkConnectionEventArgs args)
{
- mapleServer = new MapleServer(sender.IpAddress, 5417, true, logger: Resolver.Log);
+ var mapleServer = new MapleServer(sender.IpAddress, 5417, true, logger: Resolver.Log);
mapleServer.Start();
- LedController.Instance.SetColor(Color.Green);
+ ledController.SetColor(Color.Green);
}
}
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Maple/MobileMaple/MobileMaple.csproj b/Source/Meadow F7 Feather/Maple/MobileMaple/MobileMaple.csproj
index 9fdc9929..99d2999d 100644
--- a/Source/Meadow F7 Feather/Maple/MobileMaple/MobileMaple.csproj
+++ b/Source/Meadow F7 Feather/Maple/MobileMaple/MobileMaple.csproj
@@ -49,6 +49,6 @@
-
+
\ No newline at end of file
diff --git a/Source/Meadow F7 Feather/Rover/MobileRover/MobileRover.csproj b/Source/Meadow F7 Feather/Rover/MobileRover/MobileRover.csproj
index 0979dbd7..0fd4ab6c 100644
--- a/Source/Meadow F7 Feather/Rover/MobileRover/MobileRover.csproj
+++ b/Source/Meadow F7 Feather/Rover/MobileRover/MobileRover.csproj
@@ -48,7 +48,7 @@
-
+
diff --git a/Source/Meadow F7 Feather/WiFi/MobileWifi/MobileWifi.csproj b/Source/Meadow F7 Feather/WiFi/MobileWifi/MobileWifi.csproj
index 5863c69e..ddf30f85 100644
--- a/Source/Meadow F7 Feather/WiFi/MobileWifi/MobileWifi.csproj
+++ b/Source/Meadow F7 Feather/WiFi/MobileWifi/MobileWifi.csproj
@@ -50,7 +50,7 @@
-
+
diff --git a/Source/Meadow F7/Network/WiFiConfig/app.config.yaml b/Source/Meadow F7/Network/WiFiConfig/app.config.yaml
index 99d3077d..42856fa2 100644
--- a/Source/Meadow F7/Network/WiFiConfig/app.config.yaml
+++ b/Source/Meadow F7/Network/WiFiConfig/app.config.yaml
@@ -9,7 +9,7 @@ Lifecycle:
#AppFailureRestartDelaySeconds: 15
# # Adjust the level of logging detail.
-#Logging:
-# LogLevel:
-# Default: Trace
+Logging:
+ LogLevel:
+ Default: Trace
diff --git a/Source/Meadow.Cloud/MeadowF7_HealthMetrics/app.config.yaml b/Source/Meadow.Cloud/MeadowF7_HealthMetrics/app.config.yaml
index 0c7db353..3e55f19f 100644
--- a/Source/Meadow.Cloud/MeadowF7_HealthMetrics/app.config.yaml
+++ b/Source/Meadow.Cloud/MeadowF7_HealthMetrics/app.config.yaml
@@ -21,7 +21,7 @@ Logging:
Default: Trace
# Meadow.Cloud configuration.
-Update:
+MeadowCloud:
# Enable Logging, Events, Command + Control
Enabled: true
diff --git a/Source/Meadow.Desktop/HMI_Views/MeadowApp.cs b/Source/Meadow.Desktop/HMI_Views/MeadowApp.cs
index db3c177c..350ff83e 100644
--- a/Source/Meadow.Desktop/HMI_Views/MeadowApp.cs
+++ b/Source/Meadow.Desktop/HMI_Views/MeadowApp.cs
@@ -15,16 +15,16 @@ public override Task Initialize()
//var views = new RotatingCube(_display);
// Screen size of a ILI9488 display
- //_display = new WinFormsDisplay(320, 480);
- //var views = new WiFiWeather(_display);
+ Device.Display.Resize(250, 122);
+ var views = new GnssTrackerConnectivityView(Device.Display);
// Screen size of a EPD4IN2bV2 e-paper display
- //_display = new WinFormsDisplay(300, 400);
- //var views = new HomeWidget(_display);
+ //Device.Display.Resize(300, 400);
+ //var views = new HomeWidget(Device.Display);
// Screen size of a ILI9341 display
//var views = new CultivarView(Device.Display);
- var views = new ProjectLabDemoView(Device.Display);
+ //var views = new ProjectLabDemoView(Device.Display);
//var views = new AtmosphericHMI(Device.Display);
//var views = new WifiWeatherV2(Device.Display);
diff --git a/Source/Meadow.Desktop/HMI_Views/Views/GnssTrackerConnectivityView.cs b/Source/Meadow.Desktop/HMI_Views/Views/GnssTrackerConnectivityView.cs
new file mode 100644
index 00000000..44035135
--- /dev/null
+++ b/Source/Meadow.Desktop/HMI_Views/Views/GnssTrackerConnectivityView.cs
@@ -0,0 +1,122 @@
+using Meadow;
+using Meadow.Foundation.Graphics;
+using Meadow.Foundation.Graphics.MicroLayout;
+using Meadow.Peripherals.Displays;
+
+namespace HMI_Views.Views;
+
+public class GnssTrackerConnectivityView
+{
+ // Screen height is 122 but buffer is 128
+ private readonly int OFFSET_Y = 6;
+
+ //private Image ble = Image.LoadFromResource("GnssTrackerConnectivity.Resources.img-ble.bmp");
+ //private Image wifi = Image.LoadFromResource("GnssTrackerConnectivity.Resources.img-wifi.bmp");
+
+ private DisplayScreen displayScreen;
+
+ private Picture connectivityIcon;
+ private Label Line1;
+ private Label Line2;
+ private Label Line3;
+
+ public GnssTrackerConnectivityView(IPixelDisplay display)
+ {
+ displayScreen = new DisplayScreen(display) //, RotationType._90Degrees)
+ {
+ BackgroundColor = Color.White
+ };
+
+
+
+ displayScreen.Controls.Add(new Box(
+ 0,
+ 0 + OFFSET_Y,
+ displayScreen.Width,
+ displayScreen.Height - OFFSET_Y)
+ {
+ IsFilled = true,
+ ForeColor = Color.Red
+ });
+
+ displayScreen.Controls.Add(new Box(
+ 5,
+ 5 + OFFSET_Y,
+ displayScreen.Width - 10,
+ displayScreen.Height - 10 - OFFSET_Y)
+ {
+ IsFilled = true,
+ ForeColor = Color.White
+ });
+
+ //connectivityIcon = new Picture(
+ // 15,
+ // 22 + OFFSET_Y,
+ // 60,
+ // 78,
+ // wifi);
+ //displayScreen.Controls.Add(connectivityIcon);
+
+ Line1 = new Label(
+ 84,
+ 22 + OFFSET_Y,
+ 151,
+ 16)
+ {
+ TextColor = Color.Black,
+ Font = new Font12x16()
+ };
+ displayScreen.Controls.Add(Line1);
+
+ Line2 = new Label(
+ 84,
+ 55 + OFFSET_Y,
+ 151,
+ 16)
+ {
+ TextColor = Color.Black,
+ Font = new Font8x12()
+ };
+ displayScreen.Controls.Add(Line2);
+
+ Line3 = new Label(
+ 84,
+ 84 + OFFSET_Y,
+ 151,
+ 16)
+ {
+ TextColor = Color.Black,
+ Font = new Font12x16()
+ };
+ displayScreen.Controls.Add(Line3);
+ }
+
+ public void ShowBluetoothReady()
+ {
+ displayScreen.BeginUpdate();
+
+ //connectivityIcon.Image = ble;
+ Line1.Text = "Bluetooth";
+ Line2.Text = "Discoverable";
+ Line3.Text = "Ready";
+
+ displayScreen.EndUpdate();
+ }
+
+ public void ShowMapleReady(string ipAddress)
+ {
+ displayScreen.BeginUpdate();
+
+ //connectivityIcon.Image = wifi;
+ Line1.Text = "WiFi (Maple)";
+ Line2.Text = $"{ipAddress}";
+ Line3.Text = "Ready";
+
+ displayScreen.EndUpdate();
+ }
+
+ public void Run()
+ {
+ ShowBluetoothReady();
+ }
+}
\ No newline at end of file
diff --git a/Source/Meadow.Desktop/HMI_Views/Views/HomeWidget.cs b/Source/Meadow.Desktop/HMI_Views/Views/HomeWidget.cs
index bb09c81b..f2bf4759 100644
--- a/Source/Meadow.Desktop/HMI_Views/Views/HomeWidget.cs
+++ b/Source/Meadow.Desktop/HMI_Views/Views/HomeWidget.cs
@@ -46,7 +46,7 @@ public class HomeWidget
Font12x20 font12X20 = new Font12x20();
Font6x8 font6x8 = new Font6x8();
- public HomeWidget(IPixelDisplay display)
+ public HomeWidget(IResizablePixelDisplay display)
{
DisplayScreen = new DisplayScreen(display)
{
diff --git a/Source/Meadow.Samples.sln b/Source/Meadow.Samples.sln
index e95edf46..92ad425b 100644
--- a/Source/Meadow.Samples.sln
+++ b/Source/Meadow.Samples.sln
@@ -327,12 +327,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WakeOnInterrupt", "ProjectL
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WifiWeather", "ProjectLab\WifiWeather\WifiWeather.csproj", "{671B8B00-7536-4CE8-93BC-22117D3686DA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileProjectLab", "ProjectLab\ProjectLabWiFiBle\MobileProjectLabWiFiBle\MobileProjectLab.csproj", "{C16C1661-F57C-4917-B4D3-DA482EC15C92}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MeadowConnectedSample", "ProjectLab\ProjectLabWiFiBle\ProjectLabWiFiBle\MeadowConnectedSample.csproj", "{D5CFD67A-E091-43E8-97E4-095C6E3E33B6}"
-EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Connectivity.Common", "ProjectLab\ProjectLabWiFiBle\ProjectLabWiFiBle.Common\Connectivity.Common.shproj", "{393B0BB7-25DC-4543-A9B7-1D2064A80908}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sensors.Camera.Mlx90640", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Sensors.Camera.Mlx90640\Driver\Sensors.Camera.Mlx90640.csproj", "{2127B425-8333-42AC-9C65-DE3E8CC6B3C8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MoistureSensor", "..\..\Meadow.Foundation.Grove\Source\MoistureSensor\Driver\MoistureSensor.csproj", "{6992176E-ECCC-451E-A7F2-C10A18D7F212}"
@@ -491,6 +485,32 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Mac", "..\..\Meadow.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Linux", "..\..\Meadow.Core\source\implementations\linux\Meadow.Linux\Meadow.Linux.csproj", "{3C565075-AB93-493E-A552-E0DFFAFE3E79}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GnssTracker", "GnssTracker", "{9F7C1A01-9EFA-4257-86BC-B14E65DC7D95}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Connectivity", "Connectivity", "{2AEF0D66-3B2E-418F-8C19-98F0B9CEE405}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GnssTracker", "..\..\GNSS_Sensor_Tracker\Source\GnssTracker\GnssTracker.csproj", "{E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Displays.ePaper", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Displays.ePaper\Driver\Displays.ePaper.csproj", "{935CD183-E43E-4085-ADAD-1CACA375B06A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sensors.Environmental.Scd4x", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Sensors.Environmental.Scd4x\Driver\Sensors.Environmental.Scd4x.csproj", "{139C9AD5-B066-47F2-A09E-FFF077B1AD2A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sensors.Gnss.NeoM8", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Sensors.Gnss.NeoM8\Driver\Sensors.Gnss.NeoM8.csproj", "{09349E3D-1855-4E46-BB82-8EDD1DD25A5E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sensors.Location.Gnss.NmeaProcessor", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Libraries_and_Frameworks\Sensors.Location.Gnss.NmeaProcessor\Driver\Sensors.Location.Gnss.NmeaProcessor.csproj", "{870302A8-158E-43CE-9E83-B8770A259CC6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileProjectLabConnectivity", "ProjectLab\Connectivity\MobileProjectLabConnectivity\MobileProjectLabConnectivity.csproj", "{B1475DD1-9D32-4B4D-B477-5D6776AE54C7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectLabConnectivity", "ProjectLab\Connectivity\ProjectLabConnectivity\ProjectLabConnectivity.csproj", "{2D6B532C-F8C2-4652-8D57-33D7146906A9}"
+EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ProjectLabConnectivity.Common", "ProjectLab\Connectivity\ProjectLabConnectivity.Common\ProjectLabConnectivity.Common.shproj", "{C1C5E6D0-E1C6-4188-879F-C7C574C4AF13}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GnssTrackerConnectivity", "GnssTracker\Connectivity\GnssTrackerConnectivity\GnssTrackerConnectivity.csproj", "{1C110570-E3EF-400F-8B7A-F179908880C3}"
+EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GnssTrackerConnectivity.Common", "GnssTracker\Connectivity\GnssTrackerConnectivity.Common\GnssTrackerConnectivity.Common.shproj", "{B37359B9-3D61-42BD-B485-FC76275F0585}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MobileGnssTrackerConnectivity", "GnssTracker\Connectivity\MobileGnssTrackerConnectivity\MobileGnssTrackerConnectivity.csproj", "{5EE35697-6C30-432F-B675-24CE02F2CF9D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1629,24 +1649,6 @@ Global
{671B8B00-7536-4CE8-93BC-22117D3686DA}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
{671B8B00-7536-4CE8-93BC-22117D3686DA}.Simulation|Any CPU.Build.0 = Debug|Any CPU
{671B8B00-7536-4CE8-93BC-22117D3686DA}.Simulation|Any CPU.Deploy.0 = Debug|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Release|Any CPU.Build.0 = Release|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Simulation|Any CPU.Build.0 = Debug|Any CPU
- {C16C1661-F57C-4917-B4D3-DA482EC15C92}.Simulation|Any CPU.Deploy.0 = Debug|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Release|Any CPU.Build.0 = Release|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Simulation|Any CPU.Build.0 = Debug|Any CPU
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6}.Simulation|Any CPU.Deploy.0 = Debug|Any CPU
{2127B425-8333-42AC-9C65-DE3E8CC6B3C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2127B425-8333-42AC-9C65-DE3E8CC6B3C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2127B425-8333-42AC-9C65-DE3E8CC6B3C8}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -2293,6 +2295,66 @@ Global
{3C565075-AB93-493E-A552-E0DFFAFE3E79}.Release|Any CPU.Build.0 = Release|Any CPU
{3C565075-AB93-493E-A552-E0DFFAFE3E79}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
{3C565075-AB93-493E-A552-E0DFFAFE3E79}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {935CD183-E43E-4085-ADAD-1CACA375B06A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {935CD183-E43E-4085-ADAD-1CACA375B06A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {935CD183-E43E-4085-ADAD-1CACA375B06A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {935CD183-E43E-4085-ADAD-1CACA375B06A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {935CD183-E43E-4085-ADAD-1CACA375B06A}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {935CD183-E43E-4085-ADAD-1CACA375B06A}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {139C9AD5-B066-47F2-A09E-FFF077B1AD2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {139C9AD5-B066-47F2-A09E-FFF077B1AD2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {139C9AD5-B066-47F2-A09E-FFF077B1AD2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {139C9AD5-B066-47F2-A09E-FFF077B1AD2A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {139C9AD5-B066-47F2-A09E-FFF077B1AD2A}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {139C9AD5-B066-47F2-A09E-FFF077B1AD2A}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {09349E3D-1855-4E46-BB82-8EDD1DD25A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {09349E3D-1855-4E46-BB82-8EDD1DD25A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {09349E3D-1855-4E46-BB82-8EDD1DD25A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {09349E3D-1855-4E46-BB82-8EDD1DD25A5E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {09349E3D-1855-4E46-BB82-8EDD1DD25A5E}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {09349E3D-1855-4E46-BB82-8EDD1DD25A5E}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {870302A8-158E-43CE-9E83-B8770A259CC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {870302A8-158E-43CE-9E83-B8770A259CC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {870302A8-158E-43CE-9E83-B8770A259CC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {870302A8-158E-43CE-9E83-B8770A259CC6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {870302A8-158E-43CE-9E83-B8770A259CC6}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {870302A8-158E-43CE-9E83-B8770A259CC6}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7}.Simulation|Any CPU.Deploy.0 = Debug|Any CPU
+ {2D6B532C-F8C2-4652-8D57-33D7146906A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2D6B532C-F8C2-4652-8D57-33D7146906A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2D6B532C-F8C2-4652-8D57-33D7146906A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2D6B532C-F8C2-4652-8D57-33D7146906A9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2D6B532C-F8C2-4652-8D57-33D7146906A9}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {2D6B532C-F8C2-4652-8D57-33D7146906A9}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {1C110570-E3EF-400F-8B7A-F179908880C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1C110570-E3EF-400F-8B7A-F179908880C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1C110570-E3EF-400F-8B7A-F179908880C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1C110570-E3EF-400F-8B7A-F179908880C3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1C110570-E3EF-400F-8B7A-F179908880C3}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {1C110570-E3EF-400F-8B7A-F179908880C3}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Simulation|Any CPU.ActiveCfg = Debug|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Simulation|Any CPU.Build.0 = Debug|Any CPU
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D}.Simulation|Any CPU.Deploy.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2448,9 +2510,6 @@ Global
{ADB36B8A-9ABE-463D-96F0-B9CE165124D9} = {DA0CC626-D072-457F-89B7-C22427D4C775}
{A0C491AD-C17D-4D1C-ADFD-994D13BC5A7C} = {DA0CC626-D072-457F-89B7-C22427D4C775}
{671B8B00-7536-4CE8-93BC-22117D3686DA} = {DA0CC626-D072-457F-89B7-C22427D4C775}
- {C16C1661-F57C-4917-B4D3-DA482EC15C92} = {4266E735-B42B-45AE-8601-6C8585BEDF19}
- {D5CFD67A-E091-43E8-97E4-095C6E3E33B6} = {4266E735-B42B-45AE-8601-6C8585BEDF19}
- {393B0BB7-25DC-4543-A9B7-1D2064A80908} = {4266E735-B42B-45AE-8601-6C8585BEDF19}
{2127B425-8333-42AC-9C65-DE3E8CC6B3C8} = {A809F07D-DD94-4375-8776-23FBE73591A5}
{6992176E-ECCC-451E-A7F2-C10A18D7F212} = {A809F07D-DD94-4375-8776-23FBE73591A5}
{0C37EAD9-8617-4AA2-8025-6F50897C5586} = {C9F7B30F-F886-4451-ACEC-01014DB38927}
@@ -2529,13 +2588,28 @@ Global
{30D71971-96E0-4BDE-ABAF-C2823A8EF5C6} = {A809F07D-DD94-4375-8776-23FBE73591A5}
{733F129E-84F0-4FCB-8B60-C04CA8122B43} = {A809F07D-DD94-4375-8776-23FBE73591A5}
{3C565075-AB93-493E-A552-E0DFFAFE3E79} = {A809F07D-DD94-4375-8776-23FBE73591A5}
+ {2AEF0D66-3B2E-418F-8C19-98F0B9CEE405} = {9F7C1A01-9EFA-4257-86BC-B14E65DC7D95}
+ {E77F0B9B-5DC1-48C2-BD7A-56EB6AA6DB9A} = {A809F07D-DD94-4375-8776-23FBE73591A5}
+ {935CD183-E43E-4085-ADAD-1CACA375B06A} = {A809F07D-DD94-4375-8776-23FBE73591A5}
+ {139C9AD5-B066-47F2-A09E-FFF077B1AD2A} = {A809F07D-DD94-4375-8776-23FBE73591A5}
+ {09349E3D-1855-4E46-BB82-8EDD1DD25A5E} = {A809F07D-DD94-4375-8776-23FBE73591A5}
+ {870302A8-158E-43CE-9E83-B8770A259CC6} = {A809F07D-DD94-4375-8776-23FBE73591A5}
+ {B1475DD1-9D32-4B4D-B477-5D6776AE54C7} = {4266E735-B42B-45AE-8601-6C8585BEDF19}
+ {2D6B532C-F8C2-4652-8D57-33D7146906A9} = {4266E735-B42B-45AE-8601-6C8585BEDF19}
+ {C1C5E6D0-E1C6-4188-879F-C7C574C4AF13} = {4266E735-B42B-45AE-8601-6C8585BEDF19}
+ {1C110570-E3EF-400F-8B7A-F179908880C3} = {2AEF0D66-3B2E-418F-8C19-98F0B9CEE405}
+ {B37359B9-3D61-42BD-B485-FC76275F0585} = {2AEF0D66-3B2E-418F-8C19-98F0B9CEE405}
+ {5EE35697-6C30-432F-B675-24CE02F2CF9D} = {2AEF0D66-3B2E-418F-8C19-98F0B9CEE405}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E3F002EA-1A25-487F-9A5D-93D1E7EC6E31}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
- ProjectLab\ProjectLabWiFiBle\ProjectLabWiFiBle.Common\CommonContracts.projitems*{393b0bb7-25dc-4543-a9b7-1d2064a80908}*SharedItemsImports = 13
- ProjectLab\ProjectLabWiFiBle\ProjectLabWiFiBle.Common\CommonContracts.projitems*{c16c1661-f57c-4917-b4d3-da482ec15c92}*SharedItemsImports = 5
- ProjectLab\ProjectLabWiFiBle\ProjectLabWiFiBle.Common\CommonContracts.projitems*{d5cfd67a-e091-43e8-97e4-095c6e3e33b6}*SharedItemsImports = 5
+ GnssTracker\Connectivity\GnssTrackerConnectivity.Common\GnssTrackerConnectivity.Common.projitems*{1c110570-e3ef-400f-8b7a-f179908880c3}*SharedItemsImports = 5
+ ProjectLab\Connectivity\ProjectLabConnectivity.Common\ProjectLabConnectivity.Common.projitems*{2d6b532c-f8c2-4652-8d57-33d7146906a9}*SharedItemsImports = 5
+ GnssTracker\Connectivity\GnssTrackerConnectivity.Common\GnssTrackerConnectivity.Common.projitems*{5ee35697-6c30-432f-b675-24ce02f2cf9d}*SharedItemsImports = 5
+ ProjectLab\Connectivity\ProjectLabConnectivity.Common\ProjectLabConnectivity.Common.projitems*{b1475dd1-9d32-4b4d-b477-5d6776ae54c7}*SharedItemsImports = 5
+ GnssTracker\Connectivity\GnssTrackerConnectivity.Common\GnssTrackerConnectivity.Common.projitems*{b37359b9-3d61-42bd-b485-fc76275f0585}*SharedItemsImports = 13
+ ProjectLab\Connectivity\ProjectLabConnectivity.Common\ProjectLabConnectivity.Common.projitems*{c1c5e6d0-e1c6-4188-879f-c7c574c4af13}*SharedItemsImports = 13
EndGlobalSection
EndGlobal
diff --git a/Source/ProjectLab/Connectivity/.vscode/launch.config b/Source/ProjectLab/Connectivity/.vscode/launch.config
new file mode 100644
index 00000000..43067bdc
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/.vscode/launch.config
@@ -0,0 +1,14 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Deploy",
+ "type": "meadow",
+ "request": "launch",
+ "preLaunchTask": "meadow: Build"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/App.xaml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/App.xaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/App.xaml
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/App.xaml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/App.xaml.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/App.xaml.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/App.xaml.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/App.xaml.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/AppShell.xaml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/AppShell.xaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/AppShell.xaml
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/AppShell.xaml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/AppShell.xaml.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/AppShell.xaml.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/AppShell.xaml.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/AppShell.xaml.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Converter/InverseBoolConverter.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Converter/InverseBoolConverter.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Converter/InverseBoolConverter.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Converter/InverseBoolConverter.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/MauiProgram.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/MauiProgram.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/MauiProgram.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/MauiProgram.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/MobileProjectLab.csproj b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/MobileProjectLabConnectivity.csproj
similarity index 90%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/MobileProjectLab.csproj
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/MobileProjectLabConnectivity.csproj
index bad86913..84d0336e 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/MobileProjectLab.csproj
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/MobileProjectLabConnectivity.csproj
@@ -52,8 +52,8 @@
-
+
-
+
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/MobileProjectLabWiFiBle.sln b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/MobileProjectLabConnectivity.sln
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/MobileProjectLabWiFiBle.sln
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/MobileProjectLabConnectivity.sln
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/AndroidManifest.xml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/AndroidManifest.xml
new file mode 100644
index 00000000..2fc19c49
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/AndroidManifest.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/MainActivity.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/MainActivity.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/MainActivity.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/MainActivity.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/MainApplication.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/MainApplication.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Platforms/Android/MainApplication.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/MainApplication.cs
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/Resources/values/colors.xml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/Resources/values/colors.xml
new file mode 100644
index 00000000..a6398379
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/Resources/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #512BD4
+ #14607F
+ #2B0B98
+
\ No newline at end of file
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/Resources/xml/network_security_config.xml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/Resources/xml/network_security_config.xml
new file mode 100644
index 00000000..a49a40dd
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Platforms/Android/Resources/xml/network_security_config.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Properties/launchSettings.json b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Properties/launchSettings.json
new file mode 100644
index 00000000..c16206a8
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "Windows Machine": {
+ "commandName": "MsixPackage",
+ "nativeDebugging": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/AppIcon/appicon.svg b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/AppIcon/appicon.svg
new file mode 100644
index 00000000..3226a00e
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/AppIcon/appicon.svg
@@ -0,0 +1,10 @@
+
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/AppIcon/appiconfg.svg b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/AppIcon/appiconfg.svg
new file mode 100644
index 00000000..b198ab06
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/AppIcon/appiconfg.svg
@@ -0,0 +1,3 @@
+
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Fonts/OpenSans-Regular.ttf b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Fonts/OpenSans-Regular.ttf
new file mode 100644
index 00000000..6cbaf4b8
Binary files /dev/null and b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Fonts/OpenSans-Regular.ttf differ
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Fonts/OpenSans-Semibold.ttf b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Fonts/OpenSans-Semibold.ttf
new file mode 100644
index 00000000..554d68ad
Binary files /dev/null and b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Fonts/OpenSans-Semibold.ttf differ
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_ble_pair.svg b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_ble_pair.svg
new file mode 100644
index 00000000..e7e21c05
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_ble_pair.svg
@@ -0,0 +1,3 @@
+
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_ble_paired.svg b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_ble_paired.svg
new file mode 100644
index 00000000..d711e4ca
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_ble_paired.svg
@@ -0,0 +1,3 @@
+
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_project_lab.png b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_project_lab.png
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Resources/Images/img_project_lab.png
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_project_lab.png
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_search.svg b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_search.svg
new file mode 100644
index 00000000..129c1a1a
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Images/img_search.svg
@@ -0,0 +1,3 @@
+
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Raw/AboutAssets.txt b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Raw/AboutAssets.txt
new file mode 100644
index 00000000..50b8a7b8
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Raw/AboutAssets.txt
@@ -0,0 +1,15 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories). Deployment of the asset to your application
+is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
+
+
+
+These files will be deployed with you package and will be accessible using Essentials:
+
+ async Task LoadMauiAsset()
+ {
+ using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
+ using var reader = new StreamReader(stream);
+
+ var contents = reader.ReadToEnd();
+ }
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Splash/splash.svg b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Splash/splash.svg
new file mode 100644
index 00000000..9b63f93e
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Splash/splash.svg
@@ -0,0 +1,3 @@
+
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Styles/Colors.xaml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Styles/Colors.xaml
new file mode 100644
index 00000000..708d3227
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Styles/Colors.xaml
@@ -0,0 +1,49 @@
+
+
+
+
+ #512BD4
+ #DFD8F7
+ #2B0B98
+ White
+ Black
+ #E1E1E1
+ #C8C8C8
+ #ACACAC
+ #919191
+ #6E6E6E
+ #404040
+ #212121
+ #141414
+ #23ABE3
+ #555
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #F7B548
+ #FFD590
+ #FFE5B9
+ #28C2D1
+ #7BDDEF
+ #C3F2F4
+ #3E8EED
+ #72ACF1
+ #A7CBF6
+
+
\ No newline at end of file
diff --git a/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Styles/Styles.xaml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Styles/Styles.xaml
new file mode 100644
index 00000000..7dbcc8a2
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Resources/Styles/Styles.xaml
@@ -0,0 +1,391 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Utils/BleConstants.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Utils/BleConstants.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/Utils/BleConstants.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/Utils/BleConstants.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/BluetoothPage.xaml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/BluetoothPage.xaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/BluetoothPage.xaml
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/BluetoothPage.xaml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/BluetoothPage.xaml.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/BluetoothPage.xaml.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/BluetoothPage.xaml.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/BluetoothPage.xaml.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MainPage.xaml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MainPage.xaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MainPage.xaml
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MainPage.xaml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MainPage.xaml.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MainPage.xaml.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MainPage.xaml.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MainPage.xaml.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MaplePage.xaml b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MaplePage.xaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MaplePage.xaml
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MaplePage.xaml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MaplePage.xaml.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MaplePage.xaml.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/View/MaplePage.xaml.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/View/MaplePage.xaml.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/BaseViewModel.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/BaseViewModel.cs
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/BaseViewModel.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/BaseViewModel.cs
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/BluetoothViewModel.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/BluetoothViewModel.cs
similarity index 96%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/BluetoothViewModel.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/BluetoothViewModel.cs
index bf192534..a98c2cb4 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/BluetoothViewModel.cs
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/BluetoothViewModel.cs
@@ -1,8 +1,8 @@
-using CommonContracts.Bluetooth;
-using Plugin.BLE;
+using Plugin.BLE;
using Plugin.BLE.Abstractions.Contracts;
using Plugin.BLE.Abstractions.EventArgs;
using Plugin.BLE.Abstractions.Exceptions;
+using ProjectLabConnectivity.Common.Bluetooth;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Text;
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/MapleViewModel.cs b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/MapleViewModel.cs
similarity index 95%
rename from Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/MapleViewModel.cs
rename to Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/MapleViewModel.cs
index a5fd9868..e87b53da 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/MobileProjectLabWiFiBle/ViewModel/MapleViewModel.cs
+++ b/Source/ProjectLab/Connectivity/MobileProjectLabConnectivity/ViewModel/MapleViewModel.cs
@@ -1,6 +1,5 @@
-using CommonContracts.Models;
-using Connectivity.Common.Models;
-using Meadow.Foundation.Web.Maple;
+using Meadow.Foundation.Web.Maple;
+using ProjectLabConnectivity.Common.Models;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Windows.Input;
@@ -251,7 +250,7 @@ async Task GetEnvironmentalData()
return;
}
- var value = System.Text.Json.JsonSerializer.Deserialize(response);
+ var value = System.Text.Json.JsonSerializer.Deserialize(response);
Temperature = value.Temperature;
Humidity = value.Humidity;
@@ -275,7 +274,7 @@ async Task GetLightData()
if (response == null)
return;
- var value = System.Text.Json.JsonSerializer.Deserialize(response);
+ var value = System.Text.Json.JsonSerializer.Deserialize(response);
Illuminance = value.Illuminance;
}
@@ -299,7 +298,7 @@ async Task GetMotionData()
return;
}
- var value = System.Text.Json.JsonSerializer.Deserialize(response);
+ var value = System.Text.Json.JsonSerializer.Deserialize(response);
Acceleration3dX = value.Acceleration3dX;
Acceleration3dY = value.Acceleration3dY;
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Bluetooth/BluetoothConstants.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/Bluetooth/BluetoothConstants.cs
similarity index 92%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Bluetooth/BluetoothConstants.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/Bluetooth/BluetoothConstants.cs
index 404409f1..cf48fbf2 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Bluetooth/BluetoothConstants.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/Bluetooth/BluetoothConstants.cs
@@ -1,4 +1,4 @@
-namespace CommonContracts.Bluetooth
+namespace ProjectLabConnectivity.Common.Bluetooth
{
public static class CharacteristicsConstants
{
diff --git a/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/AtmosphericReadingsDTO.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/AtmosphericReadingsDTO.cs
new file mode 100644
index 00000000..ae1c0be2
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/AtmosphericReadingsDTO.cs
@@ -0,0 +1,10 @@
+namespace ProjectLabConnectivity.Common.Models;
+
+public class AtmosphericReadingsDTO
+{
+ public string? Temperature { get; set; }
+
+ public string? Pressure { get; set; }
+
+ public string? Humidity { get; set; }
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/IlluminanceReadingsDTO.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/IlluminanceReadingsDTO.cs
new file mode 100644
index 00000000..e1044c99
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/IlluminanceReadingsDTO.cs
@@ -0,0 +1,6 @@
+namespace ProjectLabConnectivity.Common.Models;
+
+public class IlluminanceReadingsDTO
+{
+ public string? Illuminance { get; set; }
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/MotionReadingsDTO.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/MotionReadingsDTO.cs
new file mode 100644
index 00000000..38908455
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/DTOs/MotionReadingsDTO.cs
@@ -0,0 +1,14 @@
+namespace ProjectLabConnectivity.Common.Models;
+
+public class MotionReadingsDTO
+{
+ public string Acceleration3dX { get; set; }
+ public string Acceleration3dY { get; set; }
+ public string Acceleration3dZ { get; set; }
+
+ public string AngularVelocity3dX { get; set; }
+ public string AngularVelocity3dY { get; set; }
+ public string AngularVelocity3dZ { get; set; }
+
+ public string Temperature { get; set; }
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/CommonContracts.projitems b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/ProjectLabConnectivity.Common.projitems
similarity index 56%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/CommonContracts.projitems
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/ProjectLabConnectivity.Common.projitems
index fb94e3b0..6e9077ed 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/CommonContracts.projitems
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/ProjectLabConnectivity.Common.projitems
@@ -3,15 +3,15 @@
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)true
- 5e32a8f6-1ec5-46ba-ae3d-e3e376fd82d0
+ c1c5e6d0-e1c6-4188-879f-c7c574c4af13
- CommonContracts
+ ProjectLabConnectivity.Common
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Connectivity.Common.shproj b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/ProjectLabConnectivity.Common.shproj
similarity index 84%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Connectivity.Common.shproj
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/ProjectLabConnectivity.Common.shproj
index 5c0562fa..907bdcb8 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Connectivity.Common.shproj
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity.Common/ProjectLabConnectivity.Common.shproj
@@ -1,13 +1,13 @@
- {393B0BB7-25DC-4543-A9B7-1D2064A80908}
+ c1c5e6d0-e1c6-4188-879f-c7c574c4af1314.0
-
+
-
\ No newline at end of file
+
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/ConnectionType.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/ConnectionType.cs
similarity index 56%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/ConnectionType.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/ConnectionType.cs
index 0cd92aaf..cb5f74e5 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/ConnectionType.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/ConnectionType.cs
@@ -1,4 +1,4 @@
-namespace MeadowConnectedSample;
+namespace ProjectLabConnectivity;
public enum ConnectionType
{
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Connectivity/BluetoothServer.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Connectivity/BluetoothServer.cs
similarity index 94%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Connectivity/BluetoothServer.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Connectivity/BluetoothServer.cs
index 7ac7c2f3..abd52566 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Connectivity/BluetoothServer.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Connectivity/BluetoothServer.cs
@@ -1,10 +1,10 @@
-using CommonContracts.Bluetooth;
-using Meadow;
+using Meadow;
using Meadow.Gateways.Bluetooth;
-using MeadowConnectedSample.Controllers;
-using MeadowConnectedSample.Models;
+using ProjectLabConnectivity.Common.Bluetooth;
+using ProjectLabConnectivity.Controllers;
+using ProjectLabConnectivity.Models;
-namespace MeadowConnectedSample.Connectivity;
+namespace ProjectLabConnectivity.Connectivity;
public class BluetoothServer
{
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Connectivity/MapleRequestHandler.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Connectivity/MapleRequestHandler.cs
similarity index 88%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Connectivity/MapleRequestHandler.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Connectivity/MapleRequestHandler.cs
index e94012a5..b2558f73 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Connectivity/MapleRequestHandler.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Connectivity/MapleRequestHandler.cs
@@ -1,11 +1,10 @@
-using CommonContracts.Models;
-using Connectivity.Common.Models;
-using Meadow;
+using Meadow;
using Meadow.Foundation.Web.Maple;
using Meadow.Foundation.Web.Maple.Routing;
-using MeadowConnectedSample.Controllers;
+using ProjectLabConnectivity.Common.Models;
+using ProjectLabConnectivity.Controllers;
-namespace MeadowConnectedSample.Connectivity;
+namespace ProjectLabConnectivity.Connectivity;
public class MapleRequestHandler : RequestHandlerBase
{
@@ -40,7 +39,7 @@ public IActionResult GetEnvironmentalData()
{
var sensorController = Resolver.Services.Get();
- var data = new ClimateModel()
+ var data = new AtmosphericReadingsDTO()
{
Temperature = $"{sensorController.AtmosphericConditions.Temperature.Celsius:N1}",
Humidity = $"{sensorController.AtmosphericConditions.Humidity.Percent:N1}",
@@ -56,7 +55,7 @@ public IActionResult GetLightData()
{
var sensorController = Resolver.Services.Get();
- var data = new IlluminanceModel()
+ var data = new IlluminanceReadingsDTO()
{
Illuminance = $"{sensorController.LightConditions.Illuminance.Lux:N1}"
};
@@ -70,7 +69,7 @@ public IActionResult GetMotionData()
{
var sensorController = Resolver.Services.Get();
- var data = new MotionModel()
+ var data = new MotionReadingsDTO()
{
Acceleration3dX = $"{sensorController.MotionConditions.Acceleration3D.X.CentimetersPerSecondSquared:N2}",
Acceleration3dY = $"{sensorController.MotionConditions.Acceleration3D.Y.CentimetersPerSecondSquared:N2}",
diff --git a/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/CommandController.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/CommandController.cs
new file mode 100644
index 00000000..e46ea88a
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/CommandController.cs
@@ -0,0 +1,37 @@
+using Meadow;
+using System;
+
+namespace ProjectLabConnectivity.Controllers;
+
+public class CommandController
+{
+ public event EventHandler PairingValueSet = default!;
+ public event EventHandler LedToggleValueSet = default!;
+ public event EventHandler LedBlinkValueSet = default!;
+ public event EventHandler LedPulseValueSet = default!;
+
+ public CommandController()
+ {
+ Resolver.Services.Add(this);
+ }
+
+ public void FirePairing(bool pairing)
+ {
+ PairingValueSet?.Invoke(this, pairing);
+ }
+
+ public void FireLedToggle()
+ {
+ LedToggleValueSet?.Invoke(this, true);
+ }
+
+ public void FireLedBlink()
+ {
+ LedBlinkValueSet?.Invoke(this, true);
+ }
+
+ public void FireLedPulse()
+ {
+ LedPulseValueSet?.Invoke(this, true);
+ }
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/DisplayController.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/DisplayController.cs
similarity index 80%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/DisplayController.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/DisplayController.cs
index c776c18e..e8441a47 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/DisplayController.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/DisplayController.cs
@@ -5,13 +5,13 @@
using System.Threading;
using System.Threading.Tasks;
-namespace MeadowConnectedSample.Controllers;
+namespace ProjectLabConnectivity.Controllers;
public class DisplayController
{
private CancellationTokenSource token;
- private Image logo = Image.LoadFromResource("MeadowConnectedSample.Resources.img_meadow.bmp");
+ private Image logo = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_meadow.bmp");
private Color backgroundColor = Color.FromHex("23ABE3");
private Color foregroundColor = Color.Black;
@@ -48,7 +48,7 @@ private void LoadSplashLayout()
{
splashLayout = new AbsoluteLayout(displayScreen, 0, 0, displayScreen.Width, displayScreen.Height);
- var image = Image.LoadFromResource("MeadowConnectedSample.Resources.img_meadow.bmp");
+ var image = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_meadow.bmp");
var displayImage = new Picture(0, 0, splashLayout.Width, splashLayout.Height, image)
{
BackColor = backgroundColor,
@@ -71,7 +71,7 @@ private void LoadDataLayout()
IsFilled = false
});
- var image = Image.LoadFromResource("MeadowConnectedSample.Resources.img_wifi.bmp");
+ var image = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_wifi.bmp");
connectionImage = new Picture(117, 35, 86, 74, image);
dataLayout.Controls.Add(connectionImage);
@@ -101,8 +101,8 @@ public async Task StartConnectingMapleAnimation()
token = new CancellationTokenSource();
- var connecting = Image.LoadFromResource("MeadowConnectedSample.Resources.img_wifi_fade.bmp");
- var connected = Image.LoadFromResource("MeadowConnectedSample.Resources.img_wifi.bmp");
+ var connecting = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_wifi_fade.bmp");
+ var connected = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_wifi.bmp");
title.Text = "MAPLE";
subtitle.Text = "STARTING";
@@ -129,8 +129,8 @@ public async Task StartConnectingBluetoothAnimation()
token = new CancellationTokenSource();
- var connecting = Image.LoadFromResource("MeadowConnectedSample.Resources.img_ble_fade.bmp");
- var connected = Image.LoadFromResource("MeadowConnectedSample.Resources.img_ble.bmp");
+ var connecting = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_ble_fade.bmp");
+ var connected = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_ble.bmp");
title.Text = "BLE";
subtitle.Text = "DISCOVERABLE";
@@ -166,7 +166,7 @@ public void ShowMapleReady(string ipAddress)
{
token.Cancel();
- var connected = Image.LoadFromResource("MeadowConnectedSample.Resources.img_wifi.bmp");
+ var connected = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_wifi.bmp");
connectionImage.Image = connected;
@@ -178,7 +178,7 @@ public void ShowBluetoothPaired()
{
token.Cancel();
- var connected = Image.LoadFromResource("MeadowConnectedSample.Resources.img_ble.bmp");
+ var connected = Image.LoadFromResource("ProjectLabConnectivity.Resources.img_ble.bmp");
connectionImage.Image = connected;
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/LedController.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/LedController.cs
similarity index 96%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/LedController.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/LedController.cs
index 94dbf71f..741ae25e 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/LedController.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/LedController.cs
@@ -3,7 +3,7 @@
using System;
using System.Threading.Tasks;
-namespace MeadowConnectedSample.Controllers;
+namespace ProjectLabConnectivity.Controllers;
public class LedController
{
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/MainController.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/MainController.cs
similarity index 90%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/MainController.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/MainController.cs
index 9b9fb7b7..3a064633 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/MainController.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/MainController.cs
@@ -3,17 +3,17 @@
using Meadow.Foundation.Web.Maple;
using Meadow.Gateways;
using Meadow.Hardware;
-using MeadowConnectedSample.Connectivity;
+using ProjectLabConnectivity.Connectivity;
using System;
using System.Threading.Tasks;
-namespace MeadowConnectedSample.Controllers;
+namespace ProjectLabConnectivity.Controllers;
public class MainController
{
// Connect via Maple (WiFi) or Bluetooth?
- private ConnectionType connectionType = ConnectionType.Bluetooth;
- //private ConnectionType connectionType = ConnectionType.WiFi;
+ //private ConnectionType connectionType = ConnectionType.Bluetooth;
+ private ConnectionType connectionType = ConnectionType.WiFi;
private IProjectLabHardware hardware;
private IWiFiNetworkAdapter wifi;
@@ -115,4 +115,4 @@ private void SubscribeLedCommands()
_ = ledController.StartPulse();
};
}
-}
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/SensorController.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/SensorController.cs
similarity index 95%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/SensorController.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/SensorController.cs
index 4fc5e19c..ddd623e8 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Controllers/SensorController.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Controllers/SensorController.cs
@@ -4,11 +4,11 @@
using Meadow.Peripherals.Sensors.Atmospheric;
using Meadow.Peripherals.Sensors.Light;
using Meadow.Peripherals.Sensors.Motion;
-using MeadowConnectedSample.Models;
+using ProjectLabConnectivity.Models;
using System;
using System.Threading.Tasks;
-namespace MeadowConnectedSample.Controllers;
+namespace ProjectLabConnectivity.Controllers;
public class SensorController
{
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/MeadowApp.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/MeadowApp.cs
similarity index 87%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/MeadowApp.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/MeadowApp.cs
index d48b4ecf..0dac5fb7 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/MeadowApp.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/MeadowApp.cs
@@ -1,10 +1,10 @@
using Meadow;
using Meadow.Devices;
using Meadow.Hardware;
-using MeadowConnectedSample.Controllers;
+using ProjectLabConnectivity.Controllers;
using System.Threading.Tasks;
-namespace MeadowConnectedSample;
+namespace ProjectLabConnectivity;
// Change F7CoreComputeV2 to F7FeatherV2 for ProjectLab v2
public class MeadowApp : App
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/AtmosphericConditions.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/AtmosphericConditions.cs
similarity index 79%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/AtmosphericConditions.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/AtmosphericConditions.cs
index 759c6db7..d46baa3b 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/AtmosphericConditions.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/AtmosphericConditions.cs
@@ -1,10 +1,10 @@
using Meadow.Units;
-namespace MeadowConnectedSample.Models;
+namespace ProjectLabConnectivity.Models;
public class AtmosphericConditions
{
public Temperature Temperature { get; set; }
public Pressure Pressure { get; set; }
public RelativeHumidity Humidity { get; set; }
-}
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/LightConditions.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/LightConditions.cs
similarity index 67%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/LightConditions.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/LightConditions.cs
index 158245c9..54fe0318 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/LightConditions.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/LightConditions.cs
@@ -1,8 +1,8 @@
using Meadow.Units;
-namespace MeadowConnectedSample.Models;
+namespace ProjectLabConnectivity.Models;
public class LightConditions
{
public Illuminance Illuminance { get; set; }
-}
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/MotionConditions.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/MotionConditions.cs
similarity index 77%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/MotionConditions.cs
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/MotionConditions.cs
index 32e1a969..01e179e3 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Models/MotionConditions.cs
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Models/MotionConditions.cs
@@ -1,9 +1,10 @@
using Meadow.Units;
-namespace MeadowConnectedSample.Models;
+namespace ProjectLabConnectivity.Models;
public class MotionConditions
{
public Acceleration3D Acceleration3D { get; set; }
+
public AngularVelocity3D AngularVelocity3D { get; set; }
}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/MeadowConnectedSample.csproj b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/ProjectLabConnectivity.csproj
similarity index 87%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/MeadowConnectedSample.csproj
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/ProjectLabConnectivity.csproj
index 59be57c6..dfd9f8f6 100644
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/MeadowConnectedSample.csproj
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/ProjectLabConnectivity.csproj
@@ -7,8 +7,6 @@
10.0
-
-
@@ -32,5 +30,5 @@
PreserveNewest
-
+
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_ble.bmp b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_ble.bmp
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_ble.bmp
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_ble.bmp
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_ble_fade.bmp b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_ble_fade.bmp
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_ble_fade.bmp
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_ble_fade.bmp
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_meadow.bmp b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_meadow.bmp
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_meadow.bmp
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_meadow.bmp
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_wifi.bmp b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_wifi.bmp
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_wifi.bmp
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_wifi.bmp
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_wifi_fade.bmp b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_wifi_fade.bmp
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/Resources/img_wifi_fade.bmp
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/Resources/img_wifi_fade.bmp
diff --git a/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Secrets.cs b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Secrets.cs
new file mode 100644
index 00000000..67f0b839
--- /dev/null
+++ b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/Secrets.cs
@@ -0,0 +1,14 @@
+namespace ProjectLabConnectivity;
+
+public class Secrets
+{
+ ///
+ /// Name of the WiFi network to use.
+ ///
+ public const string WIFI_NAME = "PNEUMA";
+
+ ///
+ /// Password for the WiFi network names in WIFI_NAME.
+ ///
+ public const string WIFI_PASSWORD = "Miles0608";
+}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/app.config.yaml b/Source/ProjectLab/Connectivity/ProjectLabConnectivity/app.config.yaml
similarity index 100%
rename from Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle/app.config.yaml
rename to Source/ProjectLab/Connectivity/ProjectLabConnectivity/app.config.yaml
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/ClimateModel.cs b/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/ClimateModel.cs
deleted file mode 100644
index af149618..00000000
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/ClimateModel.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace CommonContracts.Models
-{
- public class ClimateModel
- {
- public string? Temperature { get; set; }
-
- public string? Pressure { get; set; }
-
- public string? Humidity { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/IlluminanceModel.cs b/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/IlluminanceModel.cs
deleted file mode 100644
index a8071a25..00000000
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/IlluminanceModel.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace CommonContracts.Models
-{
- public class IlluminanceModel
- {
- public string? Illuminance { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/MotionModel.cs b/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/MotionModel.cs
deleted file mode 100644
index eea9b306..00000000
--- a/Source/ProjectLab/ProjectLabWiFiBle/ProjectLabWiFiBle.Common/Models/MotionModel.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace Connectivity.Common.Models
-{
- public class MotionModel
- {
- public string Acceleration3dX { get; set; }
- public string Acceleration3dY { get; set; }
- public string Acceleration3dZ { get; set; }
-
- public string AngularVelocity3dX { get; set; }
- public string AngularVelocity3dY { get; set; }
- public string AngularVelocity3dZ { get; set; }
-
- public string Temperature { get; set; }
- }
-}
\ No newline at end of file