fix(cpn): Radio settings yaml for adc refactor (#3862)
* Remove commented lines * Restrict calibration to sticks, pots and sliders * Fix pots and sliders config to support pre and post adc refactor * fix: pfeerick sucks at rebases * chore: Add more bits missed during rebase * chore(cpn): use adc version constant * fix(cpn): calibration encode mapping --------- Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
co-authored by
elecpower
parent
1177891750
commit
50bbea48bd
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "yaml_ops.h"
|
||||
|
||||
SemanticVersion radioSettingsVersion;
|
||||
SemanticVersion modelSettingsVersion;
|
||||
|
||||
YAML::Node operator >> (const YAML::Node& node, const YamlLookupTable& lut)
|
||||
{
|
||||
if (node && node.IsScalar()) {
|
||||
@@ -32,7 +35,7 @@ YAML::Node operator >> (const YAML::Node& node, const YamlLookupTable& lut)
|
||||
|
||||
if (it != lut.end()) {
|
||||
return YAML::Node(it->first);
|
||||
}
|
||||
}
|
||||
return YAML::Node();
|
||||
}
|
||||
|
||||
@@ -63,7 +66,7 @@ std::string LookupValue(const YamlLookupTable& lut, const int& value)
|
||||
if (elmt.first == value) return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
if (it != lut.end()) {
|
||||
return it->second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user