summaryrefslogtreecommitdiff
path: root/src/lap_counter/lap_counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lap_counter/lap_counter.c')
-rw-r--r--src/lap_counter/lap_counter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lap_counter/lap_counter.c b/src/lap_counter/lap_counter.c
index aa9746d..b52bd8a 100644
--- a/src/lap_counter/lap_counter.c
+++ b/src/lap_counter/lap_counter.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <time.h>
#include "cloud/cloud_communication.h"
+#include "resource/resource_led.h"
#define MIN_LAP_TIME 5
#define MAX_NAME_LENGTH 256
@@ -98,6 +99,7 @@ static inline struct timespec _calculate_lap_time(struct timespec *prev, struct
_D("----------------------------------------------");
cloud_communication_post_lap(lap.tv_sec * 1e3 + lap.tv_nsec / 1e6, s_info.user_name);
+
return lap;
}
@@ -105,12 +107,13 @@ void lap_counter_get_lap_time()
{
struct timespec timestamp;
int ret = clock_gettime(CLOCK_MONOTONIC, &timestamp);
- retv_error_message(ret != 0, ret);
+ ret_error_message(ret != 0, ret);
if (s_info.last_timestamp.tv_nsec != 0 || s_info.last_timestamp.tv_sec != 0) {
_calculate_lap_time(&s_info.last_timestamp, &timestamp);
} else {
_D("Initial lap");
+ resource_led_blink(LED_COLOR_NONE, 1000);
}
s_info.last_timestamp.tv_sec = timestamp.tv_sec;