diff options
| author | Craig Gardner <40006110+LeafCutterLabs@users.noreply.github.com> | 2021-01-19 18:51:33 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-19 18:51:33 -0800 |
| commit | d28d474dc05ee008615f8bf94c0e1664b614ad91 (patch) | |
| tree | 7ec8077ccbea6682f9b465565a246e425f18546d | |
| parent | c0728bd189d0d9e5056f493e763191d8ca3c61f6 (diff) | |
| download | qmk_firmware-d28d474dc05ee008615f8bf94c0e1664b614ad91.tar.gz qmk_firmware-d28d474dc05ee008615f8bf94c0e1664b614ad91.zip | |
[Keyboard] Leafcutterlabs (#11464)
* add support for bigknob
Add support for bigknob macropad
* corrected files
* Apply suggestions from code review
Co-authored-by: Joel Challis <git@zvecr.com>
* corrected tap dance
* Update config.h
* correct image link
* Apply suggestions from code review
Co-authored-by: Ryan <fauxpark@gmail.com>
* added GPL headers
* Update readme.md
* update rules to disable tap dance
* remove tap dance
* Update rules.mk
trying to get to pass travis test
* Update rules.mk
remove tap dance
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
| -rw-r--r-- | keyboards/leafcutterlabs/bigknob/bigknob.c | 33 | ||||
| -rw-r--r-- | keyboards/leafcutterlabs/bigknob/bigknob.h | 1 | ||||
| -rw-r--r-- | keyboards/leafcutterlabs/bigknob/config.h | 34 | ||||
| -rw-r--r-- | keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c | 61 |
4 files changed, 56 insertions, 73 deletions
diff --git a/keyboards/leafcutterlabs/bigknob/bigknob.c b/keyboards/leafcutterlabs/bigknob/bigknob.c index f059864d5..4fcb70e74 100644 --- a/keyboards/leafcutterlabs/bigknob/bigknob.c +++ b/keyboards/leafcutterlabs/bigknob/bigknob.c | |||
| @@ -1,16 +1,17 @@ | |||
| 1 | /* Copyright 2021 Craig Gardner | 1 | /* Copyright 2021 Craig Gardner |
| 2 | * | 2 | * |
| 3 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation, either version 2 of the License, or | 5 | * the Free Software Foundation, either version 2 of the License, or |
| 6 | * (at your option) any later version. | 6 | * (at your option) any later version. |
| 7 | * | 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
| 12 | * | 12 | * |
| 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include "bigknob.h" | 16 | |
| 17 | #include "bigknob.h" \ No newline at end of file | ||
diff --git a/keyboards/leafcutterlabs/bigknob/bigknob.h b/keyboards/leafcutterlabs/bigknob/bigknob.h index 18d65d5b0..bb8e3fcaa 100644 --- a/keyboards/leafcutterlabs/bigknob/bigknob.h +++ b/keyboards/leafcutterlabs/bigknob/bigknob.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | |||
| 16 | #pragma once | 17 | #pragma once |
| 17 | 18 | ||
| 18 | #include "quantum.h" | 19 | #include "quantum.h" |
diff --git a/keyboards/leafcutterlabs/bigknob/config.h b/keyboards/leafcutterlabs/bigknob/config.h index eacc89479..1f1ac4e98 100644 --- a/keyboards/leafcutterlabs/bigknob/config.h +++ b/keyboards/leafcutterlabs/bigknob/config.h | |||
| @@ -1,18 +1,20 @@ | |||
| 1 | /* Copyright 2021 Craig Gardner | 1 | /* |
| 2 | * | 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> |
| 3 | * This program is free software: you can redistribute it and/or modify | 3 | |
| 4 | * it under the terms of the GNU General Public License as published by | 4 | This program is free software: you can redistribute it and/or modify |
| 5 | * the Free Software Foundation, either version 2 of the License, or | 5 | it under the terms of the GNU General Public License as published by |
| 6 | * (at your option) any later version. | 6 | the Free Software Foundation, either version 2 of the License, or |
| 7 | * | 7 | (at your option) any later version. |
| 8 | * This program is distributed in the hope that it will be useful, | 8 | |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | This program is distributed in the hope that it will be useful, |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * GNU General Public License for more details. | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * | 12 | GNU General Public License for more details. |
| 13 | * You should have received a copy of the GNU General Public License | 13 | |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | You should have received a copy of the GNU General Public License |
| 15 | */ | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | ||
| 17 | |||
| 16 | #pragma once | 18 | #pragma once |
| 17 | 19 | ||
| 18 | #include "config_common.h" | 20 | #include "config_common.h" |
| @@ -54,4 +56,4 @@ | |||
| 54 | /* ws2812 RGB LED */ | 56 | /* ws2812 RGB LED */ |
| 55 | #define RGB_DI_PIN C7 //D3 - underglow C7 - backlight | 57 | #define RGB_DI_PIN C7 //D3 - underglow C7 - backlight |
| 56 | #define RGBLIGHT_ANIMATIONS | 58 | #define RGBLIGHT_ANIMATIONS |
| 57 | #define RGBLED_NUM 5 // Number of LEDs | 59 | #define RGBLED_NUM 5 // Number of LEDs \ No newline at end of file |
diff --git a/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c b/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c index a4ad2f0da..98186fc71 100644 --- a/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c +++ b/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c | |||
| @@ -1,24 +1,22 @@ | |||
| 1 | /* Copyright 2021 Craig Gardner | 1 | /* Copyright 2021 Craig Gardner |
| 2 | * | 2 | * |
| 3 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation, either version 2 of the License, or | 5 | * the Free Software Foundation, either version 2 of the License, or |
| 6 | * (at your option) any later version. | 6 | * (at your option) any later version. |
| 7 | * | 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
| 12 | * | 12 | * |
| 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | |||
| 16 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 17 | 18 | ||
| 18 | // Defines names for use in layer keycodes and the keymap | 19 | #define _MAIN 0 |
| 19 | enum layer_names { | ||
| 20 | _BASE | ||
| 21 | }; | ||
| 22 | 20 | ||
| 23 | void encoder_update_user(uint8_t index, bool clockwise) { | 21 | void encoder_update_user(uint8_t index, bool clockwise) { |
| 24 | if (index == 0) { | 22 | if (index == 0) { |
| @@ -30,27 +28,8 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
| 30 | } | 28 | } |
| 31 | } | 29 | } |
| 32 | 30 | ||
| 33 | enum { | ||
| 34 | TD_RGB = 0 | ||
| 35 | }; | ||
| 36 | |||
| 37 | void dance_rgb_finished (qk_tap_dance_state_t *state, void *user_data) { | ||
| 38 | if (state->count == 1) { | ||
| 39 | tap_code(KC_MNXT); | ||
| 40 | } else if (state->count == 2) { | ||
| 41 | rgblight_toggle(); | ||
| 42 | } else if (state->count == 3) { | ||
| 43 | rgblight_step(); | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | //All tap dance functions would go here. Only showing this one. | ||
| 48 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 49 | [TD_RGB] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_rgb_finished, NULL) | ||
| 50 | }; | ||
| 51 | |||
| 52 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first | 31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first |
| 53 | [_BASE] = LAYOUT( | 32 | [_MAIN] = LAYOUT( |
| 54 | KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_STOP, TD(TD_RGB) | 33 | KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_STOP, KC_MNXT |
| 55 | ) | 34 | ) |
| 56 | }; | 35 | }; \ No newline at end of file |
