diff options
Diffstat (limited to 'keyboards/hadron')
-rw-r--r-- | keyboards/hadron/hadron.h | 9 | ||||
-rw-r--r-- | keyboards/hadron/ver3/ver3.c | 7 | ||||
-rw-r--r-- | keyboards/hadron/ver3/ver3.h | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/keyboards/hadron/hadron.h b/keyboards/hadron/hadron.h index 426face6f..c11774729 100644 --- a/keyboards/hadron/hadron.h +++ b/keyboards/hadron/hadron.h | |||
@@ -1,16 +1,17 @@ | |||
1 | #ifndef HADRON_H | 1 | #ifndef HADRON_H |
2 | #define HADRON_H | 2 | #define HADRON_H |
3 | 3 | ||
4 | #ifdef SUBPROJECT_ver0 | 4 | #include "quantum.h" |
5 | |||
6 | #ifdef KEYBOARD_hadron_ver0 | ||
5 | #include "ver0.h" | 7 | #include "ver0.h" |
6 | #endif | 8 | #endif |
7 | #ifdef SUBPROJECT_ver2 | 9 | #ifdef KEYBOARD_hadron_ver2 |
8 | #include "ver2.h" | 10 | #include "ver2.h" |
9 | #endif | 11 | #endif |
10 | #ifdef SUBPROJECT_ver3 | 12 | #ifdef KEYBOARD_hadron_ver3 |
11 | #include "ver3.h" | 13 | #include "ver3.h" |
12 | #endif | 14 | #endif |
13 | #include "quantum.h" | ||
14 | 15 | ||
15 | 16 | ||
16 | #define LAYOUT( \ | 17 | #define LAYOUT( \ |
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index 1491caba4..0664bf4b0 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "action_layer.h" | 18 | #include "action_layer.h" |
19 | #include "haptic.h" | 19 | #include "haptic.h" |
20 | 20 | ||
21 | |||
21 | #ifdef RGB_MATRIX_ENABLE | 22 | #ifdef RGB_MATRIX_ENABLE |
22 | #include "rgb_matrix.h" | 23 | #include "rgb_matrix.h" |
23 | 24 | ||
@@ -181,9 +182,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
181 | return process_record_user(keycode, record); | 182 | return process_record_user(keycode, record); |
182 | } | 183 | } |
183 | 184 | ||
184 | void encoder_update_kb(uint8_t index, bool clockwise) { | 185 | bool encoder_update_user(uint8_t index, bool clockwise); |
186 | |||
187 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
188 | if (!encoder_update_user(index, clockwise)) return false; | ||
185 | encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; | 189 | encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; |
186 | queue_for_send = true; | 190 | queue_for_send = true; |
191 | return true; | ||
187 | } | 192 | } |
188 | 193 | ||
189 | #endif | 194 | #endif |
diff --git a/keyboards/hadron/ver3/ver3.h b/keyboards/hadron/ver3/ver3.h index 95926469b..1ad44b871 100644 --- a/keyboards/hadron/ver3/ver3.h +++ b/keyboards/hadron/ver3/ver3.h | |||
@@ -15,4 +15,4 @@ | |||
15 | */ | 15 | */ |
16 | #pragma once | 16 | #pragma once |
17 | 17 | ||
18 | #include "hadron.h" \ No newline at end of file | 18 | #include "hadron.h" |