Bluetooth: Mesh: Use decimals instead of hex nums in DFD shell cmds
JSON doesn't support hexdecimals as numbers. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
bac9b73442
commit
6267259f91
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ static void print_dfd_status(const struct shell *sh, struct bt_mesh_dfd_srv *srv
|
||||||
srv->phase);
|
srv->phase);
|
||||||
|
|
||||||
if (srv->phase != BT_MESH_DFD_PHASE_IDLE && srv->dfu.xfer.slot) {
|
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, "
|
"\"ttl\": %d, \"timeout_base\": %d, \"xfer_mode\": %d, "
|
||||||
"\"apply\": %d, \"slot_idx\": %d", srv->inputs.group,
|
"\"apply\": %d, \"slot_idx\": %d", srv->inputs.group,
|
||||||
srv->inputs.app_idx, srv->inputs.ttl, srv->inputs.timeout_base,
|
srv->inputs.app_idx, srv->inputs.ttl, srv->inputs.timeout_base,
|
||||||
|
@ -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++) {
|
for (int i = 0; i < cnt; i++) {
|
||||||
const struct bt_mesh_dfu_target *t = &dfd_srv->targets[i + first];
|
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, "
|
"\"status\": %d, \"blob_status\": %d, \"progress\": %d, "
|
||||||
"\"img_idx\": %d }%s", i + first, t->blob.addr, t->phase, t->status,
|
"\"img_idx\": %d }%s", i + first, t->blob.addr, t->phase, t->status,
|
||||||
t->blob.status, progress, t->img_idx, (i == cnt - 1) ? "" : ",");
|
t->blob.status, progress, t->img_idx, (i == cnt - 1) ? "" : ",");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue