|
@@ -69,9 +69,14 @@ void pdbs_config_print(BaseSequentialStream *chp, const struct pdbs_config *cfg)
|
69
|
69
|
}
|
70
|
70
|
chprintf(chp, "\r\n");
|
71
|
71
|
|
72
|
|
- /* Print voltages and current */
|
|
72
|
+ /* Print voltage */
|
73
|
73
|
chprintf(chp, "v: %d.%02d V\r\n", PD_PDV_V(cfg->v), PD_PDV_CV(cfg->v));
|
74
|
|
- chprintf(chp, "i: %d.%02d A\r\n", PD_PDI_A(cfg->i), PD_PDI_CA(cfg->i));
|
|
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
|
+ }
|
75
|
80
|
/* If either end of the range is non-zero, print the range */
|
76
|
81
|
if (cfg->vmin != 0 || cfg->vmax != 0) {
|
77
|
82
|
chprintf(chp, "vmin: %d.%02d V\r\n", PD_PDV_V(cfg->vmin),
|