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,7 +59,7 @@ static void print_src_fixed_pdo(BaseSequentialStream *chp, uint32_t pdo)
59 59
 {
60 60
     int tmp;
61 61
 
62
-    chprintf(chp, "\ttype: fixed\r\n");
62
+    chprintf(chp, "fixed\r\n");
63 63
 
64 64
     /* Dual-role power */
65 65
     tmp = (pdo & PD_PDO_SRC_FIXED_DUAL_ROLE_PWR) >> PD_PDO_SRC_FIXED_DUAL_ROLE_PWR_SHIFT;
@@ -110,7 +110,7 @@ static void print_src_pdo(BaseSequentialStream *chp, uint32_t pdo, uint8_t index
110 110
 {
111 111
     /* If we have a positive index, print a label for the PDO */
112 112
     if (index) {
113
-        chprintf(chp, "PDO %d:\r\n", index);
113
+        chprintf(chp, "PDO %d: ", index);
114 114
     }
115 115
 
116 116
     /* Select the appropriate method for printing the PDO itself */
@@ -118,7 +118,7 @@ static void print_src_pdo(BaseSequentialStream *chp, uint32_t pdo, uint8_t index
118 118
         print_src_fixed_pdo(chp, pdo);
119 119
     } else {
120 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