Fix custom func reset
This commit is contained in:
committed by
Raphael Coeffic
parent
340e7627d5
commit
62028ffcce
@@ -97,7 +97,7 @@ static const YamlLookupTable resetLut = {
|
|||||||
{ 1, "Tmr2" },
|
{ 1, "Tmr2" },
|
||||||
{ 2, "Tmr3" },
|
{ 2, "Tmr3" },
|
||||||
{ 3, "All" },
|
{ 3, "All" },
|
||||||
{ 5, "Tele" },
|
{ 4, "Tele" },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const YamlLookupTable gvarModeLut = {
|
static const YamlLookupTable gvarModeLut = {
|
||||||
@@ -262,12 +262,13 @@ bool convert<CustomFunctionData>::decode(const Node& node,
|
|||||||
strncpy(rhs.paramarm, file_str.c_str(), sizeof(rhs.paramarm)-1);
|
strncpy(rhs.paramarm, file_str.c_str(), sizeof(rhs.paramarm)-1);
|
||||||
} break;
|
} break;
|
||||||
case FuncReset: {
|
case FuncReset: {
|
||||||
|
std::string rst_str;
|
||||||
|
getline(def, rst_str, ',');
|
||||||
try {
|
try {
|
||||||
def >> rhs.param;
|
rhs.param = std::stoi(rst_str); // TODO: check this works for radio generated if not then encode and here will need fixing
|
||||||
rhs.param += 5; // + FUNC_RESET_PARAM_FIRST_TELEM
|
|
||||||
break;
|
break;
|
||||||
} catch(...) {}
|
} catch(...) {}
|
||||||
Node(def.str()) >> resetLut >> rhs.param;
|
Node(rst_str.c_str()) >> resetLut >> rhs.param;
|
||||||
} break;
|
} break;
|
||||||
case FuncSetTimer1: {
|
case FuncSetTimer1: {
|
||||||
// + timer #
|
// + timer #
|
||||||
|
|||||||
Reference in New Issue
Block a user