Skip to content

Commit

Permalink
Add check in case running in temporary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Mar 11, 2024
1 parent c9412aa commit 48526a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions samples/Basic_Ota/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ void doUpgrade()
// select rom slot to flash
auto part = ota.getNextBootPartition();

if(part == ota.getRunningPartition()) {
Serial << F("May be running in temporary mode. Please reboot and try again.") << endl;
return;
}

#ifndef RBOOT_TWO_ROMS
// flash rom to position indicated in the rBoot config rom table
otaUpdater->addItem(ROM_0_URL, part);
Expand Down

0 comments on commit 48526a3

Please sign in to comment.