Constrain agc.reset.interval and allow intervals > 255s

This commit is contained in:
Blake Latchford committed 2026-09-21 12:26:36 -04:00
1 parent 8c7c8f9150
commit e1877c015b
5 files changed
+10 -8

No files matched your search

+3 -1
View File
@@ -165,7 +165,9 @@ bool CommonRadioPrefs::handleCommand(const char* command, uint32_t sender_timest
return true;
}
if (memcmp(command, "set agc.reset.interval ", 23) == 0) {
setAgcResetInt(atoi(&command[23]));
int secs = atoi(&command[23]);
secs = constrain(secs, 0, 255 * 4);
setAgcResetInt((uint16_t) secs);
sprintf(reply, "OK - interval rounded to %d", (uint32_t) getAgcResetInt());
return true;
}