Skip to content

Commit 8b81269

Browse files
hubmartinmarekmaskarinec
authored andcommitted
subsys: Fix config enums in ctr_lrw, omit empty enums values in ctr_config help
1 parent be981c4 commit 8b81269

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

subsys/ctr_config/ctr_config.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ int ctr_config_help_item(const struct shell *shell, const struct ctr_config_item
202202
case CTR_CONFIG_TYPE_ENUM:
203203
shell_print(shell, " %-18s:%s", item->name, item->help);
204204
for (int i = 0; i < item->max; i++) {
205-
shell_print(shell, " - %s", item->enums[i]);
205+
if (strlen(item->enums[i])) {
206+
shell_print(shell, " - %s", item->enums[i]);
207+
}
206208
}
207209
break;
208210
case CTR_CONFIG_TYPE_STRING:

subsys/ctr_lrw/ctr_lrw.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ static struct config m_config;
145145

146146
static const char *m_enum_antenna_items[] = {"int", "ext"};
147147
static const char *m_enum_band_items[] = {
148-
"AS923", "AU915", "EU868", "KR920", "IN865", "US915",
148+
"AS923", "AU915", "", "", "", "EU868", "KR920", "IN865", "US915",
149149
};
150-
static const char *m_enum_class_items[] = {"A", "C"};
150+
static const char *m_enum_class_items[] = {"A", "", "C"};
151151
static const char *m_enum_mode_items[] = {"apb", "otaa"};
152152
static const char *m_enum_nwk_items[] = {"private", "public"};
153153

0 commit comments

Comments
 (0)