Move special source lookup to firmware

This commit is contained in:
elecpower
2021-12-31 10:53:10 +01:00
committed by Raphael Coeffic
parent 6f54fad526
commit 4c92f9dbc9
5 changed files with 63 additions and 18 deletions
+21
View File
@@ -418,3 +418,24 @@ QStringList RawSource::getSwitchList(Boards board) const
}
return ret;
}
// static
StringTagMappingTable RawSource::getSpecialTypesLookupTable()
{
StringTagMappingTable tbl;
tbl.insert(tbl.end(), {
{std::to_string(SOURCE_TYPE_SPECIAL_TX_BATT), "TX_VOLTAGE"},
{std::to_string(SOURCE_TYPE_SPECIAL_TX_TIME), "TX_TIME"},
{std::to_string(SOURCE_TYPE_SPECIAL_TX_GPS), "TX_GPS"},
{std::to_string(SOURCE_TYPE_SPECIAL_RESERVED1), "RESERVED1"},
{std::to_string(SOURCE_TYPE_SPECIAL_RESERVED2), "RESERVED2"},
{std::to_string(SOURCE_TYPE_SPECIAL_RESERVED3), "RESERVED3"},
{std::to_string(SOURCE_TYPE_SPECIAL_RESERVED4), "RESERVED4"},
{std::to_string(SOURCE_TYPE_SPECIAL_TIMER1), "TIMER1"},
{std::to_string(SOURCE_TYPE_SPECIAL_TIMER2), "TIMER2"},
{std::to_string(SOURCE_TYPE_SPECIAL_TIMER3), "TIMER3"},
});
return tbl;
}