mirror of
https://github.com/okalachev/flix.git
synced 2025-07-28 20:08:53 +00:00
Mark non-last print chunks in buffer with 'multi' flag
This commit is contained in:
parent
a9ede4c90f
commit
0533d2716d
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user