mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
autotest: allow message rates to be set by message name, not just ID
Simply for convenience.
This commit is contained in:
parent
cd1198bf49
commit
3737c13784
@ -5130,6 +5130,8 @@ class AutoTest(ABC):
|
||||
|
||||
def set_message_rate_hz(self, id, rate_hz):
|
||||
'''set a message rate in Hz; 0 for original, -1 to disable'''
|
||||
if type(id) == str:
|
||||
id = eval("mavutil.mavlink.MAVLINK_MSG_ID_%s" % id)
|
||||
if rate_hz == 0 or rate_hz == -1:
|
||||
set_interval = rate_hz
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user