summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2020-01-14 17:48:23 -0800
committerFlorian Didron <fdidron@users.noreply.github.com>2020-02-26 10:15:12 +0900
commit5ed3ecdd73913ee484777ab33840f3ece5d3571f (patch)
treefefde0dbeadfa6cbf379e63784fdc5b48c769431 /keyboards
parent259cc072029c3358827c7ef6c2462a3d4a6a1f52 (diff)
Add toggle for live training
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/ergodox_ez/ergodox_ez.c12
-rw-r--r--keyboards/planck/ez/ez.c12
2 files changed, 12 insertions, 12 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));
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
index fdb470b2e2..1e8a9d4e12 100644
--- a/keyboards/planck/ez/ez.c
+++ b/keyboards/planck/ez/ez.c
@@ -247,11 +247,11 @@ uint32_t layer_state_set_kb(uint32_t state) {
planck_ez_right_led_off();
state = layer_state_set_user(state);
uint8_t layer = biton32(state);
-#ifdef WEBUSB_ENABLE
- if(webusb_state.paired == true) {
+#ifdef ORXY_ENABLE
+ 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));
@@ -275,11 +275,11 @@ uint32_t layer_state_set_kb(uint32_t state) {
}
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;