forked from mirrors/qmk_firmware
Fix the SERIAL_LINK_ENABLE macro in Visualizer
Rename from USE_SERIAL_LINK -> SERIAL_LINK_ENABLE
This commit is contained in:
parent
7229751ba9
commit
dae7c9bfb3
1 changed files with 5 additions and 5 deletions
|
@ -43,7 +43,7 @@ SOFTWARE.
|
||||||
#include "nodebug.h"
|
#include "nodebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SERIAL_LINK
|
#ifdef SERIAL_LINK_ENABLE
|
||||||
#include "serial_link/protocol/transport.h"
|
#include "serial_link/protocol/transport.h"
|
||||||
#include "serial_link/system/serial_link.h"
|
#include "serial_link/system/serial_link.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -73,7 +73,7 @@ static bool visualizer_enabled = false;
|
||||||
#define MAX_SIMULTANEOUS_ANIMATIONS 4
|
#define MAX_SIMULTANEOUS_ANIMATIONS 4
|
||||||
static keyframe_animation_t* animations[MAX_SIMULTANEOUS_ANIMATIONS] = {};
|
static keyframe_animation_t* animations[MAX_SIMULTANEOUS_ANIMATIONS] = {};
|
||||||
|
|
||||||
#ifdef USE_SERIAL_LINK
|
#ifdef SERIAL_LINK_ENABLE
|
||||||
MASTER_TO_ALL_SLAVES_OBJECT(current_status, visualizer_keyboard_status_t);
|
MASTER_TO_ALL_SLAVES_OBJECT(current_status, visualizer_keyboard_status_t);
|
||||||
|
|
||||||
static remote_object_t* remote_objects[] = {
|
static remote_object_t* remote_objects[] = {
|
||||||
|
@ -462,7 +462,7 @@ void visualizer_init(void) {
|
||||||
lcd_backlight_init();
|
lcd_backlight_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SERIAL_LINK
|
#ifdef SERIAL_LINK_ENABLE
|
||||||
add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*) );
|
add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ void update_status(bool changed) {
|
||||||
geventSendEvent(listener);
|
geventSendEvent(listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef USE_SERIAL_LINK
|
#ifdef SERIAL_LINK_ENABLE
|
||||||
static systime_t last_update = 0;
|
static systime_t last_update = 0;
|
||||||
systime_t current_update = chVTGetSystemTimeX();
|
systime_t current_update = chVTGetSystemTimeX();
|
||||||
systime_t delta = current_update - last_update;
|
systime_t delta = current_update - last_update;
|
||||||
|
@ -506,7 +506,7 @@ void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) {
|
||||||
// Alternatively a mutex could be used instead of the volatile variables
|
// Alternatively a mutex could be used instead of the volatile variables
|
||||||
|
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
#ifdef USE_SERIAL_LINK
|
#ifdef SERIAL_LINK_ENABLE
|
||||||
if (is_serial_link_connected ()) {
|
if (is_serial_link_connected ()) {
|
||||||
visualizer_keyboard_status_t* new_status = read_current_status();
|
visualizer_keyboard_status_t* new_status = read_current_status();
|
||||||
if (new_status) {
|
if (new_status) {
|
||||||
|
|
Loading…
Reference in a new issue