More unit tests and unified target for all tests (#6661)
* added general settings tests * fixed pre-219 switchUnlockState (CPN) * X7 radio settings tests * updated X10 model * patched TESTS_PATH to point directly at the complete tests path * fixed horus general settings switch conversion * cpn x10 general settings tests * fixed horus cpn import * use x10 model from otx file to ease editing with companion * added make targets "gtests" and "tests" gtests builds all the tests (radio & companion) tests builds and executes all the tests (radio & companion) * fixed companion tests cmake * fixed gtests-radio target * fixed commit tests * fixed converting LS & RS on X10 * fixed converting global functions on X10 * fixed source conversion on X10 * fixed throttle source on X10 * fixed throttle source on radio and companion * more checks and re-enabled Horus screenData copy * more tests (X10) * [X10] restore correct direction for RS & LS * [horus] convert "Value" widget source * fixed conversion of ModelHeader::bitmap length * added missing X10 radio tests to companion tests * fixed conversion of telemetry sources in logical switches * [horus] fixed potential crash * fixed "AND switch" conversion in logical switches
This commit is contained in:
committed by
Bertrand Songis
parent
274528ee1d
commit
5db30ea7bc
@@ -1184,7 +1184,7 @@ void SetupPanel::on_trimIncrement_currentIndexChanged(int index)
|
||||
void SetupPanel::on_throttleSource_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
model->thrTraceSrc = index;
|
||||
model->thrTraceSrc = ui->throttleSource->currentData().toUInt();
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
@@ -1244,14 +1244,20 @@ void SetupPanel::populateThrottleSourceCB()
|
||||
Board::Type board = firmware->getBoard();
|
||||
lock = true;
|
||||
ui->throttleSource->clear();
|
||||
ui->throttleSource->addItem(tr("THR"));
|
||||
for (int i=0; i<getBoardCapability(board, Board::Pots)+getBoardCapability(board, Board::Sliders); i++) {
|
||||
ui->throttleSource->addItem(firmware->getAnalogInputName(4+i), i);
|
||||
ui->throttleSource->addItem(tr("THR"), 0);
|
||||
|
||||
int idx=1;
|
||||
for (int i=0; i<getBoardCapability(board, Board::Pots)+getBoardCapability(board, Board::Sliders); i++, idx++) {
|
||||
if (RawSource(SOURCE_TYPE_STICK,4+i).isAvailable(model,&generalSettings,board)) {
|
||||
ui->throttleSource->addItem(firmware->getAnalogInputName(4+i), idx);
|
||||
}
|
||||
}
|
||||
for (int i=0; i<firmware->getCapability(Outputs); i++) {
|
||||
ui->throttleSource->addItem(RawSource(SOURCE_TYPE_CH, i).toString(model, &generalSettings));
|
||||
for (int i=0; i<firmware->getCapability(Outputs); i++, idx++) {
|
||||
ui->throttleSource->addItem(RawSource(SOURCE_TYPE_CH, i).toString(model, &generalSettings), idx);
|
||||
}
|
||||
ui->throttleSource->setCurrentIndex(model->thrTraceSrc);
|
||||
|
||||
int thrTraceSrcIdx = ui->throttleSource->findData(model->thrTraceSrc);
|
||||
ui->throttleSource->setCurrentIndex(thrTraceSrcIdx);
|
||||
lock = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user