Skip to content

Commit

Permalink
Reset uart repeat timer after each report send
Browse files Browse the repository at this point in the history
  • Loading branch information
jincao1 committed Feb 24, 2024
1 parent f0a2386 commit 3b777a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions keyboards/nuphy/air75_v2/ansi/ansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ extern uint16_t sleep_time_delay;
extern user_config_t user_config;
extern DEV_INFO_STRUCT dev_info;
extern uint8_t rf_blink_cnt;
extern uint32_t uart_rpt_timer;

/* qmk process record */
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
no_act_time = 0;
rf_linking_time = 0;
uart_rpt_timer = timer_read32(); // reset uart repeat timer.

if (!process_record_user(keycode, record)) {
return false;
Expand Down
3 changes: 2 additions & 1 deletion keyboards/nuphy/air75_v2/ansi/rf.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ void uart_send_report_repeat(void) {
// queue is not empty, send from queue.
if (!rf_queue.is_empty()) {
uart_send_repeat_from_queue();
uart_rpt_timer = timer_read32();
return;
}

Expand Down Expand Up @@ -521,6 +520,8 @@ void uart_send_report(uint8_t report_type, uint8_t *report_buf, uint8_t report_s
Usart_Mgr.TXDBuf[4 + report_size] = get_checksum(&Usart_Mgr.TXDBuf[4], report_size);

UART_Send_Bytes(&Usart_Mgr.TXDBuf[0], report_size + 5);

uart_rpt_timer = timer_read32(); // reset uart repeat timer.
}

/**
Expand Down

0 comments on commit 3b777a0

Please sign in to comment.