Fixed some issues as suggested

This commit is contained in:
nuphy-src 2024-02-05 09:38:43 +08:00
parent 2cabdbdddf
commit 05d4515743
10 changed files with 544 additions and 545 deletions

View File

@ -200,7 +200,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if(user_config.sleep_enable) user_config.sleep_enable = false;
else user_config.sleep_enable = true;
f_sleep_show = 1;
eeconfig_update_user_datablock(&user_config);
eeconfig_update_kb_datablock(&user_config);
}
return false;
@ -211,19 +211,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return false;
case BAT_NUM:
if (record->event.pressed) {
f_bat_num_show = 1;
} else {
f_bat_num_show = 0;
}
f_bat_num_show = record->event.pressed;
return false;
case RGB_TEST:
if (record->event.pressed) {
f_rgb_test_press = 1;
} else {
f_rgb_test_press = 0;
}
f_rgb_test_press = record->event.pressed;
return false;
default:
@ -233,8 +225,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
bool rgb_matrix_indicators_user(void)
bool rgb_matrix_indicators_kb(void)
{
if(!rgb_matrix_indicators_user()){
return false;
}
if(f_bat_num_show) {
num_led_show();
}
@ -245,7 +240,8 @@ bool rgb_matrix_indicators_user(void)
}
/* qmk keyboard post init */
void keyboard_post_init_user(void) {
void keyboard_post_init_kb(void) {
gpio_init();
rf_uart_init();
wait_ms(500);
@ -254,10 +250,12 @@ void keyboard_post_init_user(void) {
break_all_key();
dial_sw_fast_scan();
londing_eeprom_data();
keyboard_post_init_user();
}
/* qmk housekeeping task */
void housekeeping_task_user(void) {
void housekeeping_task_kb(void) {
timer_pro();
uart_receive_pro();
@ -273,4 +271,6 @@ void housekeeping_task_user(void) {
side_led_show();
sleep_handle();
housekeeping_task_user();
}

View File

@ -33,10 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SD1_RX_PIN B7
#define SD1_RX_PAL_MODE 0
#define TAP_CODE_DELAY 8
#define DYNAMIC_KEYMAP_MACRO_DELAY 8
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
#define EECONFIG_USER_DATA_SIZE 8
#define EECONFIG_KB_DATA_SIZE 8

View File

@ -25,6 +25,13 @@
"rows": ["C14", "C15", "A0", "A1", "A2", "A3"]
},
"diode_direction": "COL2ROW",
"dynamic_keymap": {
"layer_count": 8,
"micro_delay": 8
},
"qmk": {
"tap_keycode_delay": 8
},
"rgb_matrix": {
"driver": "ws2812",
"center_point": [80, 30],

View File

@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// layer Mac Fn
[1] = LAYOUT_75_ansi(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, SYS_PRT, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DEV_RESET, SLEEP_MODE, BAT_SHOW, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_TEST, _______, BAT_NUM, _______, MO(4), RGB_SPD, RGB_SPI, _______, _______, RGB_VAI, _______,
@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// layer win Fn
[3] = LAYOUT_75_ansi(
_______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DEV_RESET, SLEEP_MODE, BAT_SHOW, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_TEST, _______, BAT_NUM, _______, MO(4), RGB_SPD, RGB_SPI, _______, _______, RGB_VAI, _______,
@ -62,5 +62,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, SIDE_SPD, SIDE_SPI, _______, _______, SIDE_VAI, _______,
_______, _______, _______, _______, _______, MO(4), _______, SIDE_MOD, SIDE_VAD, SIDE_HUI)
_______, _______, _______, _______, _______, MO(4), _______, SIDE_MOD, SIDE_VAD, SIDE_HUI)
};

View File

@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// layer Mac Fn
[1] = LAYOUT_75_ansi(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, SYS_PRT, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DEV_RESET, SLEEP_MODE, BAT_SHOW, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_TEST, _______, BAT_NUM, _______, MO(4), RGB_SPD, RGB_SPI, _______, _______, RGB_VAI, _______,
@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// layer win Fn
[3] = LAYOUT_75_ansi(
_______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, LNK_BLE1, LNK_BLE2, LNK_BLE3, LNK_RF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DEV_RESET, SLEEP_MODE, BAT_SHOW, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, RGB_TEST, _______, BAT_NUM, _______, MO(4), RGB_SPD, RGB_SPI, _______, _______, RGB_VAI, _______,
@ -62,5 +62,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, SIDE_SPD, SIDE_SPI, _______, _______, SIDE_VAI, _______,
_______, _______, _______, _______, _______, MO(4), _______, SIDE_MOD, SIDE_VAD, SIDE_HUI)
_______, _______, _______, _______, _______, MO(4), _______, SIDE_MOD, SIDE_VAD, SIDE_HUI)
};

View File

@ -1,7 +1,7 @@
c# NuPhy Air75 V2
*NuPhy Air75 V2 is a standard 84 key keyboard.*
![NuPhy Air75 V2](https://bit.ly/486pSkN)
![NuPhy Air75 V2](https://imgur.com/R7jS2JC)
* Keyboard Maintainer: [nuphy](https://github.com/nuphy-src)
* Hardware Supported: NuPhy Air75 V2 PCB

View File

@ -1,7 +1,3 @@
SRC += side.c
SRC += rf.c
SRC += sleep.c
SRC += rf_driver.c
SRC += user_kb.c
SRC += side_driver.c
QUANTUM_LIB_SRC += uart.c
SRC += side.c rf.c sleep.c rf_driver.c user_kb.c side_driver.c
UART_DRIVER_REQUIRED = yes

View File

@ -124,7 +124,7 @@ void side_light_contol(uint8_t dir) {
side_light--;
}
user_config.ee_side_light = side_light;
eeconfig_update_user_datablock(&user_config);
eeconfig_update_kb_datablock(&user_config);
}
/**
@ -141,7 +141,7 @@ void side_speed_contol(uint8_t dir) {
if ((side_speed) < SIDE_SPEED_MAX) side_speed++;
}
user_config.ee_side_speed = side_speed;
eeconfig_update_user_datablock(&user_config);
eeconfig_update_kb_datablock(&user_config);
}
/**
@ -181,7 +181,7 @@ void side_colour_control(uint8_t dir) {
}
user_config.ee_side_rgb = side_rgb;
user_config.ee_side_colour = side_colour;
eeconfig_update_user_datablock(&user_config);
eeconfig_update_kb_datablock(&user_config);
}
/**
@ -204,7 +204,7 @@ void side_mode_control(uint8_t dir) {
}
side_play_point = 0;
user_config.ee_side_mode = side_mode;
eeconfig_update_user_datablock(&user_config);
eeconfig_update_kb_datablock(&user_config);
}
/**
@ -769,7 +769,7 @@ void device_reset_init(void) {
user_config.ee_side_rgb = side_rgb;
user_config.ee_side_colour = side_colour;
user_config.sleep_enable = true;
eeconfig_update_user_datablock(&user_config);
eeconfig_update_kb_datablock(&user_config);
}
/**

File diff suppressed because it is too large Load Diff

View File

@ -397,7 +397,7 @@ void timer_pro(void) {
* @brief londing eeprom data.
*/
void londing_eeprom_data(void) {
eeconfig_read_user_datablock(&user_config);
eeconfig_read_kb_datablock(&user_config);
if (user_config.default_brightness_flag != 0xA5) {
/* first power on, set rgb matrix brightness at middle level*/
rgb_matrix_sethsv(255, 255, RGB_MATRIX_MAXIMUM_BRIGHTNESS - RGB_MATRIX_VAL_STEP * 2);
@ -408,7 +408,7 @@ void londing_eeprom_data(void) {
user_config.ee_side_rgb = side_rgb;
user_config.ee_side_colour = side_colour;
user_config.sleep_enable = true;
eeconfig_update_user_datablock(&user_config);
eeconfig_update_kb_datablock(&user_config);
} else {
side_mode = user_config.ee_side_mode;
side_light = user_config.ee_side_light;