mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
更换串口为USB
This commit is contained in:
@@ -62,8 +62,7 @@ static void _flush_timer_cb(void) {
|
||||
char buf[5];
|
||||
float voltage = 0.0;
|
||||
float current = 0.0;
|
||||
current = ui_get_current(); // uA
|
||||
voltage = ui_get_voltage(); // V
|
||||
ui_get_vol_cur(&voltage, ¤t);
|
||||
sprintf(buf, "%.2f", voltage);
|
||||
lv_label_set_text(ui_LabelPPSVol, buf);
|
||||
sprintf(buf, "%.2f", current/1000000.0); // 转换为 A
|
||||
|
||||
Reference in New Issue
Block a user