Move switch types lookup to rawswitch and firmware

This commit is contained in:
elecpower
2021-12-31 10:53:10 +01:00
committed by Raphael Coeffic
parent 245d64f521
commit 924942ca0d
5 changed files with 79 additions and 15 deletions
+2
View File
@@ -22,6 +22,7 @@
#include "boards.h"
#include "constants.h"
#include "datahelpers.h"
#include <QtCore>
@@ -89,6 +90,7 @@ class RawSwitch {
bool isSet() const { return type != SWITCH_TYPE_NONE || index != 0; }
void clear() { type = SWITCH_TYPE_NONE; index = 0; }
QStringList getSwitchList(Boards board) const;
static StringTagMappingTable getRawSwitchTypesLookupTable();
bool operator== ( const RawSwitch& other) const {
return (this->type == other.type) && (this->index == other.index);