summaryrefslogtreecommitdiffstats
path: root/Smol Watch Project/My Project/mars_clock.c
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-04-30 09:52:09 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-04-30 09:52:09 -0400
commit68bada3006a627e704680c0161f597e585b37e7f (patch)
treef6a24e31423dba951657fde0ddaa6cec126a22af /Smol Watch Project/My Project/mars_clock.c
parenta17d64bd1117929451495f141c63c215ba6cb4aa (diff)
downloadSensor-Watch-68bada3006a627e704680c0161f597e585b37e7f.tar.gz
Sensor-Watch-68bada3006a627e704680c0161f597e585b37e7f.tar.bz2
Sensor-Watch-68bada3006a627e704680c0161f597e585b37e7f.zip
interrupts, clock demo with interrupts
Diffstat (limited to 'Smol Watch Project/My Project/mars_clock.c')
-rw-r--r--Smol Watch Project/My Project/mars_clock.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/Smol Watch Project/My Project/mars_clock.c b/Smol Watch Project/My Project/mars_clock.c
new file mode 100644
index 00000000..1bafa023
--- /dev/null
+++ b/Smol Watch Project/My Project/mars_clock.c
@@ -0,0 +1,17 @@
+/*
+ * mars_clock.c
+ *
+ * Created: 4/29/2021 11:36:26 PM
+ * Author: joeycastillo
+ */
+#include <stdio.h>
+#include <math.h>
+#include "mars_clock.h"
+
+// note: mars time not working, committing just the earth clock.
+
+void update_display(Watch *watch, struct calendar_date_time date_time, bool local) {
+ char buf[6];
+ sprintf(&buf[0], "TE %02d%02d", date_time.time.hour, date_time.time.min);
+ watch_display_string(watch, buf, 0);
+}