Fixed special switches and play value, volume & backlight custom functions
This commit is contained in:
@@ -171,6 +171,11 @@ Node convert<CustomFunctionData>::encode(const CustomFunctionData& rhs)
|
|||||||
def += ",";
|
def += ",";
|
||||||
def += std::to_string(rhs.param);
|
def += std::to_string(rhs.param);
|
||||||
} break;
|
} break;
|
||||||
|
case FuncPlayValue:
|
||||||
|
case FuncVolume:
|
||||||
|
case FuncBacklight: {
|
||||||
|
def += YamlRawSourceEncode(RawSource(rhs.param));
|
||||||
|
} break;
|
||||||
case FuncAdjustGV1: {
|
case FuncAdjustGV1: {
|
||||||
// + GV #
|
// + GV #
|
||||||
def += std::to_string(p1);
|
def += std::to_string(p1);
|
||||||
@@ -280,6 +285,13 @@ bool convert<CustomFunctionData>::decode(const Node& node,
|
|||||||
rhs.func = (AssignFunc)((int)rhs.func + tmr);
|
rhs.func = (AssignFunc)((int)rhs.func + tmr);
|
||||||
def >> rhs.param;
|
def >> rhs.param;
|
||||||
} break;
|
} break;
|
||||||
|
case FuncPlayValue:
|
||||||
|
case FuncVolume:
|
||||||
|
case FuncBacklight: {
|
||||||
|
std::string src_str;
|
||||||
|
getline(def, src_str, ',');
|
||||||
|
rhs.param = YamlRawSourceDecode(src_str).toValue();
|
||||||
|
} break;
|
||||||
case FuncAdjustGV1: {
|
case FuncAdjustGV1: {
|
||||||
// + GV #
|
// + GV #
|
||||||
int gvar_idx=0;
|
int gvar_idx=0;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ std::string YamlRawSwitchEncode(const RawSwitch& rhs)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
sw_str += getCurrentFirmware()->getRawSwitchTypesTag(sval);
|
sw_str += getCurrentFirmware()->getRawSwitchTypesTag(rhs.type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return sw_str;
|
return sw_str;
|
||||||
|
|||||||
Reference in New Issue
Block a user