diff --git a/afsk/main.c b/afsk/main.c index 54567601..2c6c4c6e 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -492,7 +492,7 @@ 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"); } -memset(voltage_min), 0, sizeof(voltage_min)); +memset(voltage_min, 0, sizeof(voltage_min)); memset(current_min, 0, sizeof(current_min)); memset(voltage_max, 0, sizeof(voltage_max)); memset(current_max, 0, sizeof(current_max)); @@ -1234,14 +1234,14 @@ if (sim_mode) for (count1 = 0; count1 < 8; count1++) { - if (voltage[count1] < voltage_min[count1] + if (voltage[count1] < voltage_min[count1]) voltage_min[count1] = voltage[count]; - if (current[count1] < current_min[count1] + if (current[count1] < current_min[count1]) voltage_min[count1] = current[count]; - if (voltage[count1] > voltage_max[count1] + if (voltage[count1] > voltage_max[count1]) voltage_max[count1] = voltage[count]; - if (current[count1] > current_max[count1] + if (current[count1] > current_max[count1]) voltage_max[count1] = current[count]; printf("Vmin %f Vmax %f Imin %f Imax %f \n", voltage_min[count1], voltage_max[count1], current_min[count1], current_max[count1]);