@@ -66,9 +66,9 @@ struct FieldFunctions {
66
66
void (*display)(FieldProps*, uint8_t , uint8_t );
67
67
};
68
68
69
- static constexpr uint16_t BUFFER_SIZE = 486 ;
69
+ static constexpr uint16_t BUFFER_SIZE = 459 + 1 ;
70
70
static uint8_t *buffer = &reusableBuffer.cToolData[0 ];
71
- uint16_t bufferOffset = 0 ;
71
+ static uint16_t bufferOffset = 0 ;
72
72
73
73
// last 25b are also used for popup messages
74
74
static constexpr uint8_t FIELD_DATA_BUFFER_SIZE = 176 ; // 8 + 56 + 56 + 56
@@ -77,55 +77,55 @@ static uint8_t *fieldData = &reusableBuffer.cToolData[BUFFER_SIZE];
77
77
// Reuse tail of fieldData for popup messages
78
78
static constexpr uint8_t POPUP_MSG_MAX_LEN = 24 ; // popup hard limit is 32
79
79
static constexpr uint8_t POPUP_MSG_OFFSET = FIELD_DATA_BUFFER_SIZE - POPUP_MSG_MAX_LEN;
80
- uint8_t fieldDataLen = 0 ;
80
+ static uint8_t fieldDataLen = 0 ;
81
81
82
- static constexpr uint8_t FIELDS_MAX_COUNT = 15 ;
82
+ static constexpr uint8_t FIELDS_MAX_COUNT = 14 ;
83
83
static constexpr uint8_t FIELDS_SIZE = FIELDS_MAX_COUNT * sizeof (FieldProps);
84
84
static FieldProps *fields = (FieldProps *)&reusableBuffer.cToolData[BUFFER_SIZE + FIELD_DATA_BUFFER_SIZE];
85
- uint8_t allocatedFieldsCount = 0 ;
85
+ static uint8_t allocatedFieldsCount = 0 ;
86
86
87
87
static constexpr uint8_t DEVICES_MAX_COUNT = 4 ;
88
88
static uint8_t *deviceIds = &reusableBuffer.cToolData[BUFFER_SIZE + FIELD_DATA_BUFFER_SIZE + FIELDS_SIZE];
89
89
// static uint8_t deviceIds[DEVICES_MAX_COUNT];
90
- uint8_t devicesLen = 0 ;
90
+ static uint8_t devicesLen = 0 ;
91
91
92
92
static constexpr uint8_t backButtonId = 100 ;
93
93
static constexpr uint8_t otherDevicesId = 101 ;
94
94
95
95
#define BTN_NONE 0
96
96
#define BTN_REQUESTED 1
97
97
#define BTN_ADDED 2
98
- uint8_t otherDevicesState = BTN_NONE;
98
+ static uint8_t otherDevicesState = BTN_NONE;
99
99
100
- uint8_t deviceId = 0xEE ;
101
- uint8_t handsetId = 0xEF ;
100
+ static uint8_t deviceId = 0xEE ;
101
+ static uint8_t handsetId = 0xEF ;
102
102
103
103
static constexpr uint8_t DEVICE_NAME_MAX_LEN = 20 ;
104
104
// static uint8_t *deviceName = &reusableBuffer.cToolData[BUFFER_SIZE + FIELD_DATA_BUFFER_SIZE + FIELDS_SIZE + DEVICES_MAX_COUNT];
105
105
static char deviceName[DEVICE_NAME_MAX_LEN];
106
- uint8_t lineIndex = 1 ;
107
- uint8_t pageOffset = 0 ;
108
- uint8_t edit = 0 ;
106
+ static uint8_t lineIndex = 1 ;
107
+ static uint8_t pageOffset = 0 ;
108
+ static uint8_t edit = 0 ;
109
109
static FieldProps * fieldPopup = nullptr ;
110
- tmr10ms_t fieldTimeout = 0 ;
111
- uint8_t fieldId = 1 ;
112
- uint8_t fieldChunk = 0 ;
110
+ static tmr10ms_t fieldTimeout = 0 ;
111
+ static uint8_t fieldId = 1 ;
112
+ static uint8_t fieldChunk = 0 ;
113
113
114
114
static char goodBadPkt[11 ] = " " ;
115
- uint8_t elrsFlags = 0 ;
115
+ static uint8_t elrsFlags = 0 ;
116
116
static constexpr uint8_t ELRS_FLAGS_INFO_MAX_LEN = 20 ;
117
117
// static char *elrsFlagsInfo = (char *)&reusableBuffer.cToolData[BUFFER_SIZE + FIELD_DATA_BUFFER_SIZE + FIELDS_SIZE + DEVICES_MAX_COUNT + DEVICE_NAME_MAX_LEN];
118
118
static char elrsFlagsInfo[ELRS_FLAGS_INFO_MAX_LEN] = " " ;
119
- uint8_t expectedFieldsCount = 0 ;
120
-
121
- tmr10ms_t devicesRefreshTimeout = 50 ;
122
- uint8_t allParamsLoaded = 0 ;
123
- uint8_t folderAccess = 0 ; // folder id
124
- int8_t expectedChunks = -1 ;
125
- uint8_t deviceIsELRS_TX = 0 ;
126
- tmr10ms_t linkstatTimeout = 100 ;
127
- uint8_t titleShowWarn = 0 ;
128
- tmr10ms_t titleShowWarnTimeout = 100 ;
119
+ static uint8_t expectedFieldsCount = 0 ;
120
+
121
+ static tmr10ms_t devicesRefreshTimeout = 50 ;
122
+ static uint8_t allParamsLoaded = 0 ;
123
+ static uint8_t folderAccess = 0 ; // folder id
124
+ static int8_t expectedChunks = -1 ;
125
+ static uint8_t deviceIsELRS_TX = 0 ;
126
+ static tmr10ms_t linkstatTimeout = 100 ;
127
+ static uint8_t titleShowWarn = 0 ;
128
+ static tmr10ms_t titleShowWarnTimeout = 100 ;
129
129
130
130
static constexpr uint8_t COL2 = 70 ;
131
131
static constexpr uint8_t maxLineIndex = 6 ;
0 commit comments