Show the screensaver timers in seconds instead of microseconds - #364
Open
mglushko wants to merge 1 commit into
Open
Show the screensaver timers in seconds instead of microseconds#364mglushko wants to merge 1 commit into
mglushko wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.FormFieldgains ascale- how many of the units the device stores go into one of the units the form shows - whichform.htmlpasses through asdata-scale, andscript.jsapplies at the two points where a value crosses between the page and the wire:updateElement, on the way in, so the field and itsfetched-valueare both in the unit shown andvalueChangedHandlerstill 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
uint32of 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.htmanddisk/disk.imgare included, since the tree tracks them.