Parcourir la 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 il y a 6 ans
Parent
révision
ad4a69958a
1 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 6
    6
      src/config.c

+ 6
- 6
src/config.c Voir le fichier

@@ -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
 /*

Chargement…
Annuler
Enregistrer