Update main.c print bat voltage and current

fc-a
Alan Johnston 11 months ago committed by GitHub
parent ffe7fe1d8d
commit df01235fb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -774,7 +774,7 @@ int main(int argc, char * argv[]) {
current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging;
// printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]);
printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]);
batt -= (batt > 3.5) ? current[map[BAT]] / 30000 : current[map[BAT]] / 3000;
if (batt < 3.0) {

Loading…
Cancel
Save

Powered by TurnKey Linux.