aboutsummaryrefslogtreecommitdiff
path: root/visualizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'visualizer.c')
-rw-r--r--visualizer.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/visualizer.c b/visualizer.c
index ff99e960f..bbb00debc 100644
--- a/visualizer.c
+++ b/visualizer.c
@@ -85,6 +85,15 @@ static remote_object_t* remote_objects[] = {
85GDisplay* LCD_DISPLAY = 0; 85GDisplay* LCD_DISPLAY = 0;
86GDisplay* LED_DISPLAY = 0; 86GDisplay* LED_DISPLAY = 0;
87 87
88__attribute__((weak))
89GDisplay* get_lcd_display(void) {
90 return gdispGetDisplay(0);
91}
92
93__attribute__((weak))
94GDisplay* get_led_display(void) {
95 return gdispGetDisplay(1);
96}
88 97
89void start_keyframe_animation(keyframe_animation_t* animation) { 98void start_keyframe_animation(keyframe_animation_t* animation) {
90 animation->current_frame = -1; 99 animation->current_frame = -1;
@@ -444,10 +453,13 @@ void visualizer_init(void) {
444#ifdef USE_SERIAL_LINK 453#ifdef USE_SERIAL_LINK
445 add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*) ); 454 add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*) );
446#endif 455#endif
447 // TODO: Make sure these works when either of these are disabled
448 LCD_DISPLAY = gdispGetDisplay(0);
449 LED_DISPLAY = gdispGetDisplay(1);
450 456
457#ifdef LCD_ENABLE
458 LCD_DISPLAY = get_lcd_display();
459#endif
460#ifdef LED_ENABLE
461 LED_DISPLAY = get_led_display();
462#endif
451 463
452 // We are using a low priority thread, the idea is to have it run only 464 // We are using a low priority thread, the idea is to have it run only
453 // when the main thread is sleeping during the matrix scanning 465 // when the main thread is sleeping during the matrix scanning