Skip to content

Commit

Permalink
Default blackbox device to NONE on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Jan 19, 2023
1 parent fb29036 commit 0d8d210
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/blackbox/blackbox.c
Expand Up @@ -88,7 +88,7 @@
#elif defined(ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT)
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
#else
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SERIAL
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_NONE
#endif

PG_REGISTER_WITH_RESET_TEMPLATE(blackboxConfig_t, blackboxConfig, PG_BLACKBOX_CONFIG, 3);
Expand Down Expand Up @@ -873,7 +873,7 @@ STATIC_UNIT_TESTED bool writeSlowFrameIfNeeded(void)

void blackboxValidateConfig(void)
{
// If we've chosen an unsupported device, change the device to serial
// If we've chosen an unsupported device, change the device to NONE
switch (blackboxConfig()->device) {
#ifdef USE_FLASHFS
case BLACKBOX_DEVICE_FLASH:
Expand All @@ -886,7 +886,7 @@ void blackboxValidateConfig(void)
break;

default:
blackboxConfigMutable()->device = BLACKBOX_DEVICE_SERIAL;
blackboxConfigMutable()->device = BLACKBOX_DEVICE_NONE;
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/test/unit/target.h
Expand Up @@ -72,8 +72,6 @@

#define TARGET_BOARD_IDENTIFIER "TEST"

#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SERIAL

#define LED_STRIP_TIMER 1
#define SOFTSERIAL_1_TIMER 2
#define SOFTSERIAL_2_TIMER 3
Expand Down

0 comments on commit 0d8d210

Please sign in to comment.