pymavlink change selected MAVLINK messages tranmission rate

Hello,
I would like to change transmission rate of few messages.
For start i would like to turn off sending RAW_IMU

In ardupilotmega.py there is code

def request_data_stream_send(self, target_system, target_component, req_stream_id, req_message_rate, start_stop, force_mavlink1=False): 
''' THIS INTERFACE IS DEPRECATED. USE SET_MESSAGE_INTERVAL INSTEAD.
target_system : The target requested to send the message stream.
(uint8_t) target_component : The target requested to send the message stream.
(uint8_t) req_stream_id : The ID of the requested data stream
(uint8_t) req_message_rate : The requested message rate
(uint16_t) start_stop : 1 to start sending, 0 to stop sending.


based on the code link, I wrote something like that
autopilot = mavutil.mavlink_connection('udp:127.0.0.1:14551') 
.
.
.
autopilot.mav.request_data_stream_send(autopilot.target_system, autopilot.target_component, 27, 1, 0 )

Despite sending the following command, the frequency of receiving msg with id 27 does not change. I do not know if the target ID is valid or component ID. Has anyone made similar experiments? What should I change in the code. Thanks for any reply!:slight_smile:

Views: 92

Reply to This

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service