Add companion decoding of crsf mod option
This commit is contained in:
committed by
Raphael Coeffic
parent
cb739fc11e
commit
5e457172a2
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "yaml_moduledata.h"
|
#include "yaml_moduledata.h"
|
||||||
#include "yaml_generalsettings.h"
|
#include "yaml_generalsettings.h"
|
||||||
|
#include "eeprominterface.h"
|
||||||
#include "moduledata.h"
|
#include "moduledata.h"
|
||||||
#include "rawsource.h"
|
#include "rawsource.h"
|
||||||
|
|
||||||
@@ -410,6 +411,11 @@ bool convert<ModuleData>::decode(const Node& node, ModuleData& rhs)
|
|||||||
} else if (mod["ghost"]) {
|
} else if (mod["ghost"]) {
|
||||||
Node ghost = mod["ghost"];
|
Node ghost = mod["ghost"];
|
||||||
ghost["raw12bits"] >> rhs.ghost.raw12bits;
|
ghost["raw12bits"] >> rhs.ghost.raw12bits;
|
||||||
|
} else if (mod["crsf"]) {
|
||||||
|
Node crsf = mod["crsf"];
|
||||||
|
YamlTelemetryBaudrate telemetryBaudrate;
|
||||||
|
crsf["telemetryBaudrate"] >> telemetryBaudrate.value;
|
||||||
|
telemetryBaudrate.toCpn(&rhs.crsf.telemetryBaudrate, getCurrentFirmware()->getBoard());
|
||||||
} else if (mod["flysky"]) {
|
} else if (mod["flysky"]) {
|
||||||
//TODO
|
//TODO
|
||||||
} else if (mod["afhds3"]) {
|
} else if (mod["afhds3"]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user