| 235 | } // namespace |
| 236 | |
| 237 | void init() |
| 238 | { |
| 239 | Serial.begin(SERIAL_BAUD_RATE); // 115200 by default |
| 240 | Serial.systemDebugOutput(true); // Debug output to serial |
| 241 | |
| 242 | // mount spiffs |
| 243 | auto partition = ota.getRunningPartition(); |
| 244 | spiffsPartition = findSpiffsPartition(partition); |
| 245 | if(spiffsPartition) { |
| 246 | debugf("trying to mount %s @ 0x%08x, length %d", spiffsPartition.name().c_str(), spiffsPartition.address(), |
| 247 | spiffsPartition.size()); |
| 248 | spiffs_mount(spiffsPartition); |
| 249 | } |
| 250 | |
| 251 | WifiAccessPoint.enable(false); |
| 252 | WifiEvents.onStationGotIP([](IpAddress ip, IpAddress netmask, IpAddress gateway) { showPrompt(); }); |
| 253 | |
| 254 | Serial << endl |
| 255 | << _F("Currently running ") << partition.name() << " @ 0x" << String(partition.address(), HEX) << '.' << endl |
| 256 | << _F("Type 'help' and press enter for instructions.") << endl |
| 257 | << endl; |
| 258 | |
| 259 | showPrompt(); |
| 260 | |
| 261 | Serial.onDataReceived(serialCallBack); |
| 262 | } |
nothing calls this directly
no test coverage detected