Copter: minor casting fixup for wp_distance

This commit is contained in:
Randy Mackay 2013-01-27 11:27:43 +09:00
parent bad81a5113
commit 6f5050a8b9
2 changed files with 4 additions and 4 deletions

View File

@ -391,7 +391,7 @@ static bool verify_nav_wp()
}
// Did we pass the WP? // Distance checking
if((wp_distance <= (unsigned long)max((g.waypoint_radius * 100),0)) || check_missed_wp()) {
if((wp_distance <= (uint32_t)max((g.waypoint_radius * 100),0)) || check_missed_wp()) {
wp_verify_byte |= NAV_LOCATION;
if(loiter_time == 0) {
loiter_time = millis();
@ -424,7 +424,7 @@ static bool verify_nav_wp()
static bool verify_loiter_unlimited()
{
if(nav_mode == NAV_WP && wp_distance <= (unsigned long)max((g.waypoint_radius * 100),0)) {
if(nav_mode == NAV_WP && wp_distance <= (uint32_t)max((g.waypoint_radius * 100),0)) {
// switch to position hold
set_nav_mode(NAV_LOITER);
}
@ -620,7 +620,7 @@ static void do_yaw()
static bool verify_wait_delay()
{
//cliSerial->print("vwd");
if ((unsigned)(millis() - condition_start) > (unsigned)condition_value) {
if (millis() - condition_start > (uint32_t)max(condition_value,0)) {
//cliSerial->println("y");
condition_value = 0;
return true;

View File

@ -354,7 +354,7 @@ bool AP_InertialSensor::calibrate_accel(void (*flash_leds_cb)(bool on),
break;
}
interact->printf_P(
PSTR("USER: Place APM %S and press any key.\n"), msg);
PSTR("Place APM %S and press any key.\n"), msg);
// wait for user input
interact->blocking_read();