aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-09-01 21:08:58 -0700
committerGitHub <noreply@github.com>2021-09-01 21:08:58 -0700
commit37aef4ebe17b04de07a17748e2452c2f1ebe77bd (patch)
tree70eb1e03ff21f1c1e9fbe2b788fe1438b50fe520
parentc1e5c920a9929a0434edca537e6c58aed294668c (diff)
downloadqmk_firmware-37aef4ebe17b04de07a17748e2452c2f1ebe77bd.tar.gz
qmk_firmware-37aef4ebe17b04de07a17748e2452c2f1ebe77bd.zip
[Keymap] Fix Drashna Keymap issues missed before Develop merge (#14271)
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h6
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c1
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c4
-rw-r--r--keyboards/handwired/tractyl_manuform/tractyl_manuform.c8
-rw-r--r--keyboards/handwired/tractyl_manuform/tractyl_manuform.h2
-rw-r--r--keyboards/splitkb/kyria/keymaps/drashna/rules.mk7
-rw-r--r--users/drashna/config.h98
-rw-r--r--users/drashna/oled_stuff.c21
-rw-r--r--users/drashna/post_config.h99
9 files changed, 132 insertions, 114 deletions
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
index cc4efedb8..93ca12159 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
@@ -87,10 +87,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
87#define SPI_MISO_PAL_MODE 5 87#define SPI_MISO_PAL_MODE 5
88 88
89#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 89#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4
90// #define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64 90#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 8
91// #define EXTERNAL_EEPROM_BYTE_COUNT 8196 91// #define EXTERNAL_EEPROM_BYTE_COUNT 8196
92// #define EXTERNAL_EEPROM_PAGE_SIZE 32 92// #define EXTERNAL_EEPROM_PAGE_SIZE 32
93// #define EXTERNAL_EEPROM_ADDRESS_SIZE 2 93// #define EXTERNAL_EEPROM_ADDRESS_SIZE 2
94// #define DEBUG_EEPROM_OUTPUT 94// #define DEBUG_EEPROM_OUTPUT
95 95
96#define PMW3360_CS_PIN B0 96#define PMW3360_CS_PIN B0
97#define PMW3360_SPI_MODE 3
98#define PMW3360_SPI_DIVISOR 4
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c
index 1f6028c72..240219f1d 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c
@@ -22,5 +22,4 @@ void matrix_scan_sub_kb(void) {
22 if (!readPin(A0)) { 22 if (!readPin(A0)) {
23 reset_keyboard(); 23 reset_keyboard();
24 } 24 }
25 matrix_scan_user();
26} 25}
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
index aa93de75d..ac4999161 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
71 _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, 71 _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______,
72 _______, _______, _______, _______, 72 _______, _______, _______, _______,
73 _______, _______, KC_BTN3, 73 _______, _______, KC_BTN3,
74 KC_ACCEL, _______, _______, 74 _______, KC_ACCEL, _______,
75 _______, _______, _______, _______ 75 _______, _______, _______, _______
76 ), 76 ),
77 [_GAMEPAD] = LAYOUT_5x6_right( 77 [_GAMEPAD] = LAYOUT_5x6_right(
@@ -259,7 +259,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state) {
259} 259}
260#endif 260#endif
261 261
262#ifdef OLED_DRIVER_ENABLE 262#ifdef OLED_ENABLE
263// WPM-responsive animation stuff here 263// WPM-responsive animation stuff here
264# define SLEEP_FRAMES 2 264# define SLEEP_FRAMES 2
265# define SLEEP_SPEED 10 // below this wpm value your animation will idle 265# define SLEEP_SPEED 10 // below this wpm value your animation will idle
diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
index 61a6740a2..aafa34305 100644
--- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
+++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
@@ -46,15 +46,15 @@ __attribute__((weak)) kb_pointer_data_t process_mouse(void) {
46 kb_pointer_data_t temp_data = {.mouse_x = 0, .mouse_y = 0}; 46 kb_pointer_data_t temp_data = {.mouse_x = 0, .mouse_y = 0};
47 47
48 report_pmw_t data = pmw_read_burst(); 48 report_pmw_t data = pmw_read_burst();
49 if (data.isOnSurface && data.isMotion) {
50 // Reset timer if stopped moving 49 // Reset timer if stopped moving
51 if (!data.isMotion) { 50 if (!data.isMotion) {
52 if (MotionStart != 0) MotionStart = 0; 51 if (MotionStart != 0) MotionStart = 0;
53 return temp_data; 52 return temp_data;
54 } 53 }
55 54
55 if (data.isOnSurface) {
56 // Set timer if new motion 56 // Set timer if new motion
57 if ((MotionStart == 0) && data.isMotion) { 57 if (MotionStart == 0) {
58 if (debug_mouse) dprintf("Starting motion.\n"); 58 if (debug_mouse) dprintf("Starting motion.\n");
59 MotionStart = timer_read(); 59 MotionStart = timer_read();
60 } 60 }
@@ -197,3 +197,7 @@ void matrix_scan_kb(void) {
197 matrix_scan_sub_kb(); 197 matrix_scan_sub_kb();
198 matrix_scan_user(); 198 matrix_scan_user();
199} 199}
200
201#ifdef POINTING_DEVICE_ENABLE
202void matrix_power_up(void) { pointing_device_task(); }
203#endif
diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.h b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h
index f49569310..99f1481ad 100644
--- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.h
+++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h
@@ -43,7 +43,7 @@ typedef struct {
43 uint16_t device_cpi; 43 uint16_t device_cpi;
44} kb_config_data_t; 44} kb_config_data_t;
45 45
46typedef struct { 46__attribute__((aligned(16))) typedef struct {
47 int8_t mouse_x; 47 int8_t mouse_x;
48 int8_t mouse_y; 48 int8_t mouse_y;
49} kb_pointer_data_t; 49} kb_pointer_data_t;
diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk
index ba273d7d3..b51cc1b62 100644
--- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk
+++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk
@@ -14,5 +14,10 @@ UNICODE_ENABLE = no # Unicode
14KEY_LOCK_ENABLE = no 14KEY_LOCK_ENABLE = no
15 15
16 16
17BOOTLOADER = atmel-dfu 17BOOTLOADER = hid
18BOOTLOADER_SIZE = 512
19PROGRAM_CMD = $(HID_BOOTLOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex
18# TAP_DANCE_ENABLE = yes 20# TAP_DANCE_ENABLE = yes
21
22WPM_ENABLE = yes
23SWAP_HANDS_ENABLE = yes
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 75e1c11c6..5e935827b 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -30,7 +30,7 @@
30# ifdef WPM_ENABLE 30# ifdef WPM_ENABLE
31# define SPLIT_WPM_ENABLE 31# define SPLIT_WPM_ENABLE
32# endif 32# endif
33# ifdef OLED_DRIVER_ENABLE 33# ifdef OLED_ENABLE
34# define SPLIT_OLED_ENABLE 34# define SPLIT_OLED_ENABLE
35# endif 35# endif
36# if defined(__AVR__) && !defined(SELECT_SOFT_SERIAL_SPEED) 36# if defined(__AVR__) && !defined(SELECT_SOFT_SERIAL_SPEED)
@@ -130,14 +130,6 @@
130# define DISABLE_RGB_MATRIX_SOLID_SPLASH 130# define DISABLE_RGB_MATRIX_SOLID_SPLASH
131# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH 131# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
132# endif // AVR 132# endif // AVR
133# ifndef RGB_MATRIX_REST_MODE
134# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_moonlander)
135# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL
136# else
137# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN
138# endif
139# endif
140# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_REST_MODE
141#endif // RGB_MATRIX_ENABLE 133#endif // RGB_MATRIX_ENABLE
142 134
143#ifdef OLED_ENABLE 135#ifdef OLED_ENABLE
@@ -171,11 +163,6 @@
171# define ONESHOT_TIMEOUT 3000 163# define ONESHOT_TIMEOUT 3000
172#endif // !ONESHOT_TIMEOUT 164#endif // !ONESHOT_TIMEOUT
173 165
174#ifdef QMK_KEYS_PER_SCAN
175# undef QMK_KEYS_PER_SCAN
176#endif
177#define QMK_KEYS_PER_SCAN 4
178
179// this makes it possible to do rolling combos (zx) with keys that 166// this makes it possible to do rolling combos (zx) with keys that
180// convert to other keys on hold (z becomes ctrl when you hold it, 167// convert to other keys on hold (z becomes ctrl when you hold it,
181// and when this option isn't enabled, z rapidly followed by x 168// and when this option isn't enabled, z rapidly followed by x
@@ -213,13 +200,6 @@
213# undef LOCKING_RESYNC_ENABLE 200# undef LOCKING_RESYNC_ENABLE
214#endif 201#endif
215 202
216#if !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_32BIT)
217# define LAYER_STATE_16BIT
218#endif
219#ifndef DYNAMIC_KEYMAP_LAYER_COUNT
220# define DYNAMIC_KEYMAP_LAYER_COUNT 11
221#endif
222
223#ifdef CONVERT_TO_PROTON_C 203#ifdef CONVERT_TO_PROTON_C
224// pins that are available but not present on Pro Micro 204// pins that are available but not present on Pro Micro
225# define A3 PAL_LINE(GPIOA, 3) 205# define A3 PAL_LINE(GPIOA, 3)
@@ -238,79 +218,3 @@
238# define C14 PAL_LINE(GPIOC, 14) 218# define C14 PAL_LINE(GPIOC, 14)
239# define C15 PAL_LINE(GPIOC, 15) 219# define C15 PAL_LINE(GPIOC, 15)
240#endif 220#endif
241
242#ifdef MOUSEKEY_ENABLE
243// mouse movement config
244# ifdef MK_3_SPEED
245# undef MK_3_SPEED
246# endif
247# define MK_KINETIC_SPEED
248# ifdef MK_KINETIC_SPEED
249# ifndef MOUSEKEY_DELAY
250# define MOUSEKEY_DELAY 8
251# endif
252# ifndef MOUSEKEY_INTERVAL
253# define MOUSEKEY_INTERVAL 20
254# endif
255# ifdef MOUSEKEY_MOVE_DELTA
256# define MOUSEKEY_MOVE_DELTA 25
257# endif
258# else
259# ifndef MOUSEKEY_DELAY
260# define MOUSEKEY_DELAY 300
261# endif
262# ifndef MOUSEKEY_INTERVAL
263# define MOUSEKEY_INTERVAL 50
264# endif
265# ifndef MOUSEKEY_MOVE_DELTA
266# define MOUSEKEY_MOVE_DELTA 5
267# endif
268# endif
269# ifndef MOUSEKEY_MAX_SPEED
270# define MOUSEKEY_MAX_SPEED 7
271# endif
272# ifndef MOUSEKEY_TIME_TO_MAX
273# define MOUSEKEY_TIME_TO_MAX 60
274# endif
275# ifndef MOUSEKEY_INITIAL_SPEED
276# define MOUSEKEY_INITIAL_SPEED 100
277# endif
278# ifndef MOUSEKEY_BASE_SPEED
279# define MOUSEKEY_BASE_SPEED 1000
280# endif
281# ifndef MOUSEKEY_DECELERATED_SPEED
282# define MOUSEKEY_DECELERATED_SPEED 400
283# endif
284# ifndef MOUSEKEY_ACCELERATED_SPEED
285# define MOUSEKEY_ACCELERATED_SPEED 3000
286# endif
287// mouse scroll config
288# ifndef MOUSEKEY_WHEEL_DELAY
289# define MOUSEKEY_WHEEL_DELAY 15
290# endif
291# ifndef MOUSEKEY_WHEEL_DELTA
292# define MOUSEKEY_WHEEL_DELTA 1
293# endif
294# ifndef MOUSEKEY_WHEEL_INTERVAL
295# define MOUSEKEY_WHEEL_INTERVAL 50
296# endif
297# ifndef MOUSEKEY_WHEEL_MAX_SPEED
298# define MOUSEKEY_WHEEL_MAX_SPEED 8
299# endif
300# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
301# define MOUSEKEY_WHEEL_TIME_TO_MAX 80
302# endif
303// mouse scroll kinetic config
304# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS
305# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8
306# endif
307# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS
308# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48
309# endif
310# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS
311# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48
312# endif
313# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS
314# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8
315# endif
316#endif // MOUSEKEY_ENABLE
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index debcdcfbe..0bdd0212b 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -50,11 +50,17 @@ static const char PROGMEM code_to_name[0xFF] = {
50}; 50};
51// clang-format on 51// clang-format on
52 52
53void add_keylog(uint16_t keycode) { 53void add_keylog(uint16_t keycode, keyrecord_t *record) {
54 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { 54 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
55 keycode = keycode & 0xFF; 55 if (((keycode & 0xFF) == KC_BSPC) && mod_config(get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) {
56 } else if (keycode > 0xFF) { 56 memset(keylog_str, ' ', sizeof(keylog_str) - 1);
57 keycode = 0; 57 return;
58 }
59 if (record->tap.count) {
60 keycode = keycode & 0xFF;
61 } else if (keycode > 0xFF) {
62 return;
63 }
58 } 64 }
59 65
60 for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) { 66 for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) {
@@ -72,7 +78,7 @@ bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) {
72 if (record->event.pressed) { 78 if (record->event.pressed) {
73#ifdef OLED_ENABLE 79#ifdef OLED_ENABLE
74 oled_timer = timer_read32(); 80 oled_timer = timer_read32();
75 add_keylog(keycode); 81 add_keylog(keycode, record);
76#endif 82#endif
77 } 83 }
78 return true; 84 return true;
@@ -384,9 +390,8 @@ void render_status_main(void) {
384__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; } 390__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; }
385 391
386oled_rotation_t oled_init_user(oled_rotation_t rotation) { 392oled_rotation_t oled_init_user(oled_rotation_t rotation) {
387 for (uint8_t i = 0; i < (KEYLOGGER_LENGTH - 1); i++) { 393 memset(keylog_str, ' ', sizeof(keylog_str) - 1);
388 add_keylog(0); 394
389 }
390 return oled_init_keymap(rotation); 395 return oled_init_keymap(rotation);
391} 396}
392 397
diff --git a/users/drashna/post_config.h b/users/drashna/post_config.h
index 7c214b66d..b9d934c42 100644
--- a/users/drashna/post_config.h
+++ b/users/drashna/post_config.h
@@ -38,3 +38,102 @@
38# define RGBLIGHT_EFFECT_TWINKLE 38# define RGBLIGHT_EFFECT_TWINKLE
39# endif 39# endif
40#endif 40#endif
41
42#ifdef RGB_MATRIX_ENABLE
43# ifndef RGB_MATRIX_REST_MODE
44# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_moonlander)
45# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL
46# else
47# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN
48# endif
49# endif
50# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_REST_MODE
51#endif
52
53#ifdef QMK_KEYS_PER_SCAN
54# undef QMK_KEYS_PER_SCAN
55#endif
56#define QMK_KEYS_PER_SCAN 4
57
58#ifdef MOUSEKEY_ENABLE
59// mouse movement config
60# ifdef MK_3_SPEED
61# undef MK_3_SPEED
62# endif
63# define MK_KINETIC_SPEED
64# ifdef MK_KINETIC_SPEED
65# ifndef MOUSEKEY_DELAY
66# define MOUSEKEY_DELAY 8
67# endif
68# ifndef MOUSEKEY_INTERVAL
69# define MOUSEKEY_INTERVAL 20
70# endif
71# ifndef MOUSEKEY_MOVE_DELTA
72# define MOUSEKEY_MOVE_DELTA 25
73# endif
74# else
75# ifndef MOUSEKEY_DELAY
76# define MOUSEKEY_DELAY 300
77# endif
78# ifndef MOUSEKEY_INTERVAL
79# define MOUSEKEY_INTERVAL 50
80# endif
81# ifndef MOUSEKEY_MOVE_DELTA
82# define MOUSEKEY_MOVE_DELTA 5
83# endif
84# endif
85# ifndef MOUSEKEY_MAX_SPEED
86# define MOUSEKEY_MAX_SPEED 7
87# endif
88# ifndef MOUSEKEY_TIME_TO_MAX
89# define MOUSEKEY_TIME_TO_MAX 60
90# endif
91# ifndef MOUSEKEY_INITIAL_SPEED
92# define MOUSEKEY_INITIAL_SPEED 100
93# endif
94# ifndef MOUSEKEY_BASE_SPEED
95# define MOUSEKEY_BASE_SPEED 1000
96# endif
97# ifndef MOUSEKEY_DECELERATED_SPEED
98# define MOUSEKEY_DECELERATED_SPEED 400
99# endif
100# ifndef MOUSEKEY_ACCELERATED_SPEED
101# define MOUSEKEY_ACCELERATED_SPEED 3000
102# endif
103// mouse scroll config
104# ifndef MOUSEKEY_WHEEL_DELAY
105# define MOUSEKEY_WHEEL_DELAY 15
106# endif
107# ifndef MOUSEKEY_WHEEL_DELTA
108# define MOUSEKEY_WHEEL_DELTA 1
109# endif
110# ifndef MOUSEKEY_WHEEL_INTERVAL
111# define MOUSEKEY_WHEEL_INTERVAL 50
112# endif
113# ifndef MOUSEKEY_WHEEL_MAX_SPEED
114# define MOUSEKEY_WHEEL_MAX_SPEED 8
115# endif
116# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
117# define MOUSEKEY_WHEEL_TIME_TO_MAX 80
118# endif
119// mouse scroll kinetic config
120# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS
121# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8
122# endif
123# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS
124# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48
125# endif
126# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS
127# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48
128# endif
129# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS
130# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8
131# endif
132#endif // MOUSEKEY_ENABLE
133
134#if !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_32BIT)
135# define LAYER_STATE_16BIT
136#endif
137#ifndef DYNAMIC_KEYMAP_LAYER_COUNT
138# define DYNAMIC_KEYMAP_LAYER_COUNT 11
139#endif