diff --git a/flix/mavlink.ino b/flix/mavlink.ino index 3935c10..88653ed 100644 --- a/flix/mavlink.ino +++ b/flix/mavlink.ino @@ -208,7 +208,9 @@ void sendMavlinkPrint() { strlcpy(data, str + i, sizeof(data)); mavlink_message_t msg; mavlink_msg_serial_control_pack(SYSTEM_ID, MAV_COMP_ID_AUTOPILOT1, &msg, - SERIAL_CONTROL_DEV_SHELL, 0, 0, 0, strlen(data), (uint8_t *)data, 0, 0); + SERIAL_CONTROL_DEV_SHELL, + i + MAVLINK_MSG_SERIAL_CONTROL_FIELD_DATA_LEN < strlen(str) ? SERIAL_CONTROL_FLAG_MULTI : 0, // more chunks to go + 0, 0, strlen(data), (uint8_t *)data, 0, 0); sendMessage(&msg); } mavlinkPrintBuffer.clear();