QOpenHD icon indicating copy to clipboard operation
QOpenHD copied to clipboard

We Should Request_data_stream

Open pilotnbr1 opened this issue 4 years ago • 2 comments

For easier configuration and sync between qopenhd app and fc we should Request_data_stream

pilotnbr1 avatar Jul 15 '21 19:07 pilotnbr1

Stephen already did this. Might not work for px4...

case MAVLINK_MSG_ID_SYSTEM_TIME:{ mavlink_system_time_t sys_time; mavlink_msg_system_time_decode(&msg, &sys_time); uint32_t boot_time = sys_time.time_boot_ms;

        if (boot_time < m_last_boot || m_last_boot == 0) {
            m_last_boot = boot_time;

            setDataStreamRate(MAV_DATA_STREAM_EXTENDED_STATUS, 2);
            setDataStreamRate(MAV_DATA_STREAM_EXTRA1, 10);
            setDataStreamRate(MAV_DATA_STREAM_EXTRA2, 5);
            setDataStreamRate(MAV_DATA_STREAM_EXTRA3, 3);
            setDataStreamRate(MAV_DATA_STREAM_POSITION, 3);
            setDataStreamRate(MAV_DATA_STREAM_RAW_SENSORS, 2);
            setDataStreamRate(MAV_DATA_STREAM_RC_CHANNELS, 2);
        }

        break;
    }

pilotnbr1 avatar Jul 18 '21 06:07 pilotnbr1

There is a newish (as of ardupilot 4.0) way of setting precise message flow. https://ardupilot.org/dev/docs/mavlink-basics.html

Need to look at this closer

pilotnbr1 avatar Jul 19 '21 04:07 pilotnbr1

Will be fixed in the next release: https://github.com/OpenHD/QOpenHD/blob/2.4.2-beta/app/telemetry/models/fcmessageintervalhelper.hpp#L94

Note that we use the newest / recommended, aka use MAV_CMD_SET_MESSAGE_INTERVAL

Consti10 avatar Jul 27 '23 12:07 Consti10