Browse Source

Rearrange fields when printing configuration

I had intended the voltage range to be right after the voltage, but
accidentally put it after the current.  Fixed.
Clara Hobbs 6 years ago
parent
commit
ad4a69958a
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      src/config.c

+ 6
- 6
src/config.c View File

@@ -71,12 +71,6 @@ void pdbs_config_print(BaseSequentialStream *chp, const struct pdbs_config *cfg)
71 71
 
72 72
     /* Print voltage */
73 73
     chprintf(chp, "v: %d.%03d V\r\n", PD_MV_V(cfg->v), PD_MV_MV(cfg->v));
74
-    /* Print current-deriving setting */
75
-    switch (cfg->flags & PDBS_CONFIG_FLAGS_CURRENT_DEFN) {
76
-        case PDBS_CONFIG_FLAGS_CURRENT_DEFN_I:
77
-            chprintf(chp, "i: %d.%02d A\r\n", PD_PDI_A(cfg->i), PD_PDI_CA(cfg->i));
78
-            break;
79
-    }
80 74
     /* If either end of the range is non-zero, print the range */
81 75
     if (cfg->vmin != 0 || cfg->vmax != 0) {
82 76
         chprintf(chp, "vmin: %d.%03d V\r\n", PD_MV_V(cfg->vmin),
@@ -84,6 +78,12 @@ void pdbs_config_print(BaseSequentialStream *chp, const struct pdbs_config *cfg)
84 78
         chprintf(chp, "vmax: %d.%03d V\r\n", PD_MV_V(cfg->vmax),
85 79
                  PD_MV_MV(cfg->vmax));
86 80
     }
81
+    /* Print current-deriving setting */
82
+    switch (cfg->flags & PDBS_CONFIG_FLAGS_CURRENT_DEFN) {
83
+        case PDBS_CONFIG_FLAGS_CURRENT_DEFN_I:
84
+            chprintf(chp, "i: %d.%02d A\r\n", PD_PDI_A(cfg->i), PD_PDI_CA(cfg->i));
85
+            break;
86
+    }
87 87
 }
88 88
 
89 89
 /*

Loading…
Cancel
Save