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:
parent
c059c9f64d
commit
c0d18280d5
45 changed files with 37 additions and 86 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue