added zero values if no max or min

pull/114/head
alanbjohnston 5 years ago committed by GitHub
parent 0d15eb274b
commit 869e2da2da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1537,7 +1537,24 @@ void get_tlm_fox() {
encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS3] * 100 + 0.5) + 2048);
encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5));
encodeA(b_max, 45 + head_offset, (int)(sensor_max[HUMI] + 0.5));
}
}
else
{
encodeB(b_max, 4 + head_offset, 2048); // 0
encodeA(b_max, 6 + head_offset, 2048); // 0
encodeB(b_max, 7 + head_offset, 2048); // 0
// encodeA(b_max, 33 + head_offset, (int)(sensor_max[PRES] + 0.5)); // Pressure
// encodeB(b_max, 34 + head_offset, (int)(sensor_max[ALT] * 10.0 + 0.5)); // Altitude
encodeB(b_max, 40 + head_offset, 2048);
encodeA(b_max, 42 + head_offset, 2048);
encodeB(b_max, 43 + head_offset, 2048);
encodeA(b_max, 48 + head_offset, 2048);
encodeB(b_max, 49 + head_offset, 2048);
// encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5));
// encodeA(b_max, 45 + head_offset, (int)(sensor_max[HUMI] + 0.5));
}
encodeA(b_min, 12 + head_offset, (int)(voltage_min[map[PLUS_X]] * 100));
encodeB(b_min, 13 + head_offset, (int)(voltage_min[map[PLUS_Y]] * 100));
encodeA(b_min, 15 + head_offset, (int)(voltage_min[map[PLUS_Z]] * 100));
@ -1578,6 +1595,23 @@ void get_tlm_fox() {
encodeB(b_min, 10 + head_offset, (int)(sensor_min[TEMP] * 10 + 0.5));
encodeA(b_min, 45 + head_offset, (int)(sensor_min[HUMI] + 0.5));
}
else
{
encodeB(b_min, 4 + head_offset, 2048); // 0
encodeA(b_min, 6 + head_offset, 2048); // 0
encodeB(b_min, 7 + head_offset, 2048); // 0
// encodeA(b_min, 33 + head_offset, (int)(sensor_max[PRES] + 0.5)); // Pressure
// encodeB(b_min, 34 + head_offset, (int)(sensor_max[ALT] * 10.0 + 0.5)); // Altitude
encodeB(b_min, 40 + head_offset, 2048);
encodeA(b_min, 42 + head_offset, 2048);
encodeB(b_min, 43 + head_offset, 2048);
encodeA(b_min, 48 + head_offset, 2048);
encodeB(b_min, 49 + head_offset, 2048);
// encodeB(b_min, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5));
// encodeA(b_min, 45 + head_offset, (int)(sensor_max[HUMI] + 0.5));
}
}
encodeA(b, 30 + head_offset, PSUVoltage);
// encodeB(b, 31 + head_offset,(spin * 10) + 2048);

Loading…
Cancel
Save

Powered by TurnKey Linux.