joeycastillo / Sensor-Watch

A board replacement for the classic Casio F-91W wristwatch
Other
1.17k stars 234 forks source link

Added ability to make default time on the watch be PC clock's during … #414

Open voloved opened 3 months ago

voloved commented 3 months ago

When running make, you can include DATE=, which will set the default time on the watch to the PC's. Below are example outputs of the setting.

user@DESKTOP-UCQND0L:~/sensorWatch/Sensor-Watch/movement/make$ make COLOR=RED
git submodule update --init
size:
   text    data     bss     dec     hex filename
 109436    2676   11604  123716   1e344 build/watch.elf
 109436    2676   11604  123716   1e344 (TOTALS)

user@DESKTOP-UCQND0L:~/sensorWatch/Sensor-Watch/movement/make$ make COLOR=RED DATE=YEAR
Default year and timezone are set to 2024 EDT
git submodule update --init
size:
   text    data     bss     dec     hex filename
 109436    2676   11604  123716   1e344 build/watch.elf
 109436    2676   11604  123716   1e344 (TOTALS)

user@DESKTOP-UCQND0L:~/sensorWatch/Sensor-Watch/movement/make$ make COLOR=RED DATE=DAY
Default date set to Jul 07 2024 EDT
git submodule update --init
size:
   text    data     bss     dec     hex filename
 109436    2676   11604  123716   1e344 build/watch.elf
 109436    2676   11604  123716   1e344 (TOTALS)

user@DESKTOP-UCQND0L:~/sensorWatch/Sensor-Watch/movement/make$ make COLOR=RED DATE=MIN
Default time set to 12:45 on Jul 07 2024 EDT
git submodule update --init
size:
   text    data     bss     dec     hex filename
 109436    2676   11604  123716   1e344 build/watch.elf
 109436    2676   11604  123716   1e344 (TOTALS)

user@DESKTOP-UCQND0L:~/sensorWatch/Sensor-Watch/movement/make$ make COLOR=RED DATE=foo
../../make.mk:276: *** DATE must be YEAR, DAY, or MIN if used..  Stop.

Context in Discord

matheusmoreira commented 4 weeks ago

This is a good PR but since movement 2.0 will bring about a new build system it seems pointless to merge this in right now. Let's wait and revisit this after the refactoring is done!