feat: Add trainer virtual switch (#3937)

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
3djc
2023-10-16 08:41:40 +10:00
committed by GitHub
co-authored by Peter Feerick
parent ee9d50dca4
commit d396b38e8b
20 changed files with 33 additions and 2 deletions
@@ -167,6 +167,7 @@ RawSwitchItemModel::RawSwitchItemModel(const GeneralSettings * const generalSett
setUpdateMask(IMUE_FlightModes | IMUE_LogicalSwitches | IMUE_TeleSensors | IMUE_FunctionSwitches);
// Descending switch direction: NOT (!) switches
addItems(SWITCH_TYPE_TRAINER, -1);
addItems(SWITCH_TYPE_ACT, -1);
addItems(SWITCH_TYPE_SENSOR, -firmware->getCapability(Sensors));
addItems(SWITCH_TYPE_TELEMETRY, -1);
@@ -190,6 +191,7 @@ RawSwitchItemModel::RawSwitchItemModel(const GeneralSettings * const generalSett
addItems(SWITCH_TYPE_ON, 1);
addItems(SWITCH_TYPE_ONE, 1);
addItems(SWITCH_TYPE_ACT, 1);
addItems(SWITCH_TYPE_TRAINER, 1);
}
void RawSwitchItemModel::setDynamicItemData(QStandardItem * item, const RawSwitch & rsw) const