Hi to all,
I created a custom GCS application, it works fine but recently I have a problem. When I use my GCS for the first time, I can receive only 2 messages: Heartbeat and another message created by me. I can't read another messages like GPS_RAW_INT,it seems that the drone sends me only Heartbeat and a my custom message, but I can send every type of command. But If I connect first with Mission Planner then disconnect and after connect with my GCS I can read all the messages with my application. I don't understand why. I use a c++ application with a similar code for receiving message:
static void communication_receive(void)
{
mavlink_message_t msg;
mavlink_status_t status;
// COMMUNICATION THROUGH EXTERNAL UART PORT (XBee serial)
while(uart0_char_available())
{
uint8_t c = uart0_get_char();
// Try to get a new message
if(mavlink_parse_char(MAVLINK_COMM_0, c, &msg, &status)) {
// Handle message
switch(msg.msgid)
{
case MAVLINK_MSG_ID_HEARTBEAT:
{
// E.g. read GCS heartbeat and go into
// comm lost mode if timer times out
}
break;
case MAVLINK_MSG_ID_COMMAND_LONG:
// EXECUTE ACTION
break;