Formatting

This commit is contained in:
Choi Byungyoon 2025-07-20 14:46:49 +09:00
parent 3c89756e39
commit e4769795f4
3 changed files with 96 additions and 102 deletions

View File

@ -106,7 +106,7 @@ bool he_matrix_scan(matrix_row_t current_matrix[]) {
sw_value[row][col] = he_readkey_raw(row);
if (he_config.bottoming_calibration) {
if (he_config.bottoming_calibration_starter[row][col]) {
he_config.bottoming_reading[row][col] = sw_value[row][col];
he_config.bottoming_reading[row][col] = sw_value[row][col];
he_config.bottoming_calibration_starter[row][col] = false;
} else if (sw_value[row][col] < he_config.bottoming_reading[row][col]) {
he_config.bottoming_reading[row][col] = sw_value[row][col];

View File

@ -23,13 +23,13 @@
#include "util.h"
typedef struct PACKED {
uint8_t actuation_mode; // 0: normal board-wide APC, 1: Rapid trigger from specific board-wide actuation point, 2: Rapid trigger from resting point
uint16_t mode_0_actuation_threshold; // threshold for key press in mode 0
uint16_t mode_0_release_threshold; // threshold for key release in mode 0
uint16_t mode_1_initial_deadzone_offset; // threshold for key press in mode 1
uint8_t mode_1_actuation_offset; // offset for key press in mode 1 and 2 (1-255)
uint8_t mode_1_release_offset; // offset for key release in mode 1 and 2 (1-255)
uint16_t bottoming_reading[MATRIX_ROWS][MATRIX_COLS]; // bottoming reading
uint8_t actuation_mode; // 0: normal board-wide APC, 1: Rapid trigger from specific board-wide actuation point, 2: Rapid trigger from resting point
uint16_t mode_0_actuation_threshold; // threshold for key press in mode 0
uint16_t mode_0_release_threshold; // threshold for key release in mode 0
uint16_t mode_1_initial_deadzone_offset; // threshold for key press in mode 1
uint8_t mode_1_actuation_offset; // offset for key press in mode 1 and 2 (1-255)
uint8_t mode_1_release_offset; // offset for key release in mode 1 and 2 (1-255)
uint16_t bottoming_reading[MATRIX_ROWS][MATRIX_COLS]; // bottoming reading
} eeprom_he_config_t;
typedef struct {
@ -40,8 +40,8 @@ typedef struct {
uint16_t rescaled_mode_0_actuation_threshold[MATRIX_ROWS][MATRIX_COLS]; // threshold for key press in mode 0 rescaled to actual scale
uint16_t rescaled_mode_0_release_threshold[MATRIX_ROWS][MATRIX_COLS]; // threshold for key release in mode 0 rescaled to actual scale
uint16_t rescaled_mode_1_initial_deadzone_offset[MATRIX_ROWS][MATRIX_COLS]; // threshold for key press in mode 1 (initial deadzone) rescaled to actual scale
uint8_t mode_1_actuation_offset; // offset for key press in mode 1 (1-255)
uint8_t mode_1_release_offset; // offset for key release in mode 1 (1-255)
uint8_t mode_1_actuation_offset; // offset for key press in mode 1 (1-255)
uint8_t mode_1_release_offset; // offset for key release in mode 1 (1-255)
uint16_t extremum[MATRIX_ROWS][MATRIX_COLS]; // extremum values for mode 1
uint16_t noise_ceiling[MATRIX_ROWS][MATRIX_COLS]; // noise ceiling detected during startup
bool bottoming_calibration; // calibration mode for bottoming out values (true: calibration mode, false: normal mode)

View File

@ -3,10 +3,13 @@
"keyboard_name": "TrueStrike42",
"maintainer": "byungyoonc",
"bootloader": "rp2040",
"processor": "RP2040",
"build": {
"debounce_type": "asym_eager_defer_pk"
},
"diode_direction": "COL2ROW",
"dynamic_keymap": {
"layer_count": 10
},
"features": {
"bootmagic": true,
"command": false,
@ -16,127 +19,59 @@
"nkro": true,
"rgb_matrix": true
},
"diode_direction": "COL2ROW",
"url": "https://github.com/byungyoonc/TrueStrike42",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0x5A53"
},
"matrix": {
"debounce": 100
},
"dynamic_keymap": {
"layer_count": 10
},
"ws2812": {
"pin": "GP0",
"driver": "vendor"
},
"layouts": {
"LAYOUT_split_3x6_3": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0.25},
{"matrix": [0, 1], "x": 1, "y": 0.25},
{"matrix": [0, 2], "x": 2, "y": 0.125},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0.125},
{"matrix": [0, 5], "x": 5, "y": 0.25},
{"matrix": [1, 6], "x": 8, "y": 0.25},
{"matrix": [1, 7], "x": 9, "y": 0.125},
{"matrix": [1, 8], "x": 10, "y": 0},
{"matrix": [1, 9], "x": 11, "y": 0.125},
{"matrix": [1, 10], "x": 12, "y": 0.25},
{"matrix": [1, 11], "x": 13, "y": 0.25},
{"matrix": [0, 6], "x": 0, "y": 1.25},
{"matrix": [0, 7], "x": 1, "y": 1.25},
{"matrix": [0, 8], "x": 2, "y": 1.125},
{"matrix": [0, 9], "x": 3, "y": 1},
{"matrix": [0, 10], "x": 4, "y": 1.125},
{"matrix": [0, 11], "x": 5, "y": 1.25},
{"matrix": [2, 0], "x": 8, "y": 1.25},
{"matrix": [2, 1], "x": 9, "y": 1.125},
{"matrix": [2, 2], "x": 10, "y": 1},
{"matrix": [2, 3], "x": 11, "y": 1.125},
{"matrix": [2, 4], "x": 12, "y": 1.25},
{"matrix": [2, 5], "x": 13, "y": 1.25},
{"matrix": [1, 0], "x": 0, "y": 2.25},
{"matrix": [1, 1], "x": 1, "y": 2.25},
{"matrix": [1, 2], "x": 2, "y": 2.125},
{"matrix": [1, 3], "x": 3, "y": 2},
{"matrix": [1, 4], "x": 4, "y": 2.125},
{"matrix": [1, 5], "x": 5, "y": 2.25},
{"matrix": [2, 6], "x": 8, "y": 2.25},
{"matrix": [2, 7], "x": 9, "y": 2.125},
{"matrix": [2, 8], "x": 10, "y": 2},
{"matrix": [2, 9], "x": 11, "y": 2.125},
{"matrix": [2, 10], "x": 12, "y": 2.25},
{"matrix": [2, 11], "x": 13, "y": 2.25},
{"matrix": [3, 0], "x": 3.5, "y": 3.25},
{"matrix": [3, 1], "x": 4.5, "y": 3.5},
{"matrix": [3, 2], "x": 5.5, "y": 3.75},
{"matrix": [3, 3], "x": 7.5, "y": 3.75},
{"matrix": [3, 4], "x": 8.5, "y": 3.5},
{"matrix": [3, 5], "x": 9.5, "y": 3.25}
]
}
},
"processor": "RP2040",
"rgb_matrix": {
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"digital_rain": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"raindrops": true,
"jellybean_raindrops": true,
"gradient_left_right": true,
"gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_rain": true,
"jellybean_raindrops": true,
"multisplash": true,
"pixel_flow": true,
"pixel_fractal": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"pixel_rain": true,
"rainbow_beacon": true,
"rainbow_moving_chevron": true,
"rainbow_pinwheels": true,
"raindrops": true,
"solid_multisplash": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_reactive_multiwide": true,
"solid_reactive_nexus": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"solid_splash": true,
"solid_multisplash": true
"splash": true,
"typing_heatmap": true
},
"default": {
"animation": "alphas_mods"
},
"max_brightness": 255,
"driver": "ws2812",
"layout": [
{"matrix": [0, 5], "x": 86, "y": 4, "flags": 4},
@ -181,6 +116,65 @@
{"matrix": [1, 8], "x": 172, "y": 0, "flags": 4},
{"matrix": [1, 7], "x": 155, "y": 2, "flags": 4},
{"matrix": [1, 6], "x": 137, "y": 4, "flags": 4}
]
],
"max_brightness": 255
},
"url": "https://github.com/byungyoonc/TrueStrike42",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0x5A53"
},
"ws2812": {
"driver": "vendor",
"pin": "GP0"
},
"layouts": {
"LAYOUT_split_3x6_3": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0.25},
{"matrix": [0, 1], "x": 1, "y": 0.25},
{"matrix": [0, 2], "x": 2, "y": 0.125},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0.125},
{"matrix": [0, 5], "x": 5, "y": 0.25},
{"matrix": [1, 6], "x": 8, "y": 0.25},
{"matrix": [1, 7], "x": 9, "y": 0.125},
{"matrix": [1, 8], "x": 10, "y": 0},
{"matrix": [1, 9], "x": 11, "y": 0.125},
{"matrix": [1, 10], "x": 12, "y": 0.25},
{"matrix": [1, 11], "x": 13, "y": 0.25},
{"matrix": [0, 6], "x": 0, "y": 1.25},
{"matrix": [0, 7], "x": 1, "y": 1.25},
{"matrix": [0, 8], "x": 2, "y": 1.125},
{"matrix": [0, 9], "x": 3, "y": 1},
{"matrix": [0, 10], "x": 4, "y": 1.125},
{"matrix": [0, 11], "x": 5, "y": 1.25},
{"matrix": [2, 0], "x": 8, "y": 1.25},
{"matrix": [2, 1], "x": 9, "y": 1.125},
{"matrix": [2, 2], "x": 10, "y": 1},
{"matrix": [2, 3], "x": 11, "y": 1.125},
{"matrix": [2, 4], "x": 12, "y": 1.25},
{"matrix": [2, 5], "x": 13, "y": 1.25},
{"matrix": [1, 0], "x": 0, "y": 2.25},
{"matrix": [1, 1], "x": 1, "y": 2.25},
{"matrix": [1, 2], "x": 2, "y": 2.125},
{"matrix": [1, 3], "x": 3, "y": 2},
{"matrix": [1, 4], "x": 4, "y": 2.125},
{"matrix": [1, 5], "x": 5, "y": 2.25},
{"matrix": [2, 6], "x": 8, "y": 2.25},
{"matrix": [2, 7], "x": 9, "y": 2.125},
{"matrix": [2, 8], "x": 10, "y": 2},
{"matrix": [2, 9], "x": 11, "y": 2.125},
{"matrix": [2, 10], "x": 12, "y": 2.25},
{"matrix": [2, 11], "x": 13, "y": 2.25},
{"matrix": [3, 0], "x": 3.5, "y": 3.25},
{"matrix": [3, 1], "x": 4.5, "y": 3.5},
{"matrix": [3, 2], "x": 5.5, "y": 3.75},
{"matrix": [3, 3], "x": 7.5, "y": 3.75},
{"matrix": [3, 4], "x": 8.5, "y": 3.5},
{"matrix": [3, 5], "x": 9.5, "y": 3.25}
]
}
}
}