CarpeNoctem / Sensor-Watch

A board replacement for the classic Casio F-91W wristwatch
Other
1 stars 0 forks source link

Simple Tide - Bugfix - Broken Tide Updates on User Date Change #10

Closed CarpeNoctem closed 2 months ago

CarpeNoctem commented 2 months ago

See these two comments: one, two 1) Update the next tide setting to set for definitely either today or tomorrow. 2) (Maybe?) update the tide prediction function to detect whether the date of the current-set next high/low is set for a way different date than it should be. I'm leaning against this because I think it would interfere with the roll-forward code... At the very least, maybe we can do a check where, if the next high/low is more than one day in the future, we set them to NULL to trigger the "not set" message and get the user to set these again. And I guess we could have a maximum number of day s that we're willing to roll forward before we tell the user they should just set the tide again. Maybe 365 days?

CarpeNoctem commented 2 months ago

The user can at least now re-set their tide times. We should ensure that the doco lets the user know that they should do this if they ever adjust the date on their watch.

CarpeNoctem commented 2 months ago

Update: Whoops. There were various problems with that last "fix". As it only changes the day, the month can still be completely wrong. Need to work on this some more...

CarpeNoctem commented 2 months ago

Okay. Being able to re-set the tide times is now possible again as of commit 4472bff. Added scratch time hours and minutes placeholders, and did a bit of clean-up along the way.

There isn't a very built-in or intuitive way to 100% protect us from the user changing the date on their watch, but at least they can recover this face from that scenario now by setting the tide times again.

Calling this done for now.

CarpeNoctem commented 2 months ago

That last commit seems to have broken the tide recalculation function? Opening #15. EDIT: Scratch that - it was a firmware bug, fixed here: https://github.com/joeycastillo/Sensor-Watch/commit/76b580a5be70df3e06dadb42fe328d66e1f83d31 (this branch was started after prior to that commit)

On a positive note, it contained the fix for #13.