diff options
author | That-Canadian <Poole.Chris.11@gmail.com> | 2018-07-16 19:25:02 -0700 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-07-16 22:25:02 -0400 |
commit | 0fab3bbde33f82301a8c5e177c3c0ceb7ad2219c (patch) | |
tree | 15a411d5ed6ad203982337448cfde11ed26ce7b7 /quantum/quantum.c | |
parent | b2877470ced1deb9651ecb39f6a82f5ef380b399 (diff) | |
download | qmk_firmware-0fab3bbde33f82301a8c5e177c3c0ceb7ad2219c.tar.gz qmk_firmware-0fab3bbde33f82301a8c5e177c3c0ceb7ad2219c.zip |
Lets split eh (#3120)
* Line ending stuff again
* Added Let's Split Eh? Files and updated #USE_IC2 checks to also include th EH revision (can only be used in I2C)
* Added personal keymap, updated some of the EH files
* Created new keyboard file for testing "lets_split_eh" will merge into lets_split once fully functional
* Added split code from lets_split, removed pro micro imports and LED code
THIS IS WORKING CODE, WITHOUT RGB AND BACKLIGHT
* Took back original Lets Slit files for the lets_split keyboard, working in the lets_split_eh folder for now
* Updated eh.c
* More rework of the I2C code, added global flags for split boards.
* Introduced RGB over I2C, having weird edge case issues at the moment though
* Fixed weird I2C edgecase with RGB, although still would like to track down route cause..
* Changed RGB keycodes (static ones) to activate on key-up instead of key-down to elimate weird ghosting issue over I2C
* Lots of changes, mainly externalized the Split keyboard code and added logic for only including when needed.
- Added makefile option "SPLIT_KEYBOARD" that when = yes will include the split keyboard files and custom matrix
- Split keyboard files placed into quantum/split_common/
- Added define option for config files "SPLIT_HAND_PIN" FOr using high/low pin to determine handedness, low = right hand, high = left hand
- Cleaned up split logic for RGB and Backlight so it is only exectuted / included when needed
* Updated documentation for the new makefile options and #defines specific to split keyboards
* Added a bit more info to docs, so people aren't confused
* Modifed Let's Split to use externalized code, also added left and right hand eeprom files to the split_common folder
* Removed some debugging from eh.c
* Small changes to keyboard configs. Also added a default keymap (just a copy of my that_canadian keymap).
* Added a README file to the Let's Split Eh?
* Changed it so RGB static updates are done on key-up ONLY for split boards rather than all boards. Also fixed leftover un-used variable in rgblight.c
* Updated default keymap and my keymap for Let's Split Eh? Updated the comments so it reflects RGB control, and removed audio functions.
* Fixed lets_split_eh not having a default version
* Removed "eh" references from lets_split folder for now
* Took lets_split folder from master to fix travis build errors, weird my local was overriding.
* Changed LAYOUT_ortho_4x12_kc -> LAYOUT_kc_ortho_4x12 to match bakingpy and others
* Removed rules.mk from my lets_split keymap, not needed
* Updated the config_options doc to better explain the usage of "#define SPLIT_HAND_PIN"
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 2bd2c71af..9c6ed3330 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
@@ -312,8 +312,16 @@ bool process_record_quantum(keyrecord_t *record) { | |||
312 | #endif | 312 | #endif |
313 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 313 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
314 | case RGB_TOG: | 314 | case RGB_TOG: |
315 | // Split keyboards need to trigger on key-up for edge-case issue | ||
316 | #ifndef SPLIT_KEYBOARD | ||
315 | if (record->event.pressed) { | 317 | if (record->event.pressed) { |
318 | #else | ||
319 | if (!record->event.pressed) { | ||
320 | #endif | ||
316 | rgblight_toggle(); | 321 | rgblight_toggle(); |
322 | #ifdef SPLIT_KEYBOARD | ||
323 | RGB_DIRTY = true; | ||
324 | #endif | ||
317 | } | 325 | } |
318 | return false; | 326 | return false; |
319 | case RGB_MODE_FORWARD: | 327 | case RGB_MODE_FORWARD: |
@@ -325,6 +333,9 @@ bool process_record_quantum(keyrecord_t *record) { | |||
325 | else { | 333 | else { |
326 | rgblight_step(); | 334 | rgblight_step(); |
327 | } | 335 | } |
336 | #ifdef SPLIT_KEYBOARD | ||
337 | RGB_DIRTY = true; | ||
338 | #endif | ||
328 | } | 339 | } |
329 | return false; | 340 | return false; |
330 | case RGB_MODE_REVERSE: | 341 | case RGB_MODE_REVERSE: |
@@ -336,36 +347,87 @@ bool process_record_quantum(keyrecord_t *record) { | |||
336 | else { | 347 | else { |
337 | rgblight_step_reverse(); | 348 | rgblight_step_reverse(); |
338 | } | 349 | } |
350 | #ifdef SPLIT_KEYBOARD | ||
351 | RGB_DIRTY = true; | ||
352 | #endif | ||
339 | } | 353 | } |
340 | return false; | 354 | return false; |
341 | case RGB_HUI: | 355 | case RGB_HUI: |
356 | // Split keyboards need to trigger on key-up for edge-case issue | ||
357 | #ifndef SPLIT_KEYBOARD | ||
342 | if (record->event.pressed) { | 358 | if (record->event.pressed) { |
359 | #else | ||
360 | if (!record->event.pressed) { | ||
361 | #endif | ||
343 | rgblight_increase_hue(); | 362 | rgblight_increase_hue(); |
363 | #ifdef SPLIT_KEYBOARD | ||
364 | RGB_DIRTY = true; | ||
365 | #endif | ||
344 | } | 366 | } |
345 | return false; | 367 | return false; |
346 | case RGB_HUD: | 368 | case RGB_HUD: |
369 | // Split keyboards need to trigger on key-up for edge-case issue | ||
370 | #ifndef SPLIT_KEYBOARD | ||
347 | if (record->event.pressed) { | 371 | if (record->event.pressed) { |
372 | #else | ||
373 | if (!record->event.pressed) { | ||
374 | #endif | ||
348 | rgblight_decrease_hue(); | 375 | rgblight_decrease_hue(); |
376 | #ifdef SPLIT_KEYBOARD | ||
377 | RGB_DIRTY = true; | ||
378 | #endif | ||
349 | } | 379 | } |
350 | return false; | 380 | return false; |
351 | case RGB_SAI: | 381 | case RGB_SAI: |
382 | // Split keyboards need to trigger on key-up for edge-case issue | ||
383 | #ifndef SPLIT_KEYBOARD | ||
352 | if (record->event.pressed) { | 384 | if (record->event.pressed) { |
385 | #else | ||
386 | if (!record->event.pressed) { | ||
387 | #endif | ||
353 | rgblight_increase_sat(); | 388 | rgblight_increase_sat(); |
389 | #ifdef SPLIT_KEYBOARD | ||
390 | RGB_DIRTY = true; | ||
391 | #endif | ||
354 | } | 392 | } |
355 | return false; | 393 | return false; |
356 | case RGB_SAD: | 394 | case RGB_SAD: |
395 | // Split keyboards need to trigger on key-up for edge-case issue | ||
396 | #ifndef SPLIT_KEYBOARD | ||
357 | if (record->event.pressed) { | 397 | if (record->event.pressed) { |
398 | #else | ||
399 | if (!record->event.pressed) { | ||
400 | #endif | ||
358 | rgblight_decrease_sat(); | 401 | rgblight_decrease_sat(); |
402 | #ifdef SPLIT_KEYBOARD | ||
403 | RGB_DIRTY = true; | ||
404 | #endif | ||
359 | } | 405 | } |
360 | return false; | 406 | return false; |
361 | case RGB_VAI: | 407 | case RGB_VAI: |
408 | // Split keyboards need to trigger on key-up for edge-case issue | ||
409 | #ifndef SPLIT_KEYBOARD | ||
362 | if (record->event.pressed) { | 410 | if (record->event.pressed) { |
411 | #else | ||
412 | if (!record->event.pressed) { | ||
413 | #endif | ||
363 | rgblight_increase_val(); | 414 | rgblight_increase_val(); |
415 | #ifdef SPLIT_KEYBOARD | ||
416 | RGB_DIRTY = true; | ||
417 | #endif | ||
364 | } | 418 | } |
365 | return false; | 419 | return false; |
366 | case RGB_VAD: | 420 | case RGB_VAD: |
421 | // Split keyboards need to trigger on key-up for edge-case issue | ||
422 | #ifndef SPLIT_KEYBOARD | ||
367 | if (record->event.pressed) { | 423 | if (record->event.pressed) { |
424 | #else | ||
425 | if (!record->event.pressed) { | ||
426 | #endif | ||
368 | rgblight_decrease_val(); | 427 | rgblight_decrease_val(); |
428 | #ifdef SPLIT_KEYBOARD | ||
429 | RGB_DIRTY = true; | ||
430 | #endif | ||
369 | } | 431 | } |
370 | return false; | 432 | return false; |
371 | case RGB_SPI: | 433 | case RGB_SPI: |
@@ -381,6 +443,9 @@ bool process_record_quantum(keyrecord_t *record) { | |||
381 | case RGB_MODE_PLAIN: | 443 | case RGB_MODE_PLAIN: |
382 | if (record->event.pressed) { | 444 | if (record->event.pressed) { |
383 | rgblight_mode(1); | 445 | rgblight_mode(1); |
446 | #ifdef SPLIT_KEYBOARD | ||
447 | RGB_DIRTY = true; | ||
448 | #endif | ||
384 | } | 449 | } |
385 | return false; | 450 | return false; |
386 | case RGB_MODE_BREATHE: | 451 | case RGB_MODE_BREATHE: |