BenjaminSoelberg / openchronos-ng-elf

Fully modular opensource firmware for the eZ430 chronos using TI's new msp430-elf-gcc
GNU General Public License v3.0
59 stars 22 forks source link

Add SECONDS digits to clock face. #25

Closed BenjaminSoelberg closed 7 years ago

BenjaminSoelberg commented 7 years ago

Switch between displaying seconds and date using up/down. Seconds is useful to set correct as OTP is very time dependent.

Implementation: It should be possible to see/set the seconds during clock setup. Might be in 30 sec intervals or by resetting sec to 0. Please remember that the time keeping is off during clock setup (time is stopped)

BenjaminSoelberg commented 7 years ago

Email comment from Menehune Dune regarding the (NON) importance of seconds with respect to OTP:

This may not be a problem if you are off by 30 seconds or so the server actually implements lookahead and lookback econds if i can remember correctly so as long as you are within [current time - lookback, current_time + lookahead] the server will accept the otp code this is explained in this section of totp spec from, it would have been amazing to have simpliciTI which can allow a much accurate sync with the host machine updated via ntp.

https://tools.ietf.org/html/rfc6238

Resynchronization Because of possible clock drifts between a client and a validation server, we RECOMMEND that the validator be set with a specific limit to the number of time steps a prover can be "out of synch" before being rejected.

This limit can be set both forward and backward from the calculated time step on receipt of the OTP value. If the time step is 30 seconds as recommended, and the validator is set to only accept two time steps backward, then the maximum elapsed time drift would be around 89 seconds, i.e., 29 seconds in the calculated time step and 60 seconds for two backward time steps.

BenjaminSoelberg commented 7 years ago

Thank you for pointing this out. I'll remove the "OTP importance" comment from the issue.

BenjaminSoelberg commented 7 years ago

fixed in: a3fb5e9 Benjamin Sølberg on 1/31/17 at 12:01 AM Revert bad 'fix' c535e21 Benjamin Sølberg on 1/31/17 at 12:00 AM Fixed and optimized the seconds display so it no longer depends on CONFIG_MOD_CLOCK_BLINKCOL. Added correct up/down button and display handling both during (re)activation/clock setup. Fixed a bug where dow wasn't updated on day changes if displaying seconds. 82b3546 menehune on 1/26/17 at 2:00 PM Display seconds on clock face, press down to toggle between seconds, (month and day) 7bd927e Menehune on 1/26/17 at 9:54 AM Cosmetic changes: MONTH_SEGMENT, SECOND_SEGMENT symbolic constants allow for removal conditional code guards.