feat: WASM modules based simulation in Companion (#6435)

This commit is contained in:
Raphael Coeffic
2026-03-20 12:19:17 +10:00
committed by GitHub
parent 5f8a38bb18
commit 04a2231aee
80 changed files with 3126 additions and 2220 deletions
+8 -12
View File
@@ -31,6 +31,7 @@ static const StringTagMappingTable inputTypesLookupTable = {
{std::to_string(Board::AIT_FLEX), "FLEX"},
{std::to_string(Board::AIT_VBAT), "VBAT"},
{std::to_string(Board::AIT_RTC_BAT), "RTC_BAT"},
{std::to_string(Board::AIT_LUX), "LUX"},
{std::to_string(Board::AIT_SWITCH), "SWITCH"},
};
@@ -119,18 +120,13 @@ void BoardJson::afterLoadFixups(Board::Type board, InputsTable * inputs, Switche
}
}
if (IS_RADIOMASTER_TX16SMK3(board)) {
if (getInputIndex(inputs, "LIGHT", Board::LVT_TAG) < 0) {
InputDefn defn;
defn.type = AIT_FLEX;
defn.tag = "LIGHT";
defn.name = "Ambient light";
defn.shortName = "Light";
defn.flexType = FLEX_POT;
defn.inverted = false;
defn.cfgYaml = Board::LVT_TAG;
defn.refYaml = Board::LVT_TAG; // non-default
inputs->insert(inputs->end(), defn);
// Set default labels for LUX inputs if not provided by JSON
for (auto &defn : *inputs) {
if (defn.type == AIT_LUX) {
if (defn.name.empty())
defn.name = "Ambient light";
if (defn.shortName.empty())
defn.shortName = "Light";
}
}