aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bernhardt <bernhardtjeremy@gmail.com>2020-01-17 15:15:58 -0600
committerridingqwerty <george.g.koenig@gmail.com>2020-01-17 16:15:58 -0500
commitd11238f748554d66718b8fc13caa6e3da93fdf16 (patch)
tree8f7f2fad7774ae69f835cff2443781b97196866e
parent95c24bbaf8ed2b3c9ee79226dea782dc84764c56 (diff)
downloadqmk_firmware-d11238f748554d66718b8fc13caa6e3da93fdf16.tar.gz
qmk_firmware-d11238f748554d66718b8fc13caa6e3da93fdf16.zip
switching to you know whats up mode (#7921)
-rw-r--r--common_features.mk2
-rw-r--r--quantum/process_keycode/process_steno.c4
-rw-r--r--quantum/process_keycode/process_steno.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/common_features.mk b/common_features.mk
index 09d01debd..6c3646db9 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -61,7 +61,7 @@ endif
61 61
62ifeq ($(strip $(STENO_ENABLE)), yes) 62ifeq ($(strip $(STENO_ENABLE)), yes)
63 OPT_DEFS += -DSTENO_ENABLE 63 OPT_DEFS += -DSTENO_ENABLE
64 VIRTSER_ENABLE := yes 64 VIRTSER_ENABLE ?= yes
65 SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c 65 SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
66endif 66endif
67 67
diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c
index e0b33ec86..57e279f21 100644
--- a/quantum/process_keycode/process_steno.c
+++ b/quantum/process_keycode/process_steno.c
@@ -73,7 +73,9 @@ static void steno_clear_state(void) {
73static void send_steno_state(uint8_t size, bool send_empty) { 73static void send_steno_state(uint8_t size, bool send_empty) {
74 for (uint8_t i = 0; i < size; ++i) { 74 for (uint8_t i = 0; i < size; ++i) {
75 if (chord[i] || send_empty) { 75 if (chord[i] || send_empty) {
76#ifdef VIRTSER_ENABLE
76 virtser_send(chord[i]); 77 virtser_send(chord[i]);
78#endif
77 } 79 }
78 } 80 }
79} 81}
@@ -105,7 +107,9 @@ static void send_steno_chord(void) {
105 switch (mode) { 107 switch (mode) {
106 case STENO_MODE_BOLT: 108 case STENO_MODE_BOLT:
107 send_steno_state(BOLT_STATE_SIZE, false); 109 send_steno_state(BOLT_STATE_SIZE, false);
110#ifdef VIRTSER_ENABLE
108 virtser_send(0); // terminating byte 111 virtser_send(0); // terminating byte
112#endif
109 break; 113 break;
110 case STENO_MODE_GEMINI: 114 case STENO_MODE_GEMINI:
111 chord[0] |= 0x80; // Indicate start of packet 115 chord[0] |= 0x80; // Indicate start of packet
diff --git a/quantum/process_keycode/process_steno.h b/quantum/process_keycode/process_steno.h
index 367542372..ed049eb13 100644
--- a/quantum/process_keycode/process_steno.h
+++ b/quantum/process_keycode/process_steno.h
@@ -18,10 +18,6 @@
18 18
19#include "quantum.h" 19#include "quantum.h"
20 20
21#if defined(STENO_ENABLE) && !defined(VIRTSER_ENABLE)
22# error "must have virtser enabled to use steno"
23#endif
24
25typedef enum { STENO_MODE_BOLT, STENO_MODE_GEMINI } steno_mode_t; 21typedef enum { STENO_MODE_BOLT, STENO_MODE_GEMINI } steno_mode_t;
26 22
27bool process_steno(uint16_t keycode, keyrecord_t *record); 23bool process_steno(uint16_t keycode, keyrecord_t *record);