Browse Source

Fix layer state not being updated, and add a define for the thread sleep

Signed-off-by: Saikrishna Arcot <saiarcot895@gmail.com>
pull/23278/head
Saikrishna Arcot 1 month ago
parent
commit
4f751cbd52
No known key found for this signature in database GPG Key ID: B986B6273868DFCF
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      keyboards/zsa/moonlander/moonlander.c

+ 6
- 2
keyboards/zsa/moonlander/moonlander.c View File

@ -18,6 +18,10 @@
#include "moonlander.h"
#ifndef MOONLANDER_THREAD_INTERVAL_MS
# define MOONLANDER_THREAD_INTERVAL_MS 100
#endif // MOONLANDER_THREAD_INTERVAL_MS
keyboard_config_t keyboard_config;
bool mcp23018_leds[3] = {0, 0, 0};
@ -82,7 +86,7 @@ void moonlander_led_task(void) {
else {
static layer_state_t state = 0;
if (layer_state != state) {
layer_state_set_kb(layer_state);
state = layer_state_set_kb(layer_state);
}
}
#endif
@ -94,7 +98,7 @@ static THD_FUNCTION(LEDThread, arg) {
chRegSetThreadName("LEDThread");
while (true) {
moonlander_led_task();
wait_ms(100);
wait_ms(MOONLANDER_THREAD_INTERVAL_MS);
}
}


Loading…
Cancel
Save