Hi guys, I’ve modified firmware so I can send to telemetry some data inputed from my custom device.
My device sends values about every 500/1000ms.
The problem is that the controller (pixhawk) send continuosly messages and the telemetry is clogged.
I’ve tried to modify firmware so that it send messages any 1000ms or that send mesages only if current value is different to last sent, but so don’t work
In these cases I don’t receive any about my custom data.
How I can resolve this problem?
you wrote :
" (pixhawk) send continuosly messages and the telemetry is clogged."
IF that would be the case, (pixhawk is actually saturating the link, then you need to reduce it’s message frequency/type by using SR* parameters.)
I assume the link is not saturated, but you mean to say that the stream does not have “idle spots” you can use. That’s correct, and expected.
What you should do, is:
-Have your device connected between pixhawk and the radio, so that it passes thru normal mavlink traffic, and injects it’s own data inbetween.
-Attach your device to pixhawk, and make it route the data along with the telemetry to the radio (GCS). - just like a mavlink gimbal does.
Hi Andre-K, I wrote an arduino program that capture telemetry data from pixhawk and retrasmit with my data injiected.
On mavproxy I see many messages how this: (‘Time has wrapped’, 2213001, 14275469).
I think that the problem is created from timing, infact I take the timestamp from millis() that is different from millis() of pixhawk (mavlink_msg_named_value_int_pack(1, 200, &msg, millis(), name, 0);)
All works fine too, but I would like to ask if for you this is a critical message or not.
If you want to view your mavlink message on a GCS then you will also need to rebuild the GCS with the correct Mavlink message protocols. If you change any of the mavlink messages from what is the standard definitions, then they will not show on the GCS.
Did you use the mavlink message generator program to generate your header files from the .xml message definitions???
A way to test your code and your external sensors are to adjust the GCS_Mavlink code that selects which data is sent, and change an already defined message to send data. Such as, if you’re not interested in view RAW_IMU measurements then change the accelerometer readings to your sensors and then see what you observe on the standard GCS
My sketch, capture telemetry data sent from pixhawk and forward it to radio module.
If necessary, I insert customized packet created from: mavlink_msg_named_value_int_pack(1, 200, &msg, millis(), name, 0);
But how you can see, the timestamp generated from pixhawk is not equal to timestamp generated from arduino’s millis().
All work fine, but in mavproxy I see messages (‘Time has wrapped’, 2213001, 14275469)
The custom packets inserted from my sketch, be capture and elaborated from my PC custom program (not Mission Planner or other GCS software).
I hope to explain good.