mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 08:13:56 -04:00
GCS_MAVLink: updates for 24 bit msgid
This commit is contained in:
parent
4571b5e3ad
commit
006b9728d0
@ -239,7 +239,7 @@ bool GCS_MAVLINK::handle_log_send_data(DataFlash_Class &dataflash)
|
|||||||
packet.ofs = _log_data_offset;
|
packet.ofs = _log_data_offset;
|
||||||
packet.id = _log_num_data;
|
packet.id = _log_num_data;
|
||||||
packet.count = ret;
|
packet.count = ret;
|
||||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_DATA_TUPLE, (const char *)&packet,
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_DATA, (const char *)&packet,
|
||||||
MAVLINK_MSG_ID_LOG_DATA_LEN, MAVLINK_MSG_ID_LOG_DATA_CRC);
|
MAVLINK_MSG_ID_LOG_DATA_LEN, MAVLINK_MSG_ID_LOG_DATA_CRC);
|
||||||
|
|
||||||
_log_data_offset += len;
|
_log_data_offset += len;
|
||||||
|
@ -84,15 +84,12 @@ void GCS_MAVLINK::handle_setup_signing(const mavlink_message_t *msg)
|
|||||||
*/
|
*/
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
static const struct {
|
static const uint32_t accept_list[] = {
|
||||||
uint8_t dialect;
|
MAVLINK_MSG_ID_RADIO_STATUS,
|
||||||
uint16_t msgId;
|
MAVLINK_MSG_ID_RADIO
|
||||||
} accept_list[] = {
|
|
||||||
{ MAVLINK_MSG_ID_RADIO_STATUS_TUPLE }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool accept_unsigned_callback(const mavlink_status_t *status,
|
static bool accept_unsigned_callback(const mavlink_status_t *status, uint32_t msgId)
|
||||||
uint8_t dialect, uint16_t msgId)
|
|
||||||
{
|
{
|
||||||
if (status == mavlink_get_channel_status(MAVLINK_COMM_0)) {
|
if (status == mavlink_get_channel_status(MAVLINK_COMM_0)) {
|
||||||
// always accept channel 0, assumed to be secure channel. This
|
// always accept channel 0, assumed to be secure channel. This
|
||||||
@ -100,8 +97,7 @@ static bool accept_unsigned_callback(const mavlink_status_t *status,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (uint8_t i=0; i<ARRAY_SIZE(accept_list); i++) {
|
for (uint8_t i=0; i<ARRAY_SIZE(accept_list); i++) {
|
||||||
if (accept_list[i].dialect == dialect &&
|
if (accept_list[i] == msgId) {
|
||||||
accept_list[i].msgId == msgId) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ more_data:
|
|||||||
|
|
||||||
// and send the reply
|
// and send the reply
|
||||||
_mav_finalize_message_chan_send(chan,
|
_mav_finalize_message_chan_send(chan,
|
||||||
MAVLINK_MSG_ID_SERIAL_CONTROL_TUPLE,
|
MAVLINK_MSG_ID_SERIAL_CONTROL,
|
||||||
(const char *)&packet,
|
(const char *)&packet,
|
||||||
MAVLINK_MSG_ID_SERIAL_CONTROL_LEN,
|
MAVLINK_MSG_ID_SERIAL_CONTROL_LEN,
|
||||||
MAVLINK_MSG_ID_SERIAL_CONTROL_CRC);
|
MAVLINK_MSG_ID_SERIAL_CONTROL_CRC);
|
||||||
|
Loading…
Reference in New Issue
Block a user