Skip to content

Commit d4d0226

Browse files
committed
added the ability to delete the system config parameters altogether
1 parent 2ea5130 commit d4d0226

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

hardware/arduino/zunoG2/cores/ZWSupport/ZWCCConfiguration.cpp

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const ZunoCFGParameter_t *zunoCFGParameter(size_t param) {
5252
#define CONFIGPARAMETERS_HIDEN_SEARCH_SYS_CERT_BUILD (true)
5353
#endif
5454

55+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM1
5556
const ZunoCFGParameter_t SYSCFGPARAM1 =
5657
{
5758
.name = "Debug mode",
@@ -66,6 +67,8 @@ const ZunoCFGParameter_t SYSCFGPARAM1 =
6667
.advanced = true,
6768
.hiden_search = CONFIGPARAMETERS_HIDEN_SEARCH_SYS_ALL
6869
};
70+
#endif
71+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM2
6972
const ZunoCFGParameter_t SYSCFGPARAM2 =
7073
{
7174
.name = "Activity LED",
@@ -80,6 +83,8 @@ const ZunoCFGParameter_t SYSCFGPARAM2 =
8083
.advanced = true,
8184
.hiden_search = CONFIGPARAMETERS_HIDEN_SEARCH_SYS_ALL
8285
};
86+
#endif
87+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM7
8388
const ZunoCFGParameter_t SYSCFGPARAM7 =
8489
{
8590
.name = "Security",
@@ -94,6 +99,8 @@ const ZunoCFGParameter_t SYSCFGPARAM7 =
9499
.advanced = true,
95100
.hiden_search = CONFIGPARAMETERS_HIDEN_SEARCH_SYS_SECURITY
96101
};
102+
#endif
103+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM8
97104
const ZunoCFGParameter_t SYSCFGPARAM8 =
98105
{
99106
.name = "RF logging",
@@ -107,7 +114,9 @@ const ZunoCFGParameter_t SYSCFGPARAM8 =
107114
.altering = false,
108115
.advanced = true,
109116
.hiden_search = CONFIGPARAMETERS_HIDEN_SEARCH_SYS_ALL
110-
};
117+
};
118+
#endif
119+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM9
111120
#if defined(SKETCH_FLAGS) and (SKETCH_FLAGS == HEADER_FLAGS_REBOOT_CFG)
112121
#pragma message "parameter 9 DEBUG version"
113122
const ZunoCFGParameter_t SYSCFGPARAM9 =
@@ -140,6 +149,8 @@ const ZunoCFGParameter_t SYSCFGPARAM9 =
140149
.hiden_search = CONFIGPARAMETERS_HIDEN_SEARCH_SYS_CERT_BUILD
141150
};
142151
#endif
152+
#endif
153+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM11
143154
const ZunoCFGParameter_t SYSCFGPARAM11 =
144155
{
145156
.name = "Multilevel report interval",
@@ -154,6 +165,8 @@ const ZunoCFGParameter_t SYSCFGPARAM11 =
154165
.advanced = true,
155166
.hiden_search = CONFIGPARAMETERS_HIDEN_SEARCH_SYS_ALL
156167
};
168+
#endif
169+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM20
157170
const ZunoCFGParameter_t SYSCFGPARAM20 =
158171
{
159172
.name = "OTA confirmation",
@@ -168,23 +181,52 @@ const ZunoCFGParameter_t SYSCFGPARAM20 =
168181
.advanced = true,
169182
.hiden_search = CONFIGPARAMETERS_HIDEN_SEARCH_SYS_CERT_BUILD
170183
};
184+
#endif
171185

172186
static const ZunoCFGParameter_t *zunoCFGParameterProxy(size_t param){
173187
switch(param){
174188
case ZUNO_SYSCFGPARAM_DBG:
189+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM1
175190
return &SYSCFGPARAM1;
191+
#else
192+
return (ZUNO_CFG_PARAMETER_UNKNOWN);
193+
#endif
176194
case ZUNO_SYSCFGPARAM_ACTIVITY_LED:
195+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM2
177196
return &SYSCFGPARAM2;
197+
#else
198+
return (ZUNO_CFG_PARAMETER_UNKNOWN);
199+
#endif
178200
case ZUNO_SYSCFGPARAM_SECURITY:
201+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM7
179202
return &SYSCFGPARAM7;
203+
#else
204+
return (ZUNO_CFG_PARAMETER_UNKNOWN);
205+
#endif
180206
case ZUNO_SYSCFGPARAM_LOGGING:
207+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM8
181208
return &SYSCFGPARAM8;
209+
#else
210+
return (ZUNO_CFG_PARAMETER_UNKNOWN);
211+
#endif
182212
case ZUNO_SYSCFGPARAM_FREQUENCY:
213+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM9
183214
return &SYSCFGPARAM9;
215+
#else
216+
return (ZUNO_CFG_PARAMETER_UNKNOWN);
217+
#endif
184218
case ZUNO_SYSCFGPARAM_REPORT_TIME:
219+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM11
185220
return &SYSCFGPARAM11;
221+
#else
222+
return (ZUNO_CFG_PARAMETER_UNKNOWN);
223+
#endif
186224
case ZUNO_SYSCFGPARAM_OTA_CONFIRM_PIN:
225+
#ifndef CONFIGPARAMETERS_DEL_SYSCFGPARAM20
187226
return &SYSCFGPARAM20;
227+
#else
228+
return (ZUNO_CFG_PARAMETER_UNKNOWN);
229+
#endif
188230
}
189231
// Return user-defined callback result for user-defined parameters
190232
return zunoCFGParameter(param);

0 commit comments

Comments
 (0)