diff --git a/keyboards/fjlabs/vanguard65/keymaps/via-midi/keymap.c b/keyboards/fjlabs/vanguard65/keymaps/via-midi/keymap.c deleted file mode 100644 index ef6029382dd..00000000000 --- a/keyboards/fjlabs/vanguard65/keymaps/via-midi/keymap.c +++ /dev/null @@ -1,116 +0,0 @@ -/* -Copyright 2021 -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 . -*/ - -#include QMK_KEYBOARD_H -#include "analog.h" -#include "print.h" -#include "string.h" - -enum layers { - _LAYER0, - _LAYER1, - _LAYER2, - _LAYER3 -}; - -enum custom_keycodes { // Define keycodes for MIDI usage of the volume knob - A_CW = USER00, - A_CCW -}; - - -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [_LAYER1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_LAYER0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_LAYER2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_LAYER3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, -}; -#endif - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_LAYER0] = LAYOUT( - 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, - 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_MUTE, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - - [_LAYER1] = LAYOUT( - QK_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUSE, QK_BOOT, KC_PGUP, - KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK - ), - - [_LAYER2] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - - [_LAYER3] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - -}; - -/* Define MIDI custom keycodes here */ -extern MidiDevice midi_device; -#define MIDI_CC_OFF 0 -#define MIDI_CC_ON 127 - -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, 89, 1); - } - return true; - case A_CCW: - if (record->event.pressed) { - midi_send_cc(&midi_device, midi_config.channel, 89, 127); - } - return true; - default: - return true; - }; -} - -/* 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 = current_val; - } -} - -void matrix_scan_user(void) { - slider(); -} \ No newline at end of file diff --git a/keyboards/fjlabs/vanguard65/keymaps/via/rules.mk b/keyboards/fjlabs/vanguard65/keymaps/via/rules.mk deleted file mode 100644 index ec3403dbccd..00000000000 --- a/keyboards/fjlabs/vanguard65/keymaps/via/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -VIA_ENABLE = yes -ENCODER_MAP_ENABLE = yes -SRC += analog.c \ No newline at end of file diff --git a/keyboards/fjlabs/vanguard65/config.h b/keyboards/keebfront/vanguard65/config.h similarity index 98% rename from keyboards/fjlabs/vanguard65/config.h rename to keyboards/keebfront/vanguard65/config.h index 94cd7e7c3a3..0aea3cb6d45 100644 --- a/keyboards/fjlabs/vanguard65/config.h +++ b/keyboards/keebfront/vanguard65/config.h @@ -1,5 +1,5 @@ /* -Copyright 2021 +Copyright 2022 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 diff --git a/keyboards/fjlabs/vanguard65/info.json b/keyboards/keebfront/vanguard65/info.json similarity index 96% rename from keyboards/fjlabs/vanguard65/info.json rename to keyboards/keebfront/vanguard65/info.json index 000e092b502..220fa77adee 100644 --- a/keyboards/fjlabs/vanguard65/info.json +++ b/keyboards/keebfront/vanguard65/info.json @@ -1,8 +1,8 @@ { "keyboard_name": "Vanguard65", - "manufacturer": "FJLaboratories", - "url": "https://www.fjlaboratories.com", - "maintainer": "FJLabs", + "manufacturer": "Keebfront", + "url": "https://www.keebfront.com", + "maintainer": "Keebfront", "usb": { "vid": "0x7074", "pid": "0x1823", diff --git a/keyboards/fjlabs/vanguard65/keymaps/default/keymap.c b/keyboards/keebfront/vanguard65/keymaps/default/keymap.c similarity index 98% rename from keyboards/fjlabs/vanguard65/keymaps/default/keymap.c rename to keyboards/keebfront/vanguard65/keymaps/default/keymap.c index 9d34865dd70..4bfc378e091 100644 --- a/keyboards/fjlabs/vanguard65/keymaps/default/keymap.c +++ b/keyboards/keebfront/vanguard65/keymaps/default/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2021 +Copyright 2022 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 diff --git a/keyboards/fjlabs/vanguard65/keymaps/via/keymap.c b/keyboards/keebfront/vanguard65/keymaps/via/keymap.c similarity index 94% rename from keyboards/fjlabs/vanguard65/keymaps/via/keymap.c rename to keyboards/keebfront/vanguard65/keymaps/via/keymap.c index 952555edeba..87ba6ce7ea5 100644 --- a/keyboards/fjlabs/vanguard65/keymaps/via/keymap.c +++ b/keyboards/keebfront/vanguard65/keymaps/via/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2021 +Copyright 2022 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 @@ -14,7 +14,6 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #include "analog.h" -#include "print.h" #include "string.h" enum layers { @@ -29,7 +28,6 @@ enum custom_keycodeas { A_CCW }; - // Set up EEPROM. Mostly boilerplate from QMK docs typedef union { uint32_t raw; @@ -38,14 +36,13 @@ typedef union { }; } user_config_t; user_config_t user_config; + uint8_t slider_func = 0; // On keyboard initialization, pull the EEPROM values void keyboard_post_init_user(void) { // Call the keymap level matrix init. - user_config.raw = eeconfig_read_user(); - slider_func = user_config.slider_func_state; }; @@ -101,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -/* Define MIDI custom keycodes here */ +/* Configure custom MIDI Keycodes that will be placed on USER_00 and USER_01 */ extern MidiDevice midi_device; #define MIDI_CC_OFF 0 #define MIDI_CC_ON 127 @@ -211,18 +208,19 @@ uint8_t rgb_sat = 0; void slider(void) { - uint8_t current_val = analogReadPin(SLIDER_PINA) >>3; + uint8_t current_val = analogReadPin(SLIDER_PINA) >>3; // Bit shift 2^10 [1024] to 2^7 [128] if ( last_val - current_val < -1 || last_val - current_val > 1 ) { // Underglow RGB Brightness if ( slider_func == 0 ) { uint8_t rounded_val = 0; + uint8_t round_coefficient = 3; // Set round-to-zero value target rgb_hue = rgblight_get_hue(); // Pull current hue and saturation values since we're just adjusting brightness rgb_sat = rgblight_get_sat(); // Since the lower end range of the slider can be a little bit noisy, it's going to make the zero-value a little hard to hit when it bounces around between 0-1-2. Better off to round any super low values to zero so the lights will affirmatively turn off at lower values. - if ( current_val < 3 ) { + if ( current_val < round_coefficient ) { rounded_val = 0; } else { rounded_val = current_val; @@ -233,12 +231,12 @@ void slider(void) { // MIDI CC 90 else if ( slider_func == 1 ) { - midi_send_cc(&midi_device, 0, 90, current_val ); // (&midi_device, chan, message, highest control value - (current pin reading) >>resolution) + midi_send_cc(&midi_device, 0, 90, current_val ); } // Layer shift between layers 1 - 4 else if ( slider_func == 2 ) { - layer_move(current_val >>5); + layer_move(current_val >>5); // Bit shift 2^7 to 2^2 } else { diff --git a/keyboards/fjlabs/vanguard65/keymaps/via-midi/rules.mk b/keyboards/keebfront/vanguard65/keymaps/via/rules.mk similarity index 100% rename from keyboards/fjlabs/vanguard65/keymaps/via-midi/rules.mk rename to keyboards/keebfront/vanguard65/keymaps/via/rules.mk diff --git a/keyboards/fjlabs/vanguard65/readme.md b/keyboards/keebfront/vanguard65/readme.md similarity index 69% rename from keyboards/fjlabs/vanguard65/readme.md rename to keyboards/keebfront/vanguard65/readme.md index 775868c5d12..740ade2941f 100644 --- a/keyboards/fjlabs/vanguard65/readme.md +++ b/keyboards/keebfront/vanguard65/readme.md @@ -1,15 +1,15 @@ -# PaperSky Studio Kyuu Hotswap +# Keebfront Vanguard65 -The following is the QMK Firmware for the Kyuu compatible Hotswap PCB +The following is the QMK Firmware for the Keebfront Vanguard65 --- -* Keyboard Maintainer: FJLabs -* Hardware Supported: Kyuu Hotswap PCB +* Keyboard Maintainer: Keebfront +* Hardware Supported: Vanguard65 Make example for this keyboard (after setting up your build environment): - make fjlabs/kyuu:default + make keebfront/vanguard65:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/fjlabs/vanguard65/rules.mk b/keyboards/keebfront/vanguard65/rules.mk similarity index 100% rename from keyboards/fjlabs/vanguard65/rules.mk rename to keyboards/keebfront/vanguard65/rules.mk diff --git a/keyboards/fjlabs/vanguard65/vanguard65.c b/keyboards/keebfront/vanguard65/vanguard65.c similarity index 93% rename from keyboards/fjlabs/vanguard65/vanguard65.c rename to keyboards/keebfront/vanguard65/vanguard65.c index f64da261aad..3ddaf40257d 100644 --- a/keyboards/fjlabs/vanguard65/vanguard65.c +++ b/keyboards/keebfront/vanguard65/vanguard65.c @@ -1,5 +1,5 @@ /* -Copyright 2022 +Copyright 2022 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 diff --git a/keyboards/fjlabs/vanguard65/vanguard65.h b/keyboards/keebfront/vanguard65/vanguard65.h similarity index 97% rename from keyboards/fjlabs/vanguard65/vanguard65.h rename to keyboards/keebfront/vanguard65/vanguard65.h index d255c4b98b3..e8703b31434 100644 --- a/keyboards/fjlabs/vanguard65/vanguard65.h +++ b/keyboards/keebfront/vanguard65/vanguard65.h @@ -1,5 +1,5 @@ /* -Copyright 2022 +Copyright 2022 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