I am trying to send custom status text to my SITL application(it is standard simulation basen od sim_vehicle.py)

I am tryging to send simple message from pymavlink to MAVProxy command window.
autopilot.mav.statustext_send(6, 'D06DDDDDDDDDDDDD', force_mavlink1=False)
But it doesn't do anything. There is no any effect.

So i tried to checkout how that frame looks like when using QGC. When i arm copter in QGC it shows 
APM: Arming motors in MAVProxy.

I have sniff UDP package using https://askubuntu.com/questions/913393/sniff-udp-packets-on-a-local...



it looks like, despite of fact no information my text wasn't show. I can see that(https://mavlink.io/en/protocol/overview.html) my sysid and compid looks different ( 255 0 instead of 1 1 ). So i manually change ardupilotmega class MAVLink_statustext_message. I forced it to to be 1 and 1 . 

class MAVLink_statustext_message(MAVLink_message):class MAVLink_statustext_message(MAVLink_message):



    def pack(self, mav, force_mavlink1=False):



         mav_copy.srcComponent=1 return MAVLink_message.pack(self, mav_copy, 83, struct.pack('<B50s', self.severity, self.text), force_mavlink1=force_mavlink1)

now my message looks like

But It doesn't effect. I would like to ask if i should MAVProxy to printout custom mesasges? Or change something in my code? Maybe i should change variable srcSystem or srcComponent to another? Or there is some mistakes in char encoding?

Thanks for any help

Views: 31

Reply to This

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service