fix: Trainer jack initialisation and driver cleanup (#3811)
This commit is contained in:
@@ -241,10 +241,10 @@ void OpenTxSimulator::setTrim(unsigned int idx, int value)
|
||||
|
||||
void OpenTxSimulator::setTrainerInput(unsigned int inputNumber, int16_t value)
|
||||
{
|
||||
static unsigned dim = DIM(ppmInput);
|
||||
static unsigned dim = DIM(trainerInput);
|
||||
//setTrainerTimeout(100);
|
||||
if (inputNumber < dim)
|
||||
ppmInput[inputNumber] = qMin(qMax((int16_t)-512, value), (int16_t)512);
|
||||
trainerInput[inputNumber] = qMin(qMax((int16_t)-512, value), (int16_t)512);
|
||||
}
|
||||
|
||||
void OpenTxSimulator::setInputValue(int type, uint8_t index, int16_t value)
|
||||
@@ -411,7 +411,7 @@ void OpenTxSimulator::lcdFlushed()
|
||||
|
||||
void OpenTxSimulator::setTrainerTimeout(uint16_t ms)
|
||||
{
|
||||
ppmInputValidityTimer = ms;
|
||||
trainerInputValidityTimer = ms;
|
||||
}
|
||||
|
||||
void OpenTxSimulator::sendTelemetry(const QByteArray data)
|
||||
|
||||
Reference in New Issue
Block a user