debugging charging

pull/73/head
alanbjohnston 5 years ago committed by GitHub
parent cd3a72f206
commit 19aa4f4d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1085,6 +1085,9 @@ if (firstTime != ON)
float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0)); float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0));
printf("Charging: %f \n", charging); printf("Charging: %f \n", charging);
current[map[BAT]] = ((current[map[BUS]] * voltage[map[BUS]]) / (voltage[map[BAT]] * 1.0)) - charging; current[map[BAT]] = ((current[map[BUS]] * voltage[map[BUS]]) / (voltage[map[BAT]] * 1.0)) - charging;
printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BUS]], voltage[map[BAT]], voltage[map[BUS]]);
batt -= (batt > 3.5) ? current[map[BAT]]/30000: current[map[BAT]]/3000; batt -= (batt > 3.5) ? current[map[BAT]]/30000: current[map[BAT]]/3000;
if (batt < 3.0) if (batt < 3.0)
batt = 3.0; batt = 3.0;

Loading…
Cancel
Save

Powered by TurnKey Linux.