mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Don't close blackbox log on disarm if mode is ALWAYS_ON (#5341)
This commit is contained in:
parent
66dac7a2e3
commit
33ee5efa17
3 changed files with 7 additions and 7 deletions
|
@ -71,12 +71,6 @@
|
|||
#include "sensors/gyro.h"
|
||||
#include "sensors/rangefinder.h"
|
||||
|
||||
enum {
|
||||
BLACKBOX_MODE_NORMAL = 0,
|
||||
BLACKBOX_MODE_MOTOR_TEST,
|
||||
BLACKBOX_MODE_ALWAYS_ON
|
||||
};
|
||||
|
||||
#if defined(ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT)
|
||||
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
|
||||
#elif defined(ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT)
|
||||
|
|
|
@ -33,6 +33,12 @@ typedef enum BlackboxDevice {
|
|||
BLACKBOX_DEVICE_SERIAL = 3
|
||||
} BlackboxDevice_e;
|
||||
|
||||
typedef enum BlackboxMode {
|
||||
BLACKBOX_MODE_NORMAL = 0,
|
||||
BLACKBOX_MODE_MOTOR_TEST,
|
||||
BLACKBOX_MODE_ALWAYS_ON
|
||||
} BlackboxMode;
|
||||
|
||||
typedef enum FlightLogEvent {
|
||||
FLIGHT_LOG_EVENT_SYNC_BEEP = 0,
|
||||
FLIGHT_LOG_EVENT_INFLIGHT_ADJUSTMENT = 13,
|
||||
|
|
|
@ -280,7 +280,7 @@ void disarm(void)
|
|||
DISABLE_ARMING_FLAG(ARMED);
|
||||
|
||||
#ifdef USE_BLACKBOX
|
||||
if (blackboxConfig()->device) {
|
||||
if (blackboxConfig()->device && blackboxConfig()->mode != BLACKBOX_MODE_ALWAYS_ON) { // Close the log upon disarm except when logging mode is ALWAYS ON
|
||||
blackboxFinish();
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue