add reboot message

This commit is contained in:
Kevin Hester
2021-03-27 10:19:59 +08:00
parent 7e9e33d462
commit 8ffd5a1d4f
8 changed files with 30 additions and 15 deletions

View File

@@ -16,7 +16,6 @@
int16_t updateResultHandle = -1;
static CRC32 crc;
static uint32_t rebootAtMsec = 0; // If not zero we will reboot at this time (used to reboot shortly after the update completes)
static uint32_t updateExpectedSize, updateActualSize;
static uint8_t update_result;
@@ -139,14 +138,6 @@ int update_region_callback(uint16_t conn_handle, uint16_t attr_handle, struct bl
return chr_readwrite8(&update_region, sizeof(update_region), ctxt);
}
void bluetoothRebootCheck()
{
if (rebootAtMsec && millis() > rebootAtMsec) {
DEBUG_MSG("Rebooting for update\n");
ESP.restart();
}
}
/*
See bluetooth-api.md