Copter: fixed some build warnings

This commit is contained in:
Andrew Tridgell 2014-10-16 14:03:39 +09:00 committed by Randy Mackay
parent eed6a1ce61
commit 26f7ab49e3

View File

@ -110,7 +110,7 @@ void parachute_check()
}
// ensure the first control_loss event is from above the min altitude
if (control_loss_count == 0 && parachute.alt_min() != 0 && (baro_alt < (uint32_t)parachute.alt_min() * 100)) {
if (control_loss_count == 0 && parachute.alt_min() != 0 && (baro_alt < (int32_t)parachute.alt_min() * 100)) {
return;
}
@ -177,7 +177,7 @@ static void parachute_manual_release()
}
// do not release if we are landed or below the minimum altitude above home
if (ap.land_complete || (parachute.alt_min() != 0 && (baro_alt < (uint32_t)parachute.alt_min() * 100))) {
if (ap.land_complete || (parachute.alt_min() != 0 && (baro_alt < (int32_t)parachute.alt_min() * 100))) {
// warn user of reason for failure
gcs_send_text_P(SEVERITY_HIGH,PSTR("Parachute: Too Low"));
// log an error in the dataflash