diff options
author | Drashna Jael're <drashna@live.com> | 2020-01-14 17:48:23 -0800 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-02-26 10:15:12 +0900 |
commit | 5ed3ecdd73913ee484777ab33840f3ece5d3571f (patch) | |
tree | fefde0dbeadfa6cbf379e63784fdc5b48c769431 /keyboards/ergodox_ez | |
parent | 259cc072029c3358827c7ef6c2462a3d4a6a1f52 (diff) |
Add toggle for live training
Diffstat (limited to 'keyboards/ergodox_ez')
-rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 5d121133aa..bd4a6fa78d 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -336,11 +336,11 @@ void keyboard_post_init_kb(void) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#ifdef WEBUSB_ENABLE - if(webusb_state.paired == true) { +#ifdef ORYX_ENABLE + if(is_oryx_live_training_enabled()) { uint8_t event[5]; event[0] = WEBUSB_STATUS_OK; - event[1] = record->event.pressed ? WEBUSB_EVT_KEYDOWN : WEBUSB_EVT_KEYUP; + event[1] = record->event.pressed ? ORYX_EVT_KEYDOWN : ORYX_EVT_KEYUP; event[2] = record->event.key.col; event[3] = record->event.key.row; event[4] = WEBUSB_STOP_BIT; @@ -399,7 +399,7 @@ void eeconfig_init_kb(void) { // EEPROM is getting reset! eeconfig_init_user(); } -#ifdef WEBUSB_ENABLE +#ifdef ORYX_ENABLE static uint16_t loops = 0; static bool is_on = false; @@ -436,10 +436,10 @@ void matrix_scan_kb(void) { uint32_t layer_state_set_kb(uint32_t state) { state = layer_state_set_user(state); uint8_t layer = biton32(state); - if(webusb_state.paired == true) { + if(is_oryx_live_training_enabled()) { uint8_t event[4]; event[0] = WEBUSB_STATUS_OK; - event[1] = WEBUSB_EVT_LAYER; + event[1] = ORYX_EVT_LAYER; event[2] = layer; event[3] = WEBUSB_STOP_BIT; webusb_send(event, sizeof(event)); |