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
@@ -166,7 +166,7 @@ RawSwitch YamlRawSwitchDecode(const std::string& sw_str)
int sw_type = getCurrentFirmware()->getRawSwitchTypesIndex(sw_str_tmp.c_str());
if (sw_type >= 0) {
rhs.type = (RawSwitchType)sw_type;
if (rhs.type == SWITCH_TYPE_TELEMETRY || rhs.type == SWITCH_TYPE_ACT || rhs.type == SWITCH_TYPE_ONE)
if (rhs.type == SWITCH_TYPE_TELEMETRY || rhs.type == SWITCH_TYPE_TRAINER || rhs.type == SWITCH_TYPE_ACT || rhs.type == SWITCH_TYPE_ONE)
// these types use index = 1
rhs.index = 1;
else