Skip to content

Commit

Permalink
Refactor zinc to use split_common (#7114)
Browse files Browse the repository at this point in the history
* Add Zinc keyboard

* Fix RGB LED init of monks/keymap.c

* Add RGBLED_BOTH_ENABLE option

* Fix RGBLED_BOTH_ENABLE option

* Add LED_BOTH_ENABLE feature to 2 keymaps

* Use split_common instead of own split flies

* Fix split LED

* Fix RGB LED config for iOS device

* Add RGB_MOD reverse key to default keymap

* Update readme_jp.md of default keymap

* Add readme_en.md of default keymap

* Merge branch 'master' into zinc_splitcommon

# Conflicts:
#	keyboards/zinc/serial.c

* Update keyboards/zinc/readme.md

* Update keyboards/zinc/readme.md

* Update keyboards/zinc/readme.md

* Update keyboards/zinc/rules.mk

* Update keyboards/zinc/rules.mk

* Update toshi0383 keymap

* Update keyboards/zinc/keymaps/toshi0383/rules.mk

* Update keyboards/zinc/keymaps/toshi0383/rules.mk

* Update keyboards/zinc/keymaps/toshi0383/rules.mk

* Update keyboards/zinc/keymaps/toshi0383/rules.mk

* Remove build option firmware size impacts (as #6947)

* Remove some dead code and whitespace

* Remove unused code

* Remove unused code

* Update keyboards/zinc/rev1/config.h

* Update keyboards/zinc/reva/config.h

* Update keyboards/zinc/keymaps/default/rules.mk

* Update keyboards/zinc/keymaps/default/keymap.c

* Update keyboards/zinc/keymaps/default/keymap.c

* Update keyboards/zinc/keymaps/default/keymap.c

* Update keyboards/zinc/keymaps/default/readme_en.md

* Update keyboards/zinc/keymaps/default/readme_en.md

* Breaking Changes Changelog
  • Loading branch information
monksoffunk authored and noroadsleft committed May 15, 2020
1 parent 61cd6f6 commit c320bca
Show file tree
Hide file tree
Showing 44 changed files with 451 additions and 2,263 deletions.
8 changes: 8 additions & 0 deletions docs/ChangeLog/20200530/PR7114.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Refactor zinc to use split_common #7114 - Changelog

* Refactor to use split_common and remove split codes under the zinc/revx/
* Add - backlight RGB LED and/or underglow RGB LED option
* Add - continuous RGB animations feature (between L and R halves)
* Fix - keymap files to adapt to changes
* all authors of keymaps confirmed this PR
* Update - documents and rules.mk
25 changes: 0 additions & 25 deletions keyboards/zinc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once
//#ifndef CONFIG_H
//#define CONFIG_H

#include "config_common.h"

// GCC include 'config.h" sequence in qmk_firmware/keyboards/zinc/
// -include keyboards/zinc/config.h
// -include keyboards/zinc/rev?/config.h
// -include keyboards/zinc/rev?/keymaps/MAPNAME/config.h
// XXXX.c

#include <serial_config.h>

// GCC include search path in qmk_firmare/keyboards/zinc/
// #include "..." search starts here:
// #include <...> search starts here:
// keyboards/zinc/rev?/keymaps/MAPNAME
// keyboards/zinc
// keyboards/zinc/rev?
// .
// ./tmk_core
// ......

#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION

//#endif /* CONFIG_H */
162 changes: 0 additions & 162 deletions keyboards/zinc/i2c.c

This file was deleted.

49 changes: 0 additions & 49 deletions keyboards/zinc/i2c.h

This file was deleted.

2 changes: 0 additions & 2 deletions keyboards/zinc/keymaps/default/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once
// if you need more program area, try uncomment follow line
#include "serial_config_simpleapi.h"

// place overrides here
// Selection of RGBLIGHT MODE to use.
Expand Down
26 changes: 19 additions & 7 deletions keyboards/zinc/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | MODE | HUE- | SAT- | VAL- | | | | | | | | |
* |MODE R| MODE | HUE- | SAT- | VAL- | | | | | | |PageUp| |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End |
* `-----------------------------------------' `-----------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12( \
_______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \
_______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\
_______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\
RGB_RMOD,RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, KC_PGUP, _______,\
_______, _______, _______, EISU, EISU, EISU, KANA, KANA, KANA, KC_HOME, KC_PGDN, KC_END\
)
};

// define variables for reactive RGB
bool TOG_STATUS = false;
bool TOG_STATUS = false;

// Setting ADJUST layer RGB back to default
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
Expand Down Expand Up @@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;

case RAISE:
if (record->event.pressed) {
//not sure how to have keyboard check mode and set it to a variable, so my work around
Expand Down Expand Up @@ -244,16 +244,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;

//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
case RGB_RMOD:
#if defined(RGBLIGHT_ENABLE)
if (record->event.pressed) {
rgblight_mode_noeeprom(RGB_current_config.mode);
rgblight_step_reverse();
RGB_current_config.mode = rgblight_config.mode;
}
return false;
#endif
break;

case RGB_MOD:
#ifdef RGBLIGHT_ENABLE
#if defined(RGBLIGHT_ENABLE)
if (record->event.pressed) {
rgblight_mode_noeeprom(RGB_current_config.mode);
rgblight_step();
RGB_current_config.mode = rgblight_config.mode;
}
#endif
return false;
#endif
break;

case EISU:
Expand Down
Loading

0 comments on commit c320bca

Please sign in to comment.