Add potsWarnPosition
This commit is contained in:
committed by
Raphael Coeffic
parent
2dedf63138
commit
bc115319a5
@@ -488,7 +488,10 @@ Node convert<ModelData>::encode(const ModelData& rhs)
|
|||||||
YamlPotsWarnEnabled potsWarnEnabled(&rhs.potsWarnEnabled[CPN_MAX_POTS + CPN_MAX_SLIDERS]);
|
YamlPotsWarnEnabled potsWarnEnabled(&rhs.potsWarnEnabled[CPN_MAX_POTS + CPN_MAX_SLIDERS]);
|
||||||
node["potsWarnEnabled"] = potsWarnEnabled.value;
|
node["potsWarnEnabled"] = potsWarnEnabled.value;
|
||||||
|
|
||||||
// potsWarnPosition[]
|
for (int i = 0; i < CPN_MAX_POTS + CPN_MAX_SLIDERS; i++) {
|
||||||
|
if (rhs.potsWarnPosition[i] != 0)
|
||||||
|
node["potsWarnPosition"][std::to_string(i)]["val"] = rhs.potsWarnPosition[i];
|
||||||
|
}
|
||||||
|
|
||||||
node["displayChecklist"] = (int)rhs.displayChecklist;
|
node["displayChecklist"] = (int)rhs.displayChecklist;
|
||||||
|
|
||||||
@@ -615,7 +618,7 @@ bool convert<ModelData>::decode(const Node& node, ModelData& rhs)
|
|||||||
node["potsWarnEnabled"] >> potsWarnEnabled.value;
|
node["potsWarnEnabled"] >> potsWarnEnabled.value;
|
||||||
potsWarnEnabled.toCpn(&rhs.potsWarnEnabled[CPN_MAX_POTS + CPN_MAX_SLIDERS]);
|
potsWarnEnabled.toCpn(&rhs.potsWarnEnabled[CPN_MAX_POTS + CPN_MAX_SLIDERS]);
|
||||||
|
|
||||||
// potsWarnPosition[]
|
node["potsWarnPosition"] >> rhs.potsWarnPosition;
|
||||||
|
|
||||||
node["displayChecklist"] >> rhs.displayChecklist;
|
node["displayChecklist"] >> rhs.displayChecklist;
|
||||||
|
|
||||||
@@ -633,8 +636,6 @@ bool convert<ModelData>::decode(const Node& node, ModelData& rhs)
|
|||||||
|
|
||||||
node["toplcdTimer"] >> rhs.toplcdTimer;
|
node["toplcdTimer"] >> rhs.toplcdTimer;
|
||||||
|
|
||||||
// customScreens
|
|
||||||
// topBarData
|
|
||||||
node["screenData"] >> rhs.customScreens.customScreenData;
|
node["screenData"] >> rhs.customScreens.customScreenData;
|
||||||
node["topbarData"] >> rhs.topBarData;
|
node["topbarData"] >> rhs.topBarData;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user