feat(cli): support relative minutes in radio schedules

This commit is contained in:
mikecarper committed 2026-09-23 00:19:12 -07:00
1 parent 7c9cb59400
commit ff50589b69
8 files changed
+121 -16

No files matched your search

+8 -2
View File
@@ -1285,11 +1285,17 @@ intervals and the 24-hour watchdog policy. An explicitly saved normal-mode
- `bw`: Bandwidth in kHz (same allowed values as `set radio`)
- `sf`: Spreading factor (5-12)
- `cr`: Coding rate (5-8)
- `start_time`: Unix epoch time when the setting starts
- `end_time`: Unix epoch time when a temporary setting reverts
- `start_time`: UTC Unix epoch seconds, or `+N` for N whole minutes from now
- `end_time`: UTC Unix epoch seconds, or `+N` for N whole minutes from now
- `n`: Scheduled entry number from `get radioat` or `get tempradioat`
**Notes:**
- Both relative endpoints use the same command-time snapshot of the node clock.
For example, `set tempradioat 910.5,500,8,5,+5,+15` starts in 5 minutes
and reverts in 15 minutes (10 minutes active). `set radioat 910.5,500,8,5,+5`
schedules a saved change in 5 minutes. Bare numbers remain absolute timestamps;
absolute and relative endpoints can be mixed. Relative offsets must be positive.
The existing scheduler and clock behavior are unchanged.
- `get radioat` and `get tempradioat` list all entries when `n` is omitted.
- `del radioat` and `del tempradioat` delete all entries when `n` is omitted.
- Each queue supports 3 entries. Scheduled entries are not saved across reboot.
+10 -2
View File
@@ -427,7 +427,7 @@ See the [implementation and validation notes](radio_dwell_policy_validation.md).
## Schedule the second profile
Use UTC Unix timestamps (seconds):
Use UTC Unix timestamps (seconds), or `+N` for N whole minutes from now:
```text
set radioat2 910.5,500,8,5,rxtx,START[,PREAMBLE]
@@ -440,12 +440,20 @@ del radioat2 1
del tempradioat2 all
```
Replace `START`, `END` and the optional `PREAMBLE` with numbers; omit the square
Replace `START` and `END` with timestamps or `+N`, and the optional `PREAMBLE`
with a number; omit the square
brackets. Each schedule family has four slots. Times must be in the future and
within 24 days. Overlapping temporary second-profile sessions are rejected.
`radioat2` changes the saved second profile when it starts; `tempradioat2`
restores the saved profile at its end. Pending schedules do not survive reboot.
For example, `set tempradioat2 910.5,500,8,5,rxtx,+5,+15` starts in 5 minutes
and restores in 15 minutes (10 minutes active). Both offsets are measured from
the same node-clock snapshot when accepting the command, not from each other.
`set radioat2 910.5,500,8,5,rxtx,+5` schedules a saved change in 5 minutes.
Offsets must be positive whole minutes. Absolute and relative endpoints can be
mixed; bare numbers still mean UTC seconds. Existing clock requirements apply.
## Return to one profile
```text