Skip to content

Show the screensaver timers in seconds instead of microseconds - #364

Open
mglushko wants to merge 1 commit into
hrvach:mainfrom
mglushko:screensaver-seconds
Open

Show the screensaver timers in seconds instead of microseconds#364
mglushko wants to merge 1 commit into
hrvach:mainfrom
mglushko:screensaver-seconds

Conversation

@mglushko

@mglushko mglushko commented Aug 20, 2026

Copy link
Copy Markdown

The screensaver idle and max times are the only settings on the config page in a unit nobody thinks in: four minutes of idle time is typed in as 240000000. Everything else is a count, a coordinate or a checkbox. Asked for in #27.

FormField gains a scale - how many of the units the device stores go into one of the units the form shows - which form.html passes through as data-scale, and script.js applies at the two points where a value crosses between the page and the wire:

  • updateElement, on the way in, so the field and its fetched-value are both in the unit shown and valueChangedHandler still only sends what actually changed;
  • packValue, on the way out.

Only fields 11 and 12 set it, so every other input renders byte for byte as before.

The ceiling is unchanged: both timers are read back as a uint32 of microseconds, so anything past ~4294 seconds wraps exactly as it did when the same number was typed out in full.

Regenerated config.htm, config-unpacked.htm and disk/disk.img are included, since the tree tracks them.

The idle and max times are the only settings on the page in a unit nobody thinks in: four
minutes of idle time is typed in as 240000000. Everything else is a count, a coordinate or
a checkbox.

FormField gains a scale - how many of the units the device stores go into one of the units
the form shows - which form.html passes through as data-scale, and script.js applies at
the two points where a value crosses between the page and the wire: updateElement on the
way in, so the field and its fetched-value are both in the unit shown and
valueChangedHandler still only sends what actually changed, and packValue on the way out.

Only fields 11 and 12 set it, so every other input renders byte for byte as before. The
ceiling is unchanged: both timers are read back as a uint32 of microseconds, so anything
past ~4294 seconds wraps exactly as it did when the same number was typed out in full.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant