diff options
author | lokher <lokher@gmail.com> | 2022-09-13 11:24:05 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-09-13 11:24:05 +0800 |
commit | 9581289745736ce068a1040f44cec37a2ca8830d (patch) | |
tree | 24f644715a5fd6cc4d804d9604fb094307808b1b /keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c | |
parent | fe13cedf8c09fa34d5cec4e4c624738095176625 (diff) |
Remove non-Keychron keyboards
Diffstat (limited to 'keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c')
-rw-r--r-- | keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c deleted file mode 100644 index ae37995448..0000000000 --- a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c +++ /dev/null @@ -1,99 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include "switches.h" - -static const char *BRAND_NAMES[] = { - "Kailh", - "Kailh Low Profile Choc", - "Gateron", - "Cherry MX", - "Cherry ML", - "Outemu", - "Greetech", - "Varmilo", - "MOD", - "Hako" -}; - -static const char *COLOR_NAMES[] = { - "", - "White", - "Black", - "Blue", - "Red", - "Yellow", - "Brown", - "Green", - "Clear", - "Silver", - "Nature White", - "Grey", - "Jade", - "Navy", - "Burnt Orange", - "Pale Blue", - "Dark Yellow", - "Gold", - "Chocolate White", - "Burgundy", - "Purple", - "Light Green", - "True", - "Berry", - "Plum", - "Sage", - "Violet", - "L", - "M", - "H", - "SH" -}; - -static const char *VARIANT_NAMES[] = { - "", - "BOX", - "BOX Thick", - "BOX Heavy", - "Silent", - "Tactile", - "Linear", - "Speed", - "Speed Heavy", - "Speed Thick Click", - "Pro", - "Pro Heavy", - "Royal", - "Thick Click", - "Heavy" -}; - -const char *brand_name(struct mechswitch ms) { - return BRAND_NAMES[ms.brand - 1]; -} - -const char *variant_name(struct mechswitch ms) { - return VARIANT_NAMES[ms.variant]; -} - -const char *color_name(struct mechswitch ms) { - return COLOR_NAMES[ms.color]; -} - -void switch_name(struct mechswitch ms, char *buf) { - const char *v_name = variant_name(ms); - const char *c_name = color_name(ms); - - snprintf(buf, MAX_SWITCH_NAME_LENGTH, "%s", brand_name(ms)); - strncat(buf, " ", MAX_SWITCH_NAME_LENGTH - strlen(buf)); - if (strlen(v_name) > 0) { - strncat(buf, v_name, MAX_SWITCH_NAME_LENGTH - strlen(buf)); - strncat(buf, " ", MAX_SWITCH_NAME_LENGTH - strlen(buf)); - } - if (strlen(c_name) > 0) { - strncat(buf, c_name, MAX_SWITCH_NAME_LENGTH - strlen(buf)); - } -} - -int bitfieldtoi(struct mechswitch ms) { - return ((ms.brand << 9) | (ms.variant << 5) | ms.color); -} |