Skip to content

Commit 85f4ebb

Browse files
Merge pull request #11220 from sensei-hacker/fix-blackbox-motors-null-bytes
Fix blackbox corruption when no motors defined in mixer
2 parents c4bee56 + 402c2d5 commit 85f4ebb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/blackbox/blackbox.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ static void writeIntraframe(void)
987987
blackboxWriteSignedVBArray(blackboxCurrent->debug, DEBUG32_VALUE_COUNT);
988988
}
989989

990-
if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_MOTORS)) {
990+
if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_AT_LEAST_MOTORS_1)) {
991991
//Motors can be below minthrottle when disarmed, but that doesn't happen much
992992
blackboxWriteUnsignedVB(blackboxCurrent->motor[0] - getThrottleIdleValue());
993993

@@ -1254,7 +1254,7 @@ static void writeInterframe(void)
12541254
blackboxWriteArrayUsingAveragePredictor32(offsetof(blackboxMainState_t, debug), DEBUG32_VALUE_COUNT);
12551255
}
12561256

1257-
if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_MOTORS)) {
1257+
if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_AT_LEAST_MOTORS_1)) {
12581258
blackboxWriteArrayUsingAveragePredictor16(offsetof(blackboxMainState_t, motor), getMotorCount());
12591259
}
12601260

0 commit comments

Comments
 (0)