Skip to content

Commit

Permalink
Merge pull request #136 from es-ude/126-implement-blinking-leds-when-…
Browse files Browse the repository at this point in the history
…ready-for-throw

feat(wrist): implement blinking leds when device is ready to measure
  • Loading branch information
HerrCooker authored Oct 12, 2023
2 parents 2b10105 + bd15e7b commit 5bef549
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Wrist.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ _Noreturn void getGValueTask(void) {
}
newBatchRequested = false;

env5HwLedsInit();
gpio_put(LED0_PIN, 1);
freeRtosTaskWrapperTaskSleep(1000);
gpio_put(LED1_PIN, 1);
freeRtosTaskWrapperTaskSleep(1000);
gpio_put(LED2_PIN, 1);
freeRtosTaskWrapperTaskSleep(1000);
env5HwLedsAllOff();
freeRtosTaskWrapperTaskSleep(250);
env5HwLedsAllOn();
freeRtosTaskWrapperTaskSleep(250);
env5HwLedsAllOff();

snprintf(timeBuffer, sizeof(timeBuffer), "%llu", time_us_64() / 1000000);
strcpy(data, timeBuffer);
strcat(data, ",");
Expand Down Expand Up @@ -206,6 +219,7 @@ _Noreturn void getGValueTask(void) {
strcat(data, zBuffer);
strcat(data, ";");
count += 1;
printf("%lu", count);
}
if (count > 0) {
newBatchAvailable = true;
Expand Down

0 comments on commit 5bef549

Please sign in to comment.