autotest: check rate is configured after we do the rate check
This is just to make sure that the autopilot isn't losing the configuration somehow.
This commit is contained in:
parent
6fcdea67c3
commit
39a0ecbb4b
@ -8708,9 +8708,12 @@ Also, ignores heartbeats not from our target system'''
|
||||
(round(new_measured_rate, ndigits=ndigits),
|
||||
round(expected_rate, ndigits=ndigits))
|
||||
)
|
||||
notachieved_ex = None
|
||||
if round(new_measured_rate, ndigits=ndigits) != round(expected_rate, ndigits=ndigits):
|
||||
raise NotAchievedException("Rate not achieved (got %f want %f)" %
|
||||
(round(new_measured_rate, ndigits), round(expected_rate, ndigits)))
|
||||
notachieved_ex = NotAchievedException(
|
||||
"Rate not achieved (got %f want %f)" %
|
||||
(round(new_measured_rate, ndigits),
|
||||
round(expected_rate, ndigits)))
|
||||
|
||||
# make sure get_message_interval works:
|
||||
self.send_get_message_interval(victim_message, mav=mav)
|
||||
@ -8731,6 +8734,9 @@ Also, ignores heartbeats not from our target system'''
|
||||
if m.result != mavutil.mavlink.MAV_RESULT_ACCEPTED:
|
||||
raise NotAchievedException("Expected ACCEPTED for reading message interval")
|
||||
|
||||
if notachieved_ex is not None:
|
||||
raise notachieved_ex
|
||||
|
||||
def test_set_message_interval(self):
|
||||
self.start_subtest('Basic tests')
|
||||
self.test_set_message_interval_basic()
|
||||
|
Loading…
Reference in New Issue
Block a user