wireless/bluetooth/btsak: Cosmetic improvements to printf output.
This commit is contained in:
parent
c4ca133b6f
commit
c40cf98468
@ -643,7 +643,7 @@ void btsak_showusage(FAR const char *progname, int exitcode)
|
||||
int i;
|
||||
|
||||
fprintf(stderr, "\nUsage:\n\n");
|
||||
fprintf(stderr, "\t%s progname <ifname> <cmd> [option [option [option...]]]\n",
|
||||
fprintf(stderr, "\t%s <ifname> <cmd> [option [option [option...]]]\n",
|
||||
progname);
|
||||
fprintf(stderr, "\nWhere <cmd> [option [option [option...]]] is one of:\n\n");
|
||||
|
||||
|
@ -182,7 +182,7 @@ static void btsak_cmd_scanget(FAR struct btsak_s *btsak, FAR char *cmd,
|
||||
for (i = 0; i < btreq.btr_nrsp; i++)
|
||||
{
|
||||
rsp = &result[i];
|
||||
printf("%d.\tname: %s\n", rsp->sr_name);
|
||||
printf("%d.\tname: %s\n", i + 1, rsp->sr_name);
|
||||
printf("\taddr: "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x type: %d\n",
|
||||
rsp->sr_addr.val[0], rsp->sr_addr.val[1],
|
||||
@ -191,11 +191,15 @@ static void btsak_cmd_scanget(FAR struct btsak_s *btsak, FAR char *cmd,
|
||||
rsp->sr_addr.type);
|
||||
printf("\trssi: %d\n", rsp->sr_rssi);
|
||||
printf("\tresponse type: %u\n", rsp->sr_type);
|
||||
printf("\tadvertiser data:\n");
|
||||
printf("\tadvertiser data:");
|
||||
|
||||
for (j = 0; j < rsp->sr_len; j += 16)
|
||||
{
|
||||
printf("\t ");
|
||||
if (j > 0)
|
||||
{
|
||||
printf("\t ");
|
||||
}
|
||||
|
||||
for (k = 0; k < 16 && (j + k) < rsp->sr_len; k++)
|
||||
{
|
||||
printf(" %02x", rsp->sr_data[j + k]);
|
||||
|
Loading…
Reference in New Issue
Block a user