| 76 | } |
| 77 | |
| 78 | void onReady() |
| 79 | { |
| 80 | Serial.print("Calibrating CPU usage..."); |
| 81 | cpuUsage.begin([]() { |
| 82 | |
| 83 | #ifndef DISABLE_WIFI |
| 84 | // If you want, you can define WiFi settings globally in Eclipse Environment Variables |
| 85 | #ifdef WIFI_SSID |
| 86 | WifiStation.config(WIFI_SSID, WIFI_PWD); |
| 87 | #endif |
| 88 | WifiStation.enable(true); |
| 89 | WifiAccessPoint.enable(false); |
| 90 | WifiEvents.onStationGotIP([](IpAddress ip, IpAddress netmask, IpAddress gateway) { |
| 91 | Serial << _F("GOTIP - IP: ") << ip << _F(", mask: ") << netmask << _F(", gateway: ") << gateway << endl; |
| 92 | }); |
| 93 | |
| 94 | #endif |
| 95 | |
| 96 | hwtimer.initializeUs<hwTimerInterval>(hwTimerCallback).start(); |
| 97 | reader.resume(); |
| 98 | }); |
| 99 | } |
| 100 | |
| 101 | } // namespace |
| 102 |
no test coverage detected