diff options
| author | Ulf Lilleengen <[email protected]> | 2025-05-09 12:39:37 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-09 12:39:37 +0200 |
| commit | aa8703360e913ae39cf8f24aae4a68158b7d6208 (patch) | |
| tree | 00592070bf6609994f540e1b515055edf6d2c295 | |
| parent | 4dbaa018703f0362d1d20de30817f80d1dbdea35 (diff) | |
| parent | a97be9c7400cb6608ff94ef3c887ac7cc816e4ec (diff) | |
Merge pull request #4168 from yutannihilation/fix/rotary-encoder-rxf-negative-value
Fix `rotary_encoder_rfx` example to handle negative values
| -rw-r--r-- | examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs b/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs index ccc601661..33499babb 100644 --- a/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs +++ b/examples/rp235x/src/bin/pio_rotary_encoder_rxf.rs | |||
| @@ -88,8 +88,8 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> { | |||
| 88 | Self { sm } | 88 | Self { sm } |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | pub async fn read(&mut self) -> u32 { | 91 | pub async fn read(&mut self) -> i32 { |
| 92 | self.sm.get_rxf_entry(0) | 92 | self.sm.get_rxf_entry(0) as i32 |
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| 95 | 95 | ||
