Skip to content

Commit d118db0

Browse files
xsidermartinjaeger
authored andcommitted
Fixed linker error when CONFIG_THINGSET_TEXT_MODE=n
1 parent d2a610d commit d118db0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/thingset.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ int thingset_export_subsets(struct thingset_context *ts, uint8_t *buf, size_t bu
178178
ts->rsp_pos = 0;
179179

180180
switch (format) {
181+
#ifdef CONFIG_THINGSET_TEXT_MODE
181182
case THINGSET_TXT_NAMES_VALUES:
182183
thingset_txt_setup(ts);
183184
break;
185+
#endif
184186
case THINGSET_BIN_IDS_VALUES:
185187
ts->endpoint.use_ids = true;
186188
thingset_bin_setup(ts, 0);
@@ -217,9 +219,11 @@ int thingset_export_item(struct thingset_context *ts, uint8_t *buf, size_t buf_s
217219
ts->rsp_pos = 0;
218220

219221
switch (format) {
222+
#ifdef CONFIG_THINGSET_TEXT_MODE
220223
case THINGSET_TXT_VALUES_ONLY:
221224
thingset_txt_setup(ts);
222225
break;
226+
#endif
223227
case THINGSET_BIN_VALUES_ONLY:
224228
ts->endpoint.use_ids = true;
225229
thingset_bin_setup(ts, 0);
@@ -371,11 +375,13 @@ int thingset_import_record(struct thingset_context *ts, const uint8_t *data, siz
371375
ts->endpoint = *endpoint;
372376

373377
switch (format) {
378+
#ifdef CONFIG_THINGSET_TEXT_MODE
374379
case THINGSET_TXT_NAMES_VALUES:
375380
thingset_txt_setup(ts);
376381
ts->msg_payload = data;
377382
ts->api->deserialize_payload_reset(ts);
378383
break;
384+
#endif
379385
case THINGSET_BIN_IDS_VALUES:
380386
ts->endpoint.use_ids = true;
381387
thingset_bin_setup(ts, 0);

0 commit comments

Comments
 (0)