Use Boards for trim switches

This commit is contained in:
elecpower
2021-12-31 10:53:10 +01:00
committed by Raphael Coeffic
parent 609604d141
commit 1c7bece090
5 changed files with 71 additions and 23 deletions
+10 -1
View File
@@ -292,7 +292,8 @@ class Firmware
base(base),
eepromInterface(nullptr),
analogInputNamesLookupTable(Boards::getAnalogNamesLookupTable(board)),
switchesLookupTable(Boards::getSwitchesLookupTable(board))
switchesLookupTable(Boards::getSwitchesLookupTable(board)),
trimSwitchesLookupTable(Boards::getTrimSwitchesLookupTable(board))
{
}
@@ -411,10 +412,17 @@ class Firmware
return &switchesLookupTable;
}
const StringTagMappingTable* getTrimSwitchesLookupTable()
{
return &trimSwitchesLookupTable;
}
int getAnalogInputIndex(const char * tag);
std::string getAnalogInputTag(unsigned int index);
int getSwitchesIndex(const char * tag);
std::string getSwitchesTag(unsigned int index);
int getTrimSwitchesIndex(const char * tag);
std::string getTrimSwitchesTag(unsigned int index);
protected:
QString id;
@@ -425,6 +433,7 @@ class Firmware
EEPROMInterface * eepromInterface;
const StringTagMappingTable analogInputNamesLookupTable;
const StringTagMappingTable switchesLookupTable;
const StringTagMappingTable trimSwitchesLookupTable;
QList<const char *> languages;
//QList<const char *> ttslanguages;
OptionsList opts;