show real voltage value
This commit is contained in:
parent
8027ce29b7
commit
349e7b7156
@ -96,7 +96,9 @@ static void update_status_boxes(struct blmc_status *status)
|
||||
snprintf(buf, sizeof(buf), "%d", status->current);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry404), buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%d", status->voltage);
|
||||
double voltage = (status->voltage * 5.00 * (18000 + 4700)) / (6 * 1024 * 4700);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%2.3f", voltage);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry405), buf);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user