autotest: round frsky altitude rather than truncate

Closes https://github.com/ArduPilot/ardupilot/issues/14431
This commit is contained in:
Peter Barker 2020-05-23 14:14:27 +10:00 committed by Peter Barker
parent c9fb988a57
commit 605672b631
1 changed files with 1 additions and 1 deletions

View File

@ -5491,7 +5491,7 @@ switch value'''
m = self.mav.recv_match(type='GLOBAL_POSITION_INT', blocking=True, timeout=1)
if m is None:
raise NotAchievedException("Did not receive GLOBAL_POSITION_INT")
gpi_abs_alt = int(m.alt / 1000) # mm -> m
gpi_abs_alt = int((m.alt+500) / 1000) # mm -> m
tstart = self.get_sim_time_cached()
while True:
t2 = self.get_sim_time_cached()