Last minute modification for 6-pos switch steps detection. Needs to be
tested again!
This commit is contained in:
@@ -1459,7 +1459,8 @@ void menuGeneralHardware(uint8_t event)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XPOT_DELTA 5
|
#define XPOT_DELTA 7
|
||||||
|
#define XPOT_DELAY 15 /* cycles */
|
||||||
|
|
||||||
void menuCommonCalib(uint8_t event)
|
void menuCommonCalib(uint8_t event)
|
||||||
{
|
{
|
||||||
@@ -1480,7 +1481,7 @@ void menuCommonCalib(uint8_t event)
|
|||||||
else {
|
else {
|
||||||
if (reusableBuffer.calib.xpotsCalib[idx].lastCount < 255) reusableBuffer.calib.xpotsCalib[idx].lastCount++;
|
if (reusableBuffer.calib.xpotsCalib[idx].lastCount < 255) reusableBuffer.calib.xpotsCalib[idx].lastCount++;
|
||||||
}
|
}
|
||||||
if (reusableBuffer.calib.xpotsCalib[idx].lastCount == 10/*100ms*/) {
|
if (reusableBuffer.calib.xpotsCalib[idx].lastCount == XPOT_DELAY) {
|
||||||
int16_t position = reusableBuffer.calib.xpotsCalib[idx].lastPosition;
|
int16_t position = reusableBuffer.calib.xpotsCalib[idx].lastPosition;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (int j=0; j<count; j++) {
|
for (int j=0; j<count; j++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user