chore(cpn): remove magic numbers and align values with firmware (#7102)

This commit is contained in:
philmoz
2026-02-16 18:29:17 +10:00
committed by GitHub
parent 142911f532
commit 017006c243
2 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -44,8 +44,10 @@
#define CPN_MAX_SWITCHES_STD 20
#define CPN_MAX_SWITCHES (CPN_MAX_SWITCHES_STD + CPN_MAX_SWITCHES_FLEX + CPN_MAX_SWITCHES_FUNCTION)
#define CPN_MAX_SENSORS 99
#define CPN_MAX_SCRIPTS 9
#define CPN_MAX_SCRIPT_INPUTS 10
#define CPN_MAX_SCRIPTS 9 // Max for Color LCD
#define CPN_LEN_SCRIPT_FILENAME 6
#define CPN_LEN_SCRIPT_NAME 6
#define CPN_MAX_SCRIPT_INPUTS 6
#define CPN_MAX_SCRIPT_OUTPUTS 6
#define CPN_MAX_SPACEMOUSE 6
#define CPN_MAX_INPUTS 32 // v2.10 replaces CPN_MAX_ANALOGS - the value is abitary as radio ADC refactor is still a WIP
+2 -2
View File
@@ -67,8 +67,8 @@ class RSSIAlarmData {
class ScriptData {
public:
ScriptData() { clear(); }
char filename[10+1];
char name[10+1];
char filename[CPN_LEN_SCRIPT_FILENAME+1];
char name[CPN_LEN_SCRIPT_NAME+1];
int inputs[CPN_MAX_SCRIPT_INPUTS];
void clear() { memset(reinterpret_cast<void *>(this), 0, sizeof(ScriptData)); }
};