I've tried to modify MinimOSD-Extra to show me current APM Copter 3.3 status message on screen. The problem is that I get only couple of messages at startup and then it stops.

This is how I approximately do it:

case MAVLINK_MSG_ID_STATUSTEXT:
{
mavlink_msg_statustext_get_text(&msg, osd_warning);
int length = strlen(osd_warning);
memset(osd_formatted_warning, 0x20, WARNING_PANEL_WIDTH);
memcpy(osd_formatted_warning, osd_warning, length);
};
break;

What happens is that on startup I do get:
Calibrating barometer

Ground start

However if I launch QGroundStation then I see that it gets other messages like "PreArm: GPS horiz error 9.0".

The subscription code looks like this:

void request_mavlink_rates()
{
const int maxStreams = 6;
const uint8_t MAVStreams[maxStreams] = {MAV_DATA_STREAM_RAW_SENSORS,
MAV_DATA_STREAM_EXTENDED_STATUS,
MAV_DATA_STREAM_RC_CHANNELS,
MAV_DATA_STREAM_POSITION,
MAV_DATA_STREAM_EXTRA1,
MAV_DATA_STREAM_EXTRA2};
const uint16_t MAVRates[maxStreams] = {0x02, 0x02, 0x05, 0x02, 0x05, 0x02};
for (int i=0; i < maxStreams; i++) {
mavlink_msg_request_data_stream_send(MAVLINK_COMM_0,
apm_mav_system, apm_mav_component,
MAVStreams[i], MAVRates[i], 1);
}
}

Should I do some extra steps in order to get status text messages?

-----------------------

Update from my experiments:

It looks as if some statustext messages are not set to all GCSs, but the presence of e.g. MAVProxy GCS triggers broadcasting to all stations. Looking at the arducopter code I don't see anything which could trigger such behavior. I do see different ways of sending messages e.g. 

const char *reason = ahrs.prearm_failure_reason();
if (reason) {
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, "PreArm: %s", reason);
} else {
gcs_send_text(MAV_SEVERITY_CRITICAL,"PreArm: Need 3D Fix");
}

but those methods look ok internally at first glance.

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

Join diydrones

Email me when people reply –

Replies

  • I have same problem with my Mav2Leds project, I can't get the severity info to manage my leds when prearm errors occurs.

    Found any solution ?

    • My workaround was to send hearbeats to Pixhawk from OSD.

  • OK, after some more experiments I've fixed (or workarounded the issue in my forked Copter-3.3 version): https://github.com/diydrones/ardupilot/issues/3513

  • The interesting this is that if I connect MAVProxy as well, I see all statustext updates via MiminOSD!

  • I've also added a code to display me number of times I've got MAVLINK_MSG_ID_STATUSTEXT and it stuck at 4.

This reply was deleted.

Activity

DIY Robocars via Twitter
Friday
DIY Robocars via Twitter
RT @_JonMyer: 🏎 We need your help in naming my #AWS DeepRacer Underground Track 🏎 @davidfsmith's track is going to be referred to as 𝗔𝗪𝗦 𝗗…
Oct 22
DIY Robocars via Twitter
RT @gclue_akira: 仕事もおわったし、電脳化にとらい #マリオカートハック https://t.co/4IU90hCLgm
Oct 22
DIY Robocars via Twitter
This is the hashtag to follow all the people in Japan who are hacking the new Nintendo Mario Kart with the real AR… https://twitter.com/i/web/status/1319281354664677376
Oct 22
DIY Robocars via Twitter
RT @gclue_akira: @chr1sa @diyrobocars jupyter mario https://t.co/P0oHdjlCRq
Oct 22
DIY Robocars via Twitter
RT @_JonMyer: 🚨Our 1st AWS DeepRacer Community Race is Underway on http://twitch.tv/aws 🚨 Join us to find out which member of your commu…
Oct 20
DIY Robocars via Twitter
Oct 19
DIY Robocars via Twitter
RT @BackyardRobotcs: After an admittedly long wait, the new Tinymovr R3.3 motor controller is now available https://tinymovr.com 🥳
Oct 19
DIY Robocars via Twitter
RT @_JonMyer: 🏎 1 hr left before the #AWS #DeepRacer Community 🏎 Top 5 Race tomorrow LIVE on Twitch 1st Place = $50 Amazon GC or AWS Credit…
Oct 19
DIY Robocars via Twitter
Oct 16
DIY Robocars via Twitter
Oct 15
DIY Robocars via Twitter
Oct 14
DIY Robocars via Twitter
RT @davidfsmith: Race virtually with The AWS DeepRacer Community Race and then join us on the track to see how your times compare on the ph…
Oct 14
DIY Robocars via Twitter
Oct 14
Hiroki Tanaka liked Hiroki Tanaka's profile
Oct 13
DIY Robocars via Twitter
RT @breadcentric: It's now!
Oct 13
More…