fix: review fixes for the OTA slot

- The field is hasOtaSlot, like hasEthernet and the other "has" bools.
- The web UI shows the device's reason for any failed upload, not only
  for /restore, so it shows "no OTA slot" from a page that missed the
  header. The update routes' 500 replies give Update.errorString()
  instead of an empty reason.
- Native: the writer leaves hasOtaSlot out when true and writes "os":0.
- e2e: header() next to uptime(); the test skips on firmware without
  the field instead of failing, and matches the reason loosely. The
  README says what the test sends.
- PROTOCOL.md and the comments name only the builds that exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-28 22:19:27 +01:00
parent 5721d34a34
commit 657b345eaf
13 changed files with 41 additions and 38 deletions

View file

@ -145,7 +145,7 @@ bool ConfigSettings::begin() {
break;
}
ESP_LOGD(TAG, "Chip Model ESP32-%s", this->chipModel);
this->otaSlot = esp_ota_get_next_update_partition(nullptr) != nullptr;
this->hasOtaSlot = esp_ota_get_next_update_partition(nullptr) != nullptr;
this->fwVersion.parse(FW_VERSION);
uint64_t mac = ESP.getEfuseMac();
for(int i=0; i<17; i=i+8) {