From 91a249f6cfb28db40d2689c5e43748a40bc794da Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sun, 10 Mar 2019 04:10:15 +0000 Subject: [PATCH] removed redundant code from default_rgb config.h file, included QMK KEYBOARD H in place of initial defines in keymap.c --- .../launchpad/keymaps/default_rgb/config.h | 73 +------------- .../launchpad/keymaps/default_rgb/keymap.c | 95 ++++++++----------- 2 files changed, 40 insertions(+), 128 deletions(-) diff --git a/keyboards/launchpad/keymaps/default_rgb/config.h b/keyboards/launchpad/keymaps/default_rgb/config.h index 10f3fa18a05..cae1450c15b 100644 --- a/keyboards/launchpad/keymaps/default_rgb/config.h +++ b/keyboards/launchpad/keymaps/default_rgb/config.h @@ -1,49 +1,4 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x1337 -#define PRODUCT_ID 0x6007 -#define MANUFACTURER Maple Computing -#define PRODUCT Launch Pad -#define DESCRIPTION An all - in - on macropad - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 2 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +#pragma once /* Underlight Configuration */ #define RGB_DI_PIN F4 @@ -51,28 +6,4 @@ along with this program. If not, see . #define RGBLED_NUM 2 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#ifdef SUBPROJECT_rev1 -# include "rev1/config.h" -#endif - -#endif +#define RGBLIGHT_VAL_STEP 17 \ No newline at end of file diff --git a/keyboards/launchpad/keymaps/default_rgb/keymap.c b/keyboards/launchpad/keymaps/default_rgb/keymap.c index b254c92c682..eedc2b00034 100644 --- a/keyboards/launchpad/keymaps/default_rgb/keymap.c +++ b/keyboards/launchpad/keymaps/default_rgb/keymap.c @@ -1,7 +1,5 @@ // Below layout is based upon /u/That-Canadian's planck layout -#include "launchpad.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -19,62 +17,45 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-------------. - * | 1 | 2 | - * |------+------| - * | 3 | 4 | - * |------+------| - * | 5 | 6 | - * |------+------| - * | FUNC | RGB | - * `-------------' - */ -[_QWERTY] = LAYOUT( \ - KC_1, KC_2, \ - KC_3, KC_4, \ - KC_5, KC_6, \ - MO(_FUNC), TG(_RGB) \ -), + /* Qwerty + * ,-------------. + * | 1 | 2 | + * |------+------| + * | 3 | 4 | + * |------+------| + * | 5 | 6 | + * |------+------| + * | FUNC | RGB | + * `-------------' + */ + [_QWERTY] = LAYOUT(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, MO(_FUNC), TG(_RGB)), -/* RGB - * ,-------------. - * | Mode-| Mode+| - * |------+------| - * | HUE- | HUE+ | - * |------+------| - * | SAT- | SAT+ | - * |------+------| - * |RGBTOG| | - * `-------------' - */ -[_RGB] = LAYOUT( \ - RGB_RMOD, RGB_MOD, \ - RGB_HUD, RGB_HUI, \ - RGB_SAD, RGB_SAI, \ - RGB_TOG, KC_TRNS \ -), + /* RGB + * ,-------------. + * | Mode-| Mode+| + * |------+------| + * | HUE- | HUE+ | + * |------+------| + * | SAT- | SAT+ | + * |------+------| + * |RGBTOG| | + * `-------------' + */ + [_RGB] = LAYOUT(RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_TOG, KC_TRNS), -/* Function - * ,-------------. - * | Q |CALDEL| - * |------+------| - * | A |TSKMGR| - * |------+------| - * | Z | X | - * |------+------| - * | | C | - * `-------------' - */ -[_FUNC] = LAYOUT( \ - KC_Q, CALTDEL, \ - KC_A, TSKMGR, \ - KC_Z, KC_X, \ - _______, KC_C \ -) + /* Function + * ,-------------. + * | Q |CALDEL| + * |------+------| + * | A |TSKMGR| + * |------+------| + * | Z | X | + * |------+------| + * | | C | + * `-------------' + */ + [_FUNC] = LAYOUT(KC_Q, CALTDEL, KC_A, TSKMGR, KC_Z, KC_X, _______, KC_C) }; -void matrix_init_user(void) { - -} +void matrix_init_user(void) {}