Pymavlink mavporxy Mavlink status text

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-port

ARMING MESSAGE

5442585c5fdac4ac6047bdc94a6897fd5697f21d_1_602x500.png

MY MESSAGE

400b361319d5cd7799da44cf1660a72733eb581d_1_689x442.png

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=mav

        mav_copy.srcSystem=1

         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

cfeca6cf41bbba1b30075535289196212d9c0643_1_690x327.png

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

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity