mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-1119 Added code to format log flash on flight controller
This commit is contained in:
parent
8054cd5296
commit
5738a87141
@ -87,10 +87,17 @@ QQmlListProperty<ExtendedDebugLogEntry> FlightLogManager::logEntries()
|
||||
void FlightLogManager::clearAllLogs()
|
||||
{
|
||||
// Clear on flight side
|
||||
UAVObjectUpdaterHelper updateHelper;
|
||||
|
||||
// Then delete locally
|
||||
while (!m_logEntries.isEmpty()) {
|
||||
delete m_logEntries.takeFirst();
|
||||
m_flightLogControl->setFlight(0);
|
||||
m_flightLogControl->setEntry(0);
|
||||
m_flightLogControl->setOperation(DebugLogControl::OPERATION_FORMATFLASH);
|
||||
if (updateHelper.doObjectAndWait(m_flightLogControl, UAVTALK_TIMEOUT) == UAVObjectUpdaterHelper::SUCCESS) {
|
||||
// Then delete locally
|
||||
while (!m_logEntries.isEmpty()) {
|
||||
delete m_logEntries.takeFirst();
|
||||
}
|
||||
emit logEntriesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user