tested software encoder
This commit is contained in:
1 parent
97114cb54d
commit
2e61dab738
6 files changed
+68
-10
No files matched your search
@@ -151,7 +151,8 @@ int32_t HwRotaryEncoder::read(void)
|
||||
// Trigger READ CLR ACC
|
||||
NRF_QDEC->TASKS_RDCLRACC = 1;
|
||||
|
||||
int32_t val = NRF_QDEC->ACCREAD;
|
||||
// Nordic QDEC CW is negative, CCW is positve --> invert
|
||||
int32_t val = -(NRF_QDEC->ACCREAD);
|
||||
|
||||
// Add to absolute value and buffered step
|
||||
_abs += val;
|
||||
|
||||
Reference in new issue
Block a user