mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 17:55:19 +03:00
Last minute modification for 6-pos switch steps detection. Needs to be
tested again!
This commit is contained in:
parent
8f7f308ead
commit
abfbc75fed
1 changed files with 3 additions and 2 deletions
|
@ -1459,7 +1459,8 @@ void menuGeneralHardware(uint8_t event)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define XPOT_DELTA 5
|
||||
#define XPOT_DELTA 7
|
||||
#define XPOT_DELAY 15 /* cycles */
|
||||
|
||||
void menuCommonCalib(uint8_t event)
|
||||
{
|
||||
|
@ -1480,7 +1481,7 @@ void menuCommonCalib(uint8_t event)
|
|||
else {
|
||||
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;
|
||||
bool found = false;
|
||||
for (int j=0; j<count; j++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue