[X9D] Problem when changing trackname parameter when > 4 chars
This commit is contained in:
+2
-2
@@ -2855,8 +2855,8 @@ void menuModelCustomFunctions(uint8_t event)
|
|||||||
}
|
}
|
||||||
lcd_putsiAtt(5*FW-2, y, STR_VFSWFUNC, func_displayed, attr);
|
lcd_putsiAtt(5*FW-2, y, STR_VFSWFUNC, func_displayed, attr);
|
||||||
if (active) {
|
if (active) {
|
||||||
CHECK_INCDEC_MODELVAR( event, sd->func, 0, FUNC_MAX-1);
|
CHECK_INCDEC_MODELVAR(event, sd->func, 0, FUNC_MAX-1);
|
||||||
if (checkIncDec_Ret) FSW_PARAM(sd) = 0;
|
if (checkIncDec_Ret) FSW_RESET_PARAM(sd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (attr) {
|
else if (attr) {
|
||||||
|
|||||||
+4
-2
@@ -357,7 +357,8 @@ PACK(typedef struct t_FuncSwData { // Function Switches data
|
|||||||
uint8_t active;
|
uint8_t active;
|
||||||
uint8_t spare;
|
uint8_t spare;
|
||||||
}) FuncSwData;
|
}) FuncSwData;
|
||||||
#define FSW_PARAM(p) (*((uint32_t*)(p)->param))
|
#define FSW_PARAM(p) (*((uint32_t*)(p)->param))
|
||||||
|
#define FSW_RESET_PARAM(p) memset(p->param, 0, sizeof(p->param))
|
||||||
#else
|
#else
|
||||||
PACK(typedef struct t_FuncSwData { // Function Switches data
|
PACK(typedef struct t_FuncSwData { // Function Switches data
|
||||||
int8_t swtch; //input
|
int8_t swtch; //input
|
||||||
@@ -365,7 +366,8 @@ PACK(typedef struct t_FuncSwData { // Function Switches data
|
|||||||
uint8_t active:1;
|
uint8_t active:1;
|
||||||
uint8_t param;
|
uint8_t param;
|
||||||
}) FuncSwData;
|
}) FuncSwData;
|
||||||
#define FSW_PARAM(p) ((p)->param)
|
#define FSW_PARAM(p) ((p)->param)
|
||||||
|
#define FSW_RESET_PARAM(p) FSW_PARAM(p) = 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum TelemetryUnit {
|
enum TelemetryUnit {
|
||||||
|
|||||||
Reference in New Issue
Block a user