Skip to content

Commit

Permalink
fix for activity led
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Nov 11, 2024
1 parent 5666a38 commit 0c1dee4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions microcontrollers/main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void fail_flash() {
write_led(led_yellow, LOW);

for(;;) {
bool state = get_millis() & 256;
bool state = get_millis() & 1024;
#ifdef LED_BUILTIN
digitalWrite(LED_BUILTIN, state);
#endif
Expand Down Expand Up @@ -369,7 +369,7 @@ void loopw(void *)

#ifdef LED_BUILTIN
if (s)
digitalWrite(LED_BUILTIN, cu_count >= 20 && s->is_active());
digitalWrite(LED_BUILTIN, ((cu_count / 10) & 1) && s->is_active());
#endif

ntp.update();
Expand Down
2 changes: 1 addition & 1 deletion server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ bool server::is_active()
bool active = false;
std::unique_lock<std::mutex> lck(threads_lock);
for(auto &e: threads)
active |= !e.second;
active |= !*e.second;
#endif
return active;
}
Expand Down

0 comments on commit 0c1dee4

Please sign in to comment.