Browse Source

Print PDOs in a more compact format

The `PDO n:` and `type: blah` lines have now been combined into a single
`PDO n: blah` line.  This saves one line per PDO, and still makes plenty
sense.
Clara Hobbs 6 years ago
parent
commit
d3657e3007
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/shell.c

+ 3
- 3
src/shell.c View File

59
 {
59
 {
60
     int tmp;
60
     int tmp;
61
 
61
 
62
-    chprintf(chp, "\ttype: fixed\r\n");
62
+    chprintf(chp, "fixed\r\n");
63
 
63
 
64
     /* Dual-role power */
64
     /* Dual-role power */
65
     tmp = (pdo & PD_PDO_SRC_FIXED_DUAL_ROLE_PWR) >> PD_PDO_SRC_FIXED_DUAL_ROLE_PWR_SHIFT;
65
     tmp = (pdo & PD_PDO_SRC_FIXED_DUAL_ROLE_PWR) >> PD_PDO_SRC_FIXED_DUAL_ROLE_PWR_SHIFT;
110
 {
110
 {
111
     /* If we have a positive index, print a label for the PDO */
111
     /* If we have a positive index, print a label for the PDO */
112
     if (index) {
112
     if (index) {
113
-        chprintf(chp, "PDO %d:\r\n", index);
113
+        chprintf(chp, "PDO %d: ", index);
114
     }
114
     }
115
 
115
 
116
     /* Select the appropriate method for printing the PDO itself */
116
     /* Select the appropriate method for printing the PDO itself */
118
         print_src_fixed_pdo(chp, pdo);
118
         print_src_fixed_pdo(chp, pdo);
119
     } else {
119
     } else {
120
         /* Unknown PDO, just print it as hex */
120
         /* Unknown PDO, just print it as hex */
121
-        chprintf(chp, "\t%08X\r\n", pdo);
121
+        chprintf(chp, "%08X\r\n", pdo);
122
     }
122
     }
123
 }
123
 }
124
 
124
 

Loading…
Cancel
Save