firmware: rolling-hour duty-cycle guard (0.1% default) with measured justification
This commit is contained in:
@@ -44,6 +44,11 @@ static void handle_set(char *args)
|
||||
} else if (strcmp(key, "repeat_enabled") == 0) {
|
||||
g_cfg.repeat_enabled = (val[0] == '1');
|
||||
ack("set repeat_enabled", true, NULL);
|
||||
} else if (strcmp(key, "duty_budget_ppm") == 0) {
|
||||
long v = strtol(val, NULL, 10);
|
||||
if (v < 0 || v > 100000) { ack("set", false, "range 0..100000 ppm"); return; }
|
||||
g_cfg.duty_budget_ppm = (uint32_t)v;
|
||||
ack("set duty_budget_ppm", true, v == 0 ? "guard disabled" : NULL);
|
||||
} else if (strcmp(key, "preamble_bits") == 0) {
|
||||
long v = strtol(val, NULL, 10);
|
||||
uint8_t code;
|
||||
|
||||
Reference in New Issue
Block a user