Skip to content

Commit

Permalink
Bluetooth: Mesh: Use decimals instead of hex nums in DFD shell cmds
Browse files Browse the repository at this point in the history
JSON doesn't support hexdecimals as numbers.

Signed-off-by: Pavel Vasilyev <[email protected]>
  • Loading branch information
PavelVPV authored and carlescufi committed Sep 22, 2023
1 parent bac9b73 commit 6267259
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subsys/bluetooth/mesh/shell/dfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static void print_dfd_status(const struct shell *sh, struct bt_mesh_dfd_srv *srv
srv->phase);

if (srv->phase != BT_MESH_DFD_PHASE_IDLE && srv->dfu.xfer.slot) {
shell_fprintf(sh, SHELL_NORMAL, ", \"group\": 0x%04x, \"app_idx\": %d, "
shell_fprintf(sh, SHELL_NORMAL, ", \"group\": %d, \"app_idx\": %d, "
"\"ttl\": %d, \"timeout_base\": %d, \"xfer_mode\": %d, "
"\"apply\": %d, \"slot_idx\": %d", srv->inputs.group,
srv->inputs.app_idx, srv->inputs.ttl, srv->inputs.timeout_base,
Expand Down Expand Up @@ -165,7 +165,7 @@ static int cmd_dfd_receivers_get(const struct shell *sh, size_t argc, char *argv
for (int i = 0; i < cnt; i++) {
const struct bt_mesh_dfu_target *t = &dfd_srv->targets[i + first];

shell_print(sh, "\t\t\"%d\": { \"blob_addr\": 0x%04x, \"phase\": %d, "
shell_print(sh, "\t\t\"%d\": { \"blob_addr\": %d, \"phase\": %d, "
"\"status\": %d, \"blob_status\": %d, \"progress\": %d, "
"\"img_idx\": %d }%s", i + first, t->blob.addr, t->phase, t->status,
t->blob.status, progress, t->img_idx, (i == cnt - 1) ? "" : ",");
Expand Down

0 comments on commit 6267259

Please sign in to comment.