Remove retry timer for set trim
This commit is contained in:
@@ -213,17 +213,7 @@ void OpenTxSimulator::setTrim(unsigned int idx, int value)
|
|||||||
if (i < 4) // swap axes
|
if (i < 4) // swap axes
|
||||||
i = modn12x3[4 * getStickMode() + idx];
|
i = modn12x3[4 * getStickMode() + idx];
|
||||||
uint8_t phase = getTrimFlightMode(getFlightMode(), i);
|
uint8_t phase = getTrimFlightMode(getFlightMode(), i);
|
||||||
|
setTrimValue(phase, i, value);
|
||||||
if (!setTrimValue(phase, i, value)) {
|
|
||||||
QTimer *timer = new QTimer(this);
|
|
||||||
timer->setSingleShot(true);
|
|
||||||
connect(timer, &QTimer::timeout, [=]() {
|
|
||||||
emit trimValueChange(idx, 0);
|
|
||||||
emit outputValueChange(OUTPUT_SRC_TRIM_VALUE, idx, 0);
|
|
||||||
timer->deleteLater();
|
|
||||||
});
|
|
||||||
timer->start(50);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenTxSimulator::setTrainerInput(unsigned int inputNumber, int16_t value)
|
void OpenTxSimulator::setTrainerInput(unsigned int inputNumber, int16_t value)
|
||||||
|
|||||||
Reference in New Issue
Block a user