kopia lustrzana https://github.com/meshtastic/firmware
Fix a crash on Native reboot (#7570)
rodzic
f2a880f813
commit
8568b56ac6
|
@ -724,10 +724,12 @@ void Power::reboot()
|
||||||
SPI.end();
|
SPI.end();
|
||||||
Wire.end();
|
Wire.end();
|
||||||
Serial1.end();
|
Serial1.end();
|
||||||
if (screen)
|
if (screen) {
|
||||||
delete screen;
|
delete screen;
|
||||||
|
screen = nullptr;
|
||||||
|
}
|
||||||
LOG_DEBUG("final reboot!");
|
LOG_DEBUG("final reboot!");
|
||||||
reboot();
|
::reboot();
|
||||||
#elif defined(ARCH_STM32WL)
|
#elif defined(ARCH_STM32WL)
|
||||||
HAL_NVIC_SystemReset();
|
HAL_NVIC_SystemReset();
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -17,7 +17,10 @@ void initApiServer(int port)
|
||||||
}
|
}
|
||||||
void deInitApiServer()
|
void deInitApiServer()
|
||||||
{
|
{
|
||||||
delete apiPort;
|
if (apiPort) {
|
||||||
|
delete apiPort;
|
||||||
|
apiPort = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WiFiServerAPI::WiFiServerAPI(WiFiClient &_client) : ServerAPI(_client)
|
WiFiServerAPI::WiFiServerAPI(WiFiClient &_client) : ServerAPI(_client)
|
||||||
|
|
Ładowanie…
Reference in New Issue