1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Removed feature SDCARD and BLACKBOX

Now uses blackboxConfig()->device instead. Requires co-ordination with configurator.
This commit is contained in:
blckmn 2017-03-25 05:27:58 +11:00
parent c059c9f64d
commit c0d18280d5
45 changed files with 37 additions and 86 deletions

View file

@ -1674,22 +1674,12 @@ void handleBlackbox(timeUs_t currentTimeUs)
}
}
static bool canUseBlackboxWithCurrentConfiguration(void)
{
#ifdef USE_SDCARD
return feature(FEATURE_BLACKBOX) &&
!(blackboxConfig()->device == BLACKBOX_DEVICE_SDCARD && !feature(FEATURE_SDCARD));
#else
return feature(FEATURE_BLACKBOX);
#endif
}
/**
* Call during system startup to initialize the blackbox.
*/
void initBlackbox(void)
{
if (canUseBlackboxWithCurrentConfiguration()) {
if (blackboxConfig()->device) {
blackboxSetState(BLACKBOX_STATE_STOPPED);
} else {
blackboxSetState(BLACKBOX_STATE_DISABLED);