summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/binwatch/binwatch.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/binwatch/binwatch.c b/src/binwatch/binwatch.c
index 6057879..d3e9bfb 100644
--- a/src/binwatch/binwatch.c
+++ b/src/binwatch/binwatch.c
@@ -27,6 +27,9 @@
#include "common/button.h"
#include "common/power.h"
+#define BINWATCH_TIME_DISPLAY_DUR (3 * LED_1S)
+#define BINWATCH_ANIM_SPEED (LED_100MS / 2)
+
/** Get time in leds format. */
static uint16_t
binwatch_get_time (void)
@@ -65,21 +68,22 @@ main (void)
/* Initialisation ok, display current time. */
uint16_t time;
time = binwatch_get_time ();
- led_display (time, 3 * LED_1S);
+ led_display (time, BINWATCH_TIME_DISPLAY_DUR);
/* If low voltage detected, wait user press to let clock go. */
if (init == RTC_LOW_VOLTAGE)
{
button_wait ();
rtc_go ();
- led_display (time, 3 * LED_1S);
+ led_display (time, BINWATCH_TIME_DISPLAY_DUR);
}
/* Wait user press to display time. */
while (1)
{
button_wait ();
time = binwatch_get_time ();
- led_animate (time, LED_ANIMATION_TRACE_CCW, LED_100MS / 2);
- led_display (time, 3 * LED_1S);
+ led_animate (time, LED_ANIMATION_TRACE_CCW,
+ BINWATCH_ANIM_SPEED);
+ led_display (time, BINWATCH_TIME_DISPLAY_DUR);
}
}
}