summaryrefslogtreecommitdiff
path: root/keyboards/moonlander/moonlander.c
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2020-04-24 19:51:20 -0700
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-02 16:22:32 +0900
commit44108e524dc362f1bb9478ab24abc2ab18003fdb (patch)
treed23dad7c3b598de0dd2100e63020418c5e112d6b /keyboards/moonlander/moonlander.c
parent4e98025d2eadfdedc28952460905be60f78f8675 (diff)
Enable LED Blinking for Dynamic Macro Recording status for Moonlander
Diffstat (limited to 'keyboards/moonlander/moonlander.c')
-rw-r--r--keyboards/moonlander/moonlander.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index ae043080f1..28fd8fdd6c 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -25,6 +25,19 @@ keyboard_config_t keyboard_config;
bool mcp23018_leds[3] = {0, 0, 0};
bool is_launching = false;
+#ifdef DYNAMIC_MACRO_ENABLE
+static bool is_dynamic_recording = false;
+
+void dynamic_macro_record_start_user(void) {
+ is_dynamic_recording = true;
+}
+
+void dynamic_macro_record_end_user(int8_t direction) {
+ is_dynamic_recording = false;
+ ML_LED_3(false);
+}
+#endif
+
void moonlander_led_task(void) {
if (is_launching) {
ML_LED_1(false);
@@ -61,6 +74,14 @@ void moonlander_led_task(void) {
is_launching = false;
layer_state_set_kb(layer_state);
}
+#ifdef DYNAMIC_MACRO_ENABLE
+ else if (is_dynamic_recording) {
+ ML_LED_3(true);
+ wait_ms(100);
+ ML_LED_3(false);
+ wait_ms(155);
+ }
+#endif
#ifdef WEBUSB_ENABLE
else if (webusb_state.pairing == true) {
static uint8_t led_mask;
@@ -107,6 +128,7 @@ void moonlander_led_task(void) {
wait_ms(150);
}
#endif
+
}
static THD_WORKING_AREA(waLEDThread, 128);