diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-25 16:02:54 +0200 |
commit | 6afdd9d74da250e47ac64d6690bd19d037045e99 (patch) | |
tree | 661f6cfb244c02bcd1fbfe8fb9b2bd9242a91394 /keyboards/cannonkeys/satisfaction75 | |
parent | 93a55e61b59d20f7cd842cce02e5b18a63a23612 (diff) | |
parent | 1bdf4cdc22ae57d111efb2f7d71e405e5c7b3f11 (diff) | |
download | qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.tar.gz qmk_firmware-6afdd9d74da250e47ac64d6690bd19d037045e99.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/cannonkeys/satisfaction75')
7 files changed, 19 insertions, 21 deletions
diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 2a0ac91b2d..615ad1d056 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -17,19 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Ensure we jump to bootloader if the RESET keycode was pressed */ +/* Ensure we jump to bootloader if the QK_BOOT keycode was pressed */ #define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE /* LSE clock */ #define STM32_LSECLK 32768 -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xCA04 -#define PRODUCT_ID 0x57F5 -#define DEVICE_VER 0x0001 -#define MANUFACTURER CannonKeys -#define PRODUCT Satisfaction75 - /* key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 16 diff --git a/keyboards/cannonkeys/satisfaction75/info.json b/keyboards/cannonkeys/satisfaction75/info.json new file mode 100644 index 0000000000..692715124d --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/info.json @@ -0,0 +1,11 @@ +{ + "keyboard_name": "Satisfaction75", + "manufacturer": "CannonKeys", + "url": "", + "maintainer": "Cannon Keys", + "usb": { + "vid": "0xCA04", + "pid": "0x57F5", + "device_version": "0.0.1" + } +} diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c index 1680f90dc9..38fdb8880e 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c +++ b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/keymap.c @@ -29,7 +29,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT_2x2( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, OLED_TOGG, - _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, RESET, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, QK_BOOT, CLOCK_SET, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT diff --git a/keyboards/cannonkeys/satisfaction75/prototype/info.json b/keyboards/cannonkeys/satisfaction75/prototype/info.json index 29e727835a..9fad4142aa 100644 --- a/keyboards/cannonkeys/satisfaction75/prototype/info.json +++ b/keyboards/cannonkeys/satisfaction75/prototype/info.json @@ -1,7 +1,4 @@ { - "keyboard_name": "Satisfaction75 prototype", - "url": "", - "maintainer": "Cannon Keys", "layouts": { "LAYOUT_default": { "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] diff --git a/keyboards/cannonkeys/satisfaction75/rev1/info.json b/keyboards/cannonkeys/satisfaction75/rev1/info.json index b0e1716602..15986435c5 100644 --- a/keyboards/cannonkeys/satisfaction75/rev1/info.json +++ b/keyboards/cannonkeys/satisfaction75/rev1/info.json @@ -1,7 +1,4 @@ { - "keyboard_name": "Satisfaction75 rev1", - "url": "", - "maintainer": "Cannon Keys", "layouts": { "LAYOUT_default": { "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.75, "y":0}, {"x":6.75, "y":0}, {"x":7.75, "y":0}, {"x":8.75, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.5, "y":1}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.5, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15.5, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13.25, "y":5.5}, {"x":14.25, "y":5.5}, {"x":15.25, "y":5.5}] diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index bd7eaf1885..3cd52d5f23 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -240,7 +240,7 @@ void read_host_led_state(void) { layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); - layer = biton32(state); + layer = get_highest_layer(state); oled_request_wakeup(); return state; } @@ -348,9 +348,9 @@ void custom_config_load(){ // Called from matrix_init_kb() if not VIA_ENABLE void via_init_kb(void) { - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM. - if (via_eeprom_is_valid()) { + // This checks both an EEPROM reset (from bootmagic lite, keycodes) + // and also firmware build date (from via_eeprom_is_valid()) + if (eeconfig_is_enabled()) { custom_config_load(); } else { #ifdef DYNAMIC_KEYMAP_ENABLE diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index fff8b65bd7..1e8465387c 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -145,7 +145,7 @@ static char* get_time(void) { hour = 12; } - static char time_str[8] = ""; + static char time_str[11] = ""; sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); return time_str; @@ -162,7 +162,7 @@ static char* get_date(void) { day = day_config; } - static char date_str[11] = ""; + static char date_str[15] = ""; sprintf(date_str, "%04d-%02d-%02d", year, month, day); return date_str; |