Commit 97b7a34
committed
Check analog range calibration for change
Instead of detecting simply if the ADC value changed, this now checks if the changed value is outside of the calibrated range (in the same direction it was previously). If so, the user-facing classes aren't going to care and can safely ignore the update.
This was written specifically to solve an issue with the pedals, which don't need to send constant updates when they're at their resting position.1 parent b0bc51a commit 97b7a34
1 file changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
271 | 272 | | |
272 | | - | |
| 273 | + | |
273 | 274 | | |
274 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
275 | 298 | | |
276 | 299 | | |
277 | 300 | | |
| |||
0 commit comments