|
@@ -167,7 +167,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
#ifdef OLED_ENABLE
|
|
|
|
|
|
bool show_lock = true;
|
|
|
-bool animate = true;
|
|
|
|
|
|
static void render_logo(void) {
|
|
|
static const char PROGMEM no_qmk[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
@@ -230,7 +229,6 @@ static const char PROGMEM mac_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
|
|
|
|
|
|
|
uint32_t anim_timer = 0;
|
|
|
-uint32_t anim_sleep = 0;
|
|
|
|
|
|
|
|
|
uint8_t current_frame = 0;
|
|
@@ -322,36 +320,36 @@ static void render_luna(int LUNA_X, int LUNA_Y) {
|
|
|
|
|
|
|
|
|
if (led_usb_state.caps_lock) {
|
|
|
- oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE);
|
|
|
+ oled_write_raw_P(bark[current_frame], ANIM_SIZE);
|
|
|
|
|
|
} else if (isSneaking) {
|
|
|
- oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE);
|
|
|
+ oled_write_raw_P(sneak[current_frame], ANIM_SIZE);
|
|
|
|
|
|
} else if (current_wpm <= MIN_WALK_SPEED) {
|
|
|
- oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE);
|
|
|
+ oled_write_raw_P(sit[current_frame], ANIM_SIZE);
|
|
|
|
|
|
} else if (current_wpm <= MIN_RUN_SPEED) {
|
|
|
- oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE);
|
|
|
+ oled_write_raw_P(walk[current_frame], ANIM_SIZE);
|
|
|
|
|
|
} else {
|
|
|
- oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE);
|
|
|
+ oled_write_raw_P(run[current_frame], ANIM_SIZE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION && animate == true) {
|
|
|
- anim_timer = timer_read32();
|
|
|
- animate_luna();
|
|
|
+# if OLED_TIMEOUT > 0
|
|
|
+
|
|
|
+ if (last_input_activity_elapsed() > OLED_TIMEOUT && last_led_activity_elapsed() > OLED_TIMEOUT) {
|
|
|
+ oled_off();
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ oled_on();
|
|
|
}
|
|
|
+# endif
|
|
|
|
|
|
-
|
|
|
- if (current_wpm > 0) {
|
|
|
- oled_on();
|
|
|
- anim_sleep = timer_read32();
|
|
|
- animate = true;
|
|
|
- } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) {
|
|
|
- oled_off();
|
|
|
- animate = false;
|
|
|
+
|
|
|
+ if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
|
|
+ anim_timer = timer_read32();
|
|
|
+ animate_luna();
|
|
|
}
|
|
|
}
|
|
|
|