mirror of
https://github.com/opentx/opentx.git
synced 2025-07-20 23:05:12 +03:00
Merge remote-tracking branch 'origin/next' into
bsongis/Issue554_trims_relative_default Conflicts: radio/src/gui/menu_model.cpp
This commit is contained in:
commit
53c670deee
203 changed files with 10687 additions and 128 deletions
|
@ -829,6 +829,8 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
|
|||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// TODO check ... I removed negative toggle switches in the FW, no?
|
||||
if (attr & POPULATE_MSWITCHES) {
|
||||
if (attr & POPULATE_ONOFF) {
|
||||
item = RawSwitch(SWITCH_TYPE_ONM, 1);
|
||||
|
@ -847,6 +849,7 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
|
|||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (attr & POPULATE_ONOFF) {
|
||||
item = RawSwitch(SWITCH_TYPE_OFF);
|
||||
|
@ -892,6 +895,14 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
|
|||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(MultiposPots) * GetEepromInterface()->getCapability(MultiposPotsPositions); i++) {
|
||||
item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
}
|
||||
|
||||
if (attr & POPULATE_ONOFF) {
|
||||
item = RawSwitch(SWITCH_TYPE_ON);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
|
@ -1073,7 +1084,8 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
|
|||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == source) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
} else if (flags & POPULATE_TELEMETRY) {
|
||||
}
|
||||
else if (flags & POPULATE_TELEMETRY) {
|
||||
for (int i=0; i<TELEMETRY_SOURCES_COUNT; i++) {
|
||||
item = RawSource(SOURCE_TYPE_TELEMETRY, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue