Skip to content

Commit

Permalink
Workaround for GH Issue 293
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgedevs committed Feb 21, 2024
1 parent ba52581 commit 096a17a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions Source/GnssTracker/GnssTrackerHardwareV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public GnssTrackerHardwareV2(IF7CoreComputeMeadowDevice device, II2cBus i2cBus)
base.device = device;

I2cBus = i2cBus;

// TODO: Workaround for https://github.com/WildernessLabs/Meadow_Issues/issues/293
InitializeOnboardRgbLed();
}

private IRgbPwmLed? GetOnboardRgbLed()
Expand Down
40 changes: 20 additions & 20 deletions Source/GnssTracker_Demo/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public override Task Initialize()
accelerometer.Updated += AccelerometerUpdated; ;
}

if (gnssTracker.BatteryVoltageInput is { } batteryVoltage)
if (gnssTracker.BatteryVoltageInput is { } batteryvoltage)
{
batteryVoltage.Updated += BatteryVoltageUpdated;
batteryvoltage.Updated += BatteryVoltageUpdated;
}

if (gnssTracker.SolarVoltageInput is { } solarVoltage)
Expand Down Expand Up @@ -95,24 +95,6 @@ public override Task Initialize()
return Task.CompletedTask;
}

private void GnssRmcReceived(object sender, GnssPositionInfo e)
{
if (e.Valid)
{
ReportGNSSPosition(e);
lastGNSSPosition = e;
}
}

private void GnssGllReceived(object sender, GnssPositionInfo e)
{
if (e.Valid)
{
ReportGNSSPosition(e);
lastGNSSPosition = e;
}
}

private void TemperatureSensorUpdated(object sender, IChangeResult<Temperature> e)
{
Resolver.Log.Info($"TEMPERATURE: {e.New.Celsius:N1}C");
Expand Down Expand Up @@ -160,6 +142,24 @@ private void SolarVoltageUpdated(object sender, IChangeResult<Voltage> e)
solarVoltage = e.New;
}

private void GnssRmcReceived(object sender, GnssPositionInfo e)
{
if (e.Valid)
{
ReportGNSSPosition(e);
lastGNSSPosition = e;
}
}

private void GnssGllReceived(object sender, GnssPositionInfo e)
{
if (e.Valid)
{
ReportGNSSPosition(e);
lastGNSSPosition = e;
}
}

private void ReportGNSSPosition(GnssPositionInfo e)
{
if (e.Valid)
Expand Down

0 comments on commit 096a17a

Please sign in to comment.