initialized max and min so that first value sets it

pull/74/head
alanbjohnston 5 years ago committed by GitHub
parent d5e9303b49
commit 8b0d8f9fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -492,10 +492,18 @@ printf("batt: %f speed: %f eclipse_time: %f eclipse: %d period: %f temp: %f max:
fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n");
} }
memset(voltage_min, 0, sizeof(voltage_min)); //memset(voltage_min, 0, sizeof(voltage_min));
memset(current_min, 0, sizeof(current_min)); //memset(current_min, 0, sizeof(current_min));
memset(voltage_max, 0, sizeof(voltage_max)); //memset(voltage_max, 0, sizeof(voltage_max));
memset(current_max, 0, sizeof(current_max)); //memset(current_max, 0, sizeof(current_max));
for(i=0; i < 9; i++)
{
voltage_min[i] = 1000.0;
current_min[i] = 1000.0;
voltage_max[i] = -1000.0;
current_max[i] = -1000.0;
}
while (loop-- != 0) while (loop-- != 0)
{ {

Loading…
Cancel
Save

Powered by TurnKey Linux.