only update max and min if valid sensor data

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

@ -1358,6 +1358,8 @@ if (sim_mode)
printf("Vmin %f Vmax %f Imin %f Imax %f \n", voltage_min[count1], voltage_max[count1], current_min[count1], current_max[count1]);
}
if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K'))
{
for (count1 = 0; count1 < 17; count1++)
{
if (sensor[count1] < sensor_min[count1])
@ -1367,6 +1369,7 @@ if (sim_mode)
printf("Smin %f Smax %f \n", sensor_min[count1], sensor_max[count1]);
}
}
for (count1 = 0; count1 < 3; count1++)
{

Loading…
Cancel
Save

Powered by TurnKey Linux.