#include <string.h>
#include "action_util.h"
#include "led.h"
+#include "resources/resources.h"
bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)animation;
gdispClear(White);
gdispDrawString(0, 10, state->layer_text, state->font_dejavusansbold12, Black);
- gdispFlush();
return false;
}
gdispDrawString(0, 10, layer_buffer, state->font_fixed5x8, Black);
format_layer_bitmap_string(state->status.default_layer >> 16, state->status.layer >> 16, layer_buffer);
gdispDrawString(0, 20, layer_buffer, state->font_fixed5x8, Black);
- gdispFlush();
return false;
}
format_mods_bitmap_string(state->status.mods, status_buffer);
gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black);
- gdispFlush();
return false;
}
pos += 5;
}
if (state->status.leds & (1u << USB_LED_KANA)) {
- memcpy(output + pos, "KANA ", 5);
- pos += 5;
+ memcpy(output + pos, "KANA", 4);
+ pos += 4;
}
output[pos] = 0;
}
get_led_state_string(output, state);
gdispClear(White);
gdispDrawString(0, 10, output, state->font_dejavusansbold12, Black);
- gdispFlush();
return false;
}
y = 17;
}
gdispDrawString(0, y, state->layer_text, state->font_dejavusansbold12, Black);
- gdispFlush();
+ return false;
+}
+
+bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* state) {
+ (void)state;
+ (void)animation;
+ // Read the uGFX documentation for information how to use the displays
+ // http://wiki.ugfx.org/index.php/Main_Page
+ gdispClear(White);
+
+ // You can use static variables for things that can't be found in the animation
+ // or state structs, here we use the image
+
+ //gdispGBlitArea is a tricky function to use since it supports blitting part of the image
+ // if you have full screen image, then just use LCD_WIDTH and LCD_HEIGHT for both source and target dimensions
+ gdispGBlitArea(GDISP, 0, 0, LCD_WIDTH, LCD_HEIGHT, 0, 0, LCD_WIDTH, (pixel_t*)resource_lcd_logo);
+
+ return false;
+}
+
+
+bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) {
+ (void)animation;
+ (void)state;
+ gdispSetPowerMode(powerOff);
+ return false;
+}
+
+bool lcd_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) {
+ (void)animation;
+ (void)state;
+ gdispSetPowerMode(powerOn);
return false;
}