Add support for analogs with name different from tag

This commit is contained in:
Raphael Coeffic
2021-12-31 10:53:09 +01:00
parent 91ea5998b7
commit ac3e2a7c88
7 changed files with 120 additions and 111 deletions
+4 -7
View File
@@ -291,11 +291,6 @@ class Firmware
eepromInterface(nullptr),
analogInputNamesLookupTable(Boards::getAnalogNamesLookupTable(board))
{
/* qDebug() << "board:" << Boards::getBoardName(board);
* for_each(analogInputNamesLookupTable.begin(), analogInputNamesLookupTable.end(), [=](const Int2StringMapping& row) {
* qDebug() << "index:" << row.first << "value:" << row.second.c_str();
* });
*/
}
virtual ~Firmware() { }
@@ -403,11 +398,13 @@ class Firmware
currentVariant = value;
}
const Int2StringMappingTable * getAnalogIndexNamesLookupTable()
const StringTagMappingTable* getAnalogIndexNamesLookupTable()
{
return &analogInputNamesLookupTable;
}
int getAnalogInputIndex(const char * tag);
protected:
QString id;
QString name;
@@ -415,7 +412,7 @@ class Firmware
unsigned int variantBase;
Firmware * base;
EEPROMInterface * eepromInterface;
const Int2StringMappingTable analogInputNamesLookupTable;
const StringTagMappingTable analogInputNamesLookupTable;
QList<const char *> languages;
//QList<const char *> ttslanguages;
OptionsList opts;