Issue 61 fixed
This commit is contained in:
@@ -4227,8 +4227,6 @@ void menuModelCustomFunctions(uint8_t event)
|
||||
if (active) {
|
||||
#if defined(CPUARM)
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, CFN_FUNC(sd), FUNC_MAX-1);
|
||||
if (checkIncDec_Ret)
|
||||
CFN_RESET_PARAM(sd);
|
||||
#else
|
||||
if (CFN_FUNC(sd) < FUNC_TRAINER) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, sd->internal.func_safety.func, 16);
|
||||
@@ -4239,6 +4237,7 @@ void menuModelCustomFunctions(uint8_t event)
|
||||
sd->internal.func_safety.func = 15;
|
||||
}
|
||||
#endif
|
||||
if (checkIncDec_Ret) CFN_RESET(sd);
|
||||
}
|
||||
}
|
||||
else if (attr) {
|
||||
|
||||
+2
-2
@@ -685,7 +685,7 @@ PACK(typedef struct t_CustomFnData { // Function Switches data
|
||||
#define CFN_PLAY_REPEAT(p) ((p)->active)
|
||||
#define CFN_GVAR_MODE(p) ((p)->mode)
|
||||
#define CFN_PARAM(p) ((p)->param.composite.val)
|
||||
#define CFN_RESET_PARAM(p) memset(&(p)->param, 0, sizeof((p)->param))
|
||||
#define CFN_RESET(p) { p->active = 0; memset(&(p)->param, 0, sizeof((p)->param)); }
|
||||
#else
|
||||
PACK(typedef struct t_CustomFnData { // Function Switches data
|
||||
int8_t swtch; // input
|
||||
@@ -714,7 +714,7 @@ PACK(typedef struct t_CustomFnData { // Function Switches data
|
||||
#define CFN_PLAY_REPEAT(p) ((p)->internal.func_param.param)
|
||||
#define CFN_GVAR_MODE(p) ((p)->internal.func_param_enable.param)
|
||||
#define CFN_PARAM(p) ((p)->param)
|
||||
#define CFN_RESET_PARAM(p) CFN_PARAM(p) = 0
|
||||
#define CFN_RESET(p) {(p)->internal.func_param_enable.active = 0; CFN_PARAM(p) = 0;}
|
||||
#endif
|
||||
|
||||
enum TelemetryUnit {
|
||||
|
||||
Reference in New Issue
Block a user