mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +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()
|
void FlightLogManager::clearAllLogs()
|
||||||
{
|
{
|
||||||
// Clear on flight side
|
// Clear on flight side
|
||||||
|
UAVObjectUpdaterHelper updateHelper;
|
||||||
|
|
||||||
// Then delete locally
|
m_flightLogControl->setFlight(0);
|
||||||
while (!m_logEntries.isEmpty()) {
|
m_flightLogControl->setEntry(0);
|
||||||
delete m_logEntries.takeFirst();
|
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