FwUpdate: binary firmware chunks over the mesh (REQ_TYPE_FW_OTA 0xF0)

This commit is contained in:
tth committed 2026-11-13 00:55:06 +01:00
1 parent 5f8788c4b4
commit 637b0d78b7
7 files changed
+126 -28

No files matched your search

+8
View File
@@ -477,6 +477,14 @@ int MyMesh::handleRequest(ClientInfo *sender, uint32_t sender_timestamp, uint8_t
// memcpy(reply_data, &now, 4); // response packets always prefixed with timestamp
memcpy(reply_data, &sender_timestamp, 4); // reflect sender_timestamp back in response packet (kind of like a 'tag')
// CUSTOM (TeTeHacko): firmware chunks for FwUpdate (REQ_TYPE_FW_OTA = 0xF0, admin
// only, helpers/FwUpdate.h). 0 = no reply: chunks are fire and forget.
if (payload_len >= 1 && payload[0] == 0xF0) {
extern int maintHandleRequest(bool admin, const uint8_t* req, int len, uint8_t* reply, int reply_max);
int n = maintHandleRequest(sender->isAdmin(), payload, (int)payload_len, &reply_data[4], 160);
return n > 0 ? 4 + n : 0;
}
if (payload[0] == REQ_TYPE_GET_STATUS) { // guests can also access this now
RepeaterStats stats;
stats.batt_milli_volts = board.getBattMilliVolts();