mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Blackbox: Fix slow frames were not logged when logging rate was 1/32
This commit is contained in:
parent
2b356a47dc
commit
1a15e5aa08
1 changed files with 6 additions and 2 deletions
|
@ -357,6 +357,10 @@ static blackboxMainState_t* blackboxHistory[3];
|
||||||
|
|
||||||
static bool blackboxModeActivationConditionPresent = false;
|
static bool blackboxModeActivationConditionPresent = false;
|
||||||
|
|
||||||
|
static bool blackboxIsOnlyLoggingIntraframes() {
|
||||||
|
return masterConfig.blackbox_rate_num == 1 && masterConfig.blackbox_rate_denom == 32;
|
||||||
|
}
|
||||||
|
|
||||||
static bool testBlackboxConditionUncached(FlightLogFieldCondition condition)
|
static bool testBlackboxConditionUncached(FlightLogFieldCondition condition)
|
||||||
{
|
{
|
||||||
switch (condition) {
|
switch (condition) {
|
||||||
|
@ -1221,9 +1225,9 @@ static void blackboxLogIteration()
|
||||||
if (blackboxShouldLogIFrame()) {
|
if (blackboxShouldLogIFrame()) {
|
||||||
/*
|
/*
|
||||||
* Don't log a slow frame if the slow data didn't change ("I" frames are already large enough without adding
|
* Don't log a slow frame if the slow data didn't change ("I" frames are already large enough without adding
|
||||||
* an additional item to write at the same time)
|
* an additional item to write at the same time). Unless we're *only* logging "I" frames, then we have no choice.
|
||||||
*/
|
*/
|
||||||
writeSlowFrameIfNeeded(false);
|
writeSlowFrameIfNeeded(blackboxIsOnlyLoggingIntraframes());
|
||||||
|
|
||||||
loadMainState();
|
loadMainState();
|
||||||
writeIntraframe();
|
writeIntraframe();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue