public DiagnosticEvent GetDiagnosticDataEvent()
        {
            var networkConfig = WifiDriver.GetNetworkConfig();

            return(new DiagnosticEvent(networkConfig.Ssid, networkConfig.Rssi, networkConfig.Ip,
                                       networkConfig.GatewayIp, nanoFramework.Runtime.Native.GC.Run(false)));
        }
Exemple #2
0
        public ServiceFactory InitWifi()
        {
            WifiDriver.OnWifiConnected        += () => { _driversFactory.StatusLed.SetWifiConnected(); };
            WifiDriver.OnWifiDisconnected     += () => { _driversFactory.StatusLed.SetWifiDisconnected(); };
            WifiDriver.OnWifiDuringConnection += () => { _driversFactory.StatusLed.SetWifiDuringConnection(); };
            WifiDriver.ConnectToNetwork();
            Logger.Log(() => $"Free memory after connected to wifi {GC.Run(false)}");

            return(this);
        }