diff --git a/keyboards/fjlabs/vanguard65/config.h b/keyboards/fjlabs/vanguard65/config.h index 9afb378a7f3..c4c9df3ab3b 100644 --- a/keyboards/fjlabs/vanguard65/config.h +++ b/keyboards/fjlabs/vanguard65/config.h @@ -54,20 +54,19 @@ along with this program. If not, see . /* Define RGB */ #define RGB_DI_PIN C7 -#define RGBLED_NUM 36 +#define RGBLED_NUM 4 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL #define RGBLIGHT_EFFECT_SNAKE #define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS #define RGBLIGHT_EFFECT_STATIC_GRADIENT #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_LIMIT_VAL 255 #define RGB_VAL_STEP 12 -#define RGBLIGHT_DEFAULT_SPD 144 -#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL -/* #define RGBLIGHT_LAYER_BLINK*/ /* Define MIDI */ #define MIDI_ADVANCED diff --git a/keyboards/fjlabs/vanguard65/keymaps/via/keymap.c b/keyboards/fjlabs/vanguard65/keymaps/via/keymap.c index 455c1ac438a..e45fe9cb4d0 100644 --- a/keyboards/fjlabs/vanguard65/keymaps/via/keymap.c +++ b/keyboards/fjlabs/vanguard65/keymaps/via/keymap.c @@ -14,6 +14,8 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #include "analog.h" +#include "print.h" +#include "string.h" enum layers { _LAYER0, @@ -40,7 +42,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT_all( - QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + QK_BOOTLOADER, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSPC, KC_PGDN, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, @@ -82,12 +84,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case A_CW: if (record->event.pressed) { - midi_send_cc(&midi_device, midi_config.channel, 46, 1); + midi_send_cc(&midi_device, midi_config.channel, 90, 1); } return true; case A_CCW: if (record->event.pressed) { - midi_send_cc(&midi_device, midi_config.channel, 46, 127); + midi_send_cc(&midi_device, midi_config.channel, 90, 127); } return true; default: @@ -95,20 +97,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { }; } -uint8_t last_read = 0; - -void slider(void) { - uint8_t current_read = (analogReadPin(SLIDER_PINA) +last_read) / 8; //filter strength - - if (current_read != last_read ) { // (&midi_device, chan, message, highest control value - (current pin reading) >>resolution) - midi_send_cc(&midi_device, 0, 0x30, 127 - (0x7F - (analogReadPin(SLIDER_PINA) >>3 ))); - - last_read = current_read; - } +/* MIDI Slider controls */ +uint16_t denoise_level = 16; +uint8_t last_val = 0; +void slider(void) { + + uint8_t current_val = analogReadPin(SLIDER_PINA) >>3; + + if ( last_val - current_val < -1 || last_val - current_val > 1 ) { + midi_send_cc(&midi_device, 0, 90, current_val ); // (&midi_device, chan, message, highest control value - (current pin reading) >>resolution) + last_val = comp_val; + } } - void matrix_scan_user(void) { slider(); } \ No newline at end of file diff --git a/keyboards/fjlabs/vanguard65/rules.mk b/keyboards/fjlabs/vanguard65/rules.mk index 9a3516f93db..7ccb0554fad 100644 --- a/keyboards/fjlabs/vanguard65/rules.mk +++ b/keyboards/fjlabs/vanguard65/rules.mk @@ -10,13 +10,25 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # +# LTO_ENABLE = yes +# BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +# MOUSEKEY_ENABLE = yes # Mouse keys [NOTE TO SELF CHANGE TO YES] +# EXTRAKEY_ENABLE = yes # Audio control and System control [NOTE TO SELF CHANGE TO YES] +# CONSOLE_ENABLE = no # Console for debug +# COMMAND_ENABLE = no # Commands for debug and configuration +# NKRO_ENABLE = yes # Enable N-Key Rollover +# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +# RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +# ENCODER_ENABLE = yes # Enable encoder +# MIDI_ENABLE = yes # Enable MIDI + LTO_ENABLE = yes BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys [NOTE TO SELF CHANGE TO YES] -EXTRAKEY_ENABLE = yes # Audio control and System control [NOTE TO SELF CHANGE TO YES] -CONSOLE_ENABLE = no # Console for debug +MOUSEKEY_ENABLE = no # Mouse keys [NOTE TO SELF CHANGE TO YES] +EXTRAKEY_ENABLE = no # Audio control and System control [NOTE TO SELF CHANGE TO YES] +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover +NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow ENCODER_ENABLE = yes # Enable encoder