Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgedevs committed Feb 27, 2024
1 parent 428475f commit 5dffec8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/Cellular/Cell_Basics/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async void CellAdapter_NetworkConnected(INetworkAdapter networkAdapter, NetworkC
}
}

void CellAdapter_NetworkDisconnected(INetworkAdapter networkAdapter)
void CellAdapter_NetworkDisconnected(INetworkAdapter sender, NetworkDisconnectionEventArgs args)
{
Console.WriteLine("Cell network disconnected!");
}
Expand Down
5 changes: 3 additions & 2 deletions Source/IO/DigitalInterruptPort_Basics/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ public override Task Initialize()
var observer = IDigitalInterruptPort.CreateObserver(
handler: result =>
{
Resolver.Log.Info($"Observer filter satisfied, time: {result.New.Time.ToShortTimeString()}");
Resolver.Log.Info($"Observer filter satisfied, time: {result.New.Time}");
},
// Optional filter paramter, showing a 1 second filter, i.e., only notify
// if the new event is > 1 second from last time it was notified.
filter: result =>
{
if (result.Old is { } old)
{ // C# 8 null pattern matching for not null
return (result.New.Time - old.Time) > TimeSpan.FromSeconds(1);
//return (result.New.Time - old.Time) > TimeSpan.FromSeconds(1);
return (result.New.Time - old.Time) > TimeSpan.FromSeconds(1).TotalSeconds;
}
else return false;
}
Expand Down
7 changes: 2 additions & 5 deletions Source/Network/WiFi_Config/MeadowApp.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using Meadow;
using Meadow.Devices;
using Meadow.Foundation;
using Meadow.Foundation.Leds;
using Meadow.Hardware;
using Meadow.Peripherals.Leds;
using System;
using System.Threading.Tasks;

namespace MeadowApp
Expand Down Expand Up @@ -49,7 +45,8 @@ void WireUpWiFiStatusEvents()
Resolver.Log.Info($"Joined network - IP Address: {networkAdapter.IpAddress}");
};
// disconnect event
wifi.NetworkDisconnected += sender => {
wifi.NetworkDisconnected += (o, e) =>
{
Resolver.Log.Info($"Network disconnected.");
};
}
Expand Down
2 changes: 1 addition & 1 deletion Source/OS/Update/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override Task Initialize()
{
Resolver.UpdateService.OnUpdateAvailable += (s, e) =>
{
Resolver.Log.Info($"An {e.UpdateType} update is available! Version: {e.Version} Size: {e.DownloadSize}");
Resolver.Log.Info($"An {e.UpdateType} update is available! Version: {e.Version} Size: {e.FileSize}");
Resolver.Log.Info("Retrieving update...");
_stopWatch = Stopwatch.StartNew();
Expand Down

0 comments on commit 5dffec8

Please sign in to comment.