Skip to content

Commit

Permalink
Bugfuxes:
Browse files Browse the repository at this point in the history
- Basic Stream fix.
- StandardPayloadParser fix.
  • Loading branch information
slav-at-attachix committed May 25, 2021
1 parent 2a0192b commit 3af0c96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sming/Libraries/OtaUpgrade/OtaUpgrade/BasicStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void BasicStream::processRomHeader()
bool addressMatch = (slot.partition.address() & 0xFFFFF) == (romHeader.address & 0xFFFFF);
if(!slot.updated && addressMatch) {
if(romHeader.size <= slot.partition.size()) {
debug_i("Update slot %s [0x%08X..0x%08X)", slot.partition.name(), slot.partition.address(),
debug_i("Update slot %s [0x%08X..0x%08X)", slot.partition.name().c_str(), slot.partition.address(),
slot.partition.address() + romHeader.size);
ota.begin(slot.partition);
setupChunk(State::WriteRom, romHeader.size);
Expand Down
4 changes: 2 additions & 2 deletions Sming/Libraries/OtaUpgradeMqtt/src/StandardPayloadParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ bool StandardPayloadParser::switchRom(const UpdateState& updateState)
auto before = OtaManager.getBootPartition();
auto after = OtaManager.getNextBootPartition();

debug_d("Swapping from rom %s@%x to rom %s@%s.\r\n", before.name(), before.address(), after.name(),
after.address());
debug_d("Swapping from %s @ 0x%08x to %s @ 0x%08x.\r\n", before.name().c_str(), before.address(),
after.name().c_str(), after.address());

return OtaManager.setBootPartition(after);
}
Expand Down

0 comments on commit 3af0c96

Please sign in to comment.