diff options
| author | QMK Bot <hello@qmk.fm> | 2024-05-17 22:00:13 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2024-05-17 22:00:13 +0000 |
| commit | a871dab668fc466572b049708a95e6aff0dc4607 (patch) | |
| tree | ede1389a236d1458046f6da1fd73ccd0c45877ff /quantum/split_common | |
| parent | b1ed1c6082e9a1e8c2a6e865c30cb2f3aaf31107 (diff) | |
| parent | 47bc02b2ff84c9a35b8f778a8a1012f737372eea (diff) | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'quantum/split_common')
| -rw-r--r-- | quantum/split_common/transactions.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index decf5e5ede..6c1aeb284d 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c | |||
| @@ -715,16 +715,17 @@ static bool pointing_handlers_master(matrix_row_t master_matrix[], matrix_row_t | |||
| 715 | return true; | 715 | return true; |
| 716 | } | 716 | } |
| 717 | # endif | 717 | # endif |
| 718 | static uint32_t last_update = 0; | 718 | static uint32_t last_update = 0; |
| 719 | static uint16_t last_cpi = 0; | 719 | static uint32_t last_cpi_update = 0; |
| 720 | static uint16_t last_cpi = 0; | ||
| 720 | report_mouse_t temp_state; | 721 | report_mouse_t temp_state; |
| 721 | uint16_t temp_cpi; | 722 | uint16_t temp_cpi; |
| 722 | bool okay = read_if_checksum_mismatch(GET_POINTING_CHECKSUM, GET_POINTING_DATA, &last_update, &temp_state, &split_shmem->pointing.report, sizeof(temp_state)); | 723 | bool okay = read_if_checksum_mismatch(GET_POINTING_CHECKSUM, GET_POINTING_DATA, &last_update, &temp_state, &split_shmem->pointing.report, sizeof(temp_state)); |
| 723 | if (okay) pointing_device_set_shared_report(temp_state); | 724 | if (okay) pointing_device_set_shared_report(temp_state); |
| 724 | temp_cpi = pointing_device_get_shared_cpi(); | 725 | temp_cpi = pointing_device_get_shared_cpi(); |
| 725 | if (temp_cpi && last_cpi != temp_cpi) { | 726 | if (temp_cpi) { |
| 726 | split_shmem->pointing.cpi = temp_cpi; | 727 | split_shmem->pointing.cpi = temp_cpi; |
| 727 | okay = transport_write(PUT_POINTING_CPI, &split_shmem->pointing.cpi, sizeof(split_shmem->pointing.cpi)); | 728 | okay = send_if_condition(PUT_POINTING_CPI, &last_cpi_update, last_cpi != temp_cpi, &split_shmem->pointing.cpi, sizeof(split_shmem->pointing.cpi)); |
| 728 | if (okay) { | 729 | if (okay) { |
| 729 | last_cpi = temp_cpi; | 730 | last_cpi = temp_cpi; |
| 730 | } | 731 | } |
