Browse Source

Copter: change variable type from float to int32_t

zr-v5.1
Tatsuya Yamaguchi 3 years ago committed by Randy Mackay
parent
commit
91d74cf070
  1. 2
      ArduCopter/mode_auto.cpp

2
ArduCopter/mode_auto.cpp

@ -207,7 +207,7 @@ void ModeAuto::takeoff_start(const Location& dest_loc) @@ -207,7 +207,7 @@ void ModeAuto::takeoff_start(const Location& dest_loc)
}
// sanity check target
float alt_target_min_cm = copter.current_loc.alt + (copter.ap.land_complete ? 100 : 0);
int32_t alt_target_min_cm = copter.current_loc.alt + (copter.ap.land_complete ? 100 : 0);
if (alt_target < alt_target_min_cm ) {
dest.set_alt_cm(alt_target_min_cm , Location::AltFrame::ABOVE_HOME);
}

Loading…
Cancel
Save