Skip to content

Commit

Permalink
fix(direct): the size of futs for waiting is incorrect
Browse files Browse the repository at this point in the history
keyboard cannot start scanning when some keys are pressed
  • Loading branch information
drindr committed Dec 17, 2024
1 parent d4e4786 commit 10ddf43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rmk-macro/src/split/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ fn expand_split_peripheral_entry(
.expect("Missing central ble address");
let row = peripheral_config.rows;
let col = peripheral_config.cols;
let size = row + col;
let peripheral_addr = peripheral_config.ble_addr.expect(
"Peripheral should have a ble address, please check the `ble_addr` field in `keyboard.toml`",
);
let low_active = peripheral_config.matrix.direct_pin_low_active;
match peripheral_config.matrix.matrix_type {
MatrixType::direct_pin => {
let size = row * col;
quote! {
::rmk::split::peripheral::run_rmk_split_peripheral_direct_pin::<
::embassy_nrf::gpio::Input<'_>,
Expand All @@ -184,6 +184,7 @@ fn expand_split_peripheral_entry(
}
}
MatrixType::normal => {
let size = row + col;
quote! {
::rmk::split::peripheral::run_rmk_split_peripheral::<
::embassy_nrf::gpio::Input<'_>,
Expand Down
2 changes: 1 addition & 1 deletion rmk/src/split/central.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ impl<
use heapless::Vec;
use embassy_futures::select::select_slice;
if let Some(start_time) = self.scan_start {
// If no key press over 1ms, stop scanning and wait for interupt
// If no key press over 1ms, stop scanning and wait for interrupt
if start_time.elapsed().as_millis() <= 1 {
return;
} else {
Expand Down

0 comments on commit 10ddf43

Please sign in to comment.