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

Added missing stuff to unittests

This commit is contained in:
ProDrone 2015-05-21 14:16:22 +02:00
parent a153302b48
commit 655bd574c2
2 changed files with 12 additions and 0 deletions

View file

@ -315,6 +315,15 @@ void pwmWriteMotor(uint8_t index, uint16_t value) {
motors[index].value = value; motors[index].value = value;
} }
void pwmShutdownPulsesForAllMotors(uint8_t motorCount)
{
uint8_t index;
for(index = 0; index < motorCount; index++){
motors[index].value = 0;
}
}
void pwmCompleteOneshotMotorUpdate(uint8_t motorCount) { void pwmCompleteOneshotMotorUpdate(uint8_t motorCount) {
lastOneShotUpdateMotorCount = motorCount; lastOneShotUpdateMotorCount = motorCount;
} }

View file

@ -242,6 +242,7 @@ TEST(RcControlsTest, processRcAdjustmentsSticksInMiddle)
.thrExpo8 = 0, .thrExpo8 = 0,
.rates = {0,0,0}, .rates = {0,0,0},
.dynThrPID = 0, .dynThrPID = 0,
.rcYawExpo8 = 0,
.tpa_breakpoint = 0 .tpa_breakpoint = 0
}; };
@ -285,6 +286,7 @@ TEST(RcControlsTest, processRcAdjustmentsWithRcRateFunctionSwitchUp)
.thrExpo8 = 0, .thrExpo8 = 0,
.rates = {0,0,0}, .rates = {0,0,0},
.dynThrPID = 0, .dynThrPID = 0,
.rcYawExpo8 = 0,
.tpa_breakpoint = 0 .tpa_breakpoint = 0
}; };
@ -451,6 +453,7 @@ TEST(RcControlsTest, processRcRateProfileAdjustments)
.thrExpo8 = 0, .thrExpo8 = 0,
.rates = {0,0,0}, .rates = {0,0,0},
.dynThrPID = 0, .dynThrPID = 0,
.rcYawExpo8 = 0,
.tpa_breakpoint = 0 .tpa_breakpoint = 0
}; };