mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-24 01:16:55 +00:00
- fix conditional include for nRF52 (no OTA there)
- fix compiler warning in Canned Messages
This commit is contained in:
parent
30b1bd85d9
commit
20eaddee58
@ -108,12 +108,16 @@ bool AdminModule::handleReceivedProtobuf(const MeshPacket &mp, AdminMessage *r)
|
||||
}
|
||||
case AdminMessage_reboot_ota_seconds_tag: {
|
||||
int32_t s = r->reboot_ota_seconds;
|
||||
#ifdef ARCH_ESP32
|
||||
if (BleOta::getOtaAppVersion().isEmpty()) {
|
||||
DEBUG_MSG("No OTA firmware available, just rebooting\n");
|
||||
DEBUG_MSG("No OTA firmware available, scheduling regular reboot in %d seconds\n", s);
|
||||
}else{
|
||||
BleOta::switchToOtaApp();
|
||||
DEBUG_MSG("Rebooting to OTA in %d seconds\n", s);
|
||||
}
|
||||
DEBUG_MSG("Rebooting to OTA in %d seconds\n", s);
|
||||
#else
|
||||
DEBUG_MSG("Not on ESP32, scheduling regular reboot in %d seconds\n", s);
|
||||
#endif
|
||||
rebootAtMsec = (s < 0) ? 0 : (millis() + s * 1000);
|
||||
break;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
if(this->dest == NODENUM_BROADCAST) {
|
||||
this->dest = nodeDB.getNodeNum();
|
||||
}
|
||||
for (int i = 0; i < numNodes; i++) {
|
||||
for (unsigned int i = 0; i < numNodes; i++) {
|
||||
if (nodeDB.getNodeByIndex(i)->num == this->dest) {
|
||||
this->dest = (i > 0) ? nodeDB.getNodeByIndex(i-1)->num : nodeDB.getNodeByIndex(numNodes-1)->num;
|
||||
break;
|
||||
@ -313,7 +313,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
if(this->dest == NODENUM_BROADCAST) {
|
||||
this->dest = nodeDB.getNodeNum();
|
||||
}
|
||||
for (int i = 0; i < numNodes; i++) {
|
||||
for (unsigned int i = 0; i < numNodes; i++) {
|
||||
if (nodeDB.getNodeByIndex(i)->num == this->dest) {
|
||||
this->dest = (i < numNodes-1) ? nodeDB.getNodeByIndex(i+1)->num : nodeDB.getNodeByIndex(0)->num;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user