mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
Merge pull request #1434 from paparazzi/mavlink_protocol_cleanup
update the Paparazzi specific mavlink messages - remove `len` field from `SCRIPT_ITEM` - report current block with `SCRIPT_CURRENT` message
This commit is contained in:
@@ -50,9 +50,10 @@ void mavlink_send_block(uint16_t seq)
|
||||
static const char *blocks[] = FP_BLOCKS;
|
||||
char block_name[50];
|
||||
strncpy(block_name, blocks[seq], 49); // String containing the name of the block
|
||||
uint8_t len = strlen(blocks[seq]); // Length of the block name
|
||||
// make sure the string is null terminated if longer than 49chars
|
||||
block_name[49] = 0;
|
||||
mavlink_msg_script_item_send(MAVLINK_COMM_0, mission_mgr.rem_sysid, mission_mgr.rem_compid,
|
||||
seq, len, block_name);
|
||||
seq, block_name);
|
||||
MAVLinkSendMessage();
|
||||
MAVLINK_DEBUG("Sent BLOCK_ITEM message: seq %i, name %s\n", seq, block_name);
|
||||
} else {
|
||||
|
||||
@@ -92,7 +92,8 @@ void mavlink_mission_periodic(void)
|
||||
// FIXME: really use the SCRIPT_ITEM message to indicate current block?
|
||||
if (mission_mgr.current_block != nav_block) {
|
||||
mission_mgr.current_block = nav_block;
|
||||
mavlink_send_block(nav_block); // send the current block seq
|
||||
mavlink_msg_script_current_send(MAVLINK_COMM_0, nav_block);
|
||||
MAVLinkSendMessage();
|
||||
}
|
||||
// check if we had a timeout on a transaction
|
||||
if (sys_time_check_and_ack_timer(mission_mgr.timer_id)) {
|
||||
|
||||
+1
-1
Submodule sw/ext/mavlink updated: ce07a04e48...8e2bcac255
Reference in New Issue
Block a user