Hi all,
void downloadLogs() {
Serial.println(“Requesting log list…”);
// Request log list (this is a placeholder, replace with actual MAVLink message)
FLIGHT_CONTROLLER.write("log_request_list");
// Wait for log list response
while (FLIGHT_CONTROLLER.available()) {
uint8_t msgId = FLIGHT_CONTROLLER.read();
Serial.print("Flight Controller:");
Serial.println(msgId);
if (msgId == MAVLINK_MSG_ID_LOG_ENTRY)
// if(msgId == MAVLINK_MSG_ID_HEARTBEAT)
{
Serial.println("Received log entry message");
handleLogEntry(3,5);
// Extract log entry details and download logs (replace with actual handling logic)
// uint8_t logId = 0; // Replace with actual log ID extracted
// uint8_t logSize = 0; // Replace with actual log size extracted
// handleLogEntry(logId, logSize);
// void handleLogEntry(uint8_t logId, uint8_t logSize);
}
if (msgId == MAVLINK_MSG_ID_LOG_REQUEST_DATA) {
Serial.println("Received log request send message");
// handleLogEntry(3,5);
}
}
Serial.println("Log download complete");
}
In that im getting Everytime msg id 0 i.e Heartbeat but i need all msg ids and in that i need 118 msg id to enter the loop anyone can help to me