From 71e8229d7538e52db032122345afc0d26e39b8c8 Mon Sep 17 00:00:00 2001 From: Tatsuya Yamaguchi Date: Mon, 31 Jan 2022 11:51:24 +0900 Subject: [PATCH] Copter: change variable type from float to int32_t --- ArduCopter/mode_auto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/mode_auto.cpp b/ArduCopter/mode_auto.cpp index ca1ae9274e..87733d34cf 100644 --- a/ArduCopter/mode_auto.cpp +++ b/ArduCopter/mode_auto.cpp @@ -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); }