Skip to content

Commit

Permalink
fix for when signing disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Holden authored and peterbarker committed Mar 2, 2023
1 parent 2ca2c13 commit 3a6eed4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generator/C/include_v2.0/mavlink_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,14 @@ MAVLINK_HELPER void _mav_finalize_message_chan_send(mavlink_channel_t chan, uint
ck[0] = (uint8_t)(checksum & 0xFF);
ck[1] = (uint8_t)(checksum >> 8);

#ifndef MAVLINK_NO_SIGN_PACKET
if (signing) {
// possibly add a signature
signature_len = mavlink_sign_packet(status->signing, signature, buf, header_len+1,
(const uint8_t *)packet, length, ck);
}

#endif

MAVLINK_START_UART_SEND(chan, header_len + 3 + (uint16_t)length + (uint16_t)signature_len);
_mavlink_send_uart(chan, (const char *)buf, header_len+1);
_mavlink_send_uart(chan, packet, length);
Expand Down

0 comments on commit 3a6eed4

Please # to comment.