mirror of https://github.com/rusefi/rusefi-1.git
misc clean-up
This commit is contained in:
parent
0583fd0b6c
commit
4dafc65d69
|
@ -24,9 +24,10 @@ float getVoltageDivided(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_
|
|||
case TEST_IAT_CHANNEL:
|
||||
return testIatValue;
|
||||
//return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));
|
||||
}
|
||||
default:
|
||||
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));;
|
||||
}
|
||||
}
|
||||
|
||||
float getVoltage(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
if (engine->engineState.mockAdcState.hasMockAdc[hwChannel])
|
||||
|
|
|
@ -173,7 +173,7 @@ scheduling_s * EngineTestHelper::assertEvent5(const char *msg, int index, void *
|
|||
|
||||
scheduling_s * EngineTestHelper::assertScheduling(const char *msg, int index, scheduling_s *expected, void *callback, efitime_t expectedTimestamp) {
|
||||
scheduling_s * actual = assertEvent5(msg, index, callback, expectedTimestamp);
|
||||
|
||||
return actual;
|
||||
}
|
||||
|
||||
void EngineTestHelper::assertEvent(const char *msg, int index, void *callback, efitime_t momentX, InjectionEvent *expectedEvent) {
|
||||
|
|
|
@ -20,11 +20,8 @@ TEST(misc, testAuxValves) {
|
|||
eth.fireTriggerEvents2(2 /* count */ , 600 /* ms */);
|
||||
ASSERT_EQ( 100, GET_RPM()) << "spinning-RPM#1";
|
||||
|
||||
scheduling_s *sch;
|
||||
|
||||
sch = eth.assertScheduling("a0", 0, (void*)&engine->auxTurnOnEvent, &plainPinTurnOn, -600000);
|
||||
|
||||
sch = eth.assertScheduling("a1", 1, (void*)&engine->auxTurnOffEvent, &plainPinTurnOff, -550000);
|
||||
sch = eth.assertScheduling("a2", 2, (void*)&engine->auxTurnOnEvent[1][0][0], &plainPinTurnOn, -300000);
|
||||
eth.assertScheduling("a0", 0, &engine->auxTurnOnEvent[0][0][0], (void*)&plainPinTurnOn, -600000);
|
||||
eth.assertScheduling("a1", 1, &engine->auxTurnOffEvent[0][0][0], (void*)&plainPinTurnOff, -550000);
|
||||
eth.assertScheduling("a2", 2, &engine->auxTurnOnEvent[1][0][0], (void*)&plainPinTurnOn, -300000);
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ TEST(testCJ125, testInitialState) {
|
|||
WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996);
|
||||
ASSERT_EQ(engine->sensors.vBatt, 0);
|
||||
|
||||
cj.StartHeaterControl(&applyHeaterPinState PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
cj.StartHeaterControl((pwm_gen_callback*)&applyHeaterPinState PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ(cj.heaterDuty, CJ125_HEATER_IDLE_RATE);
|
||||
|
||||
TestSpi mock;
|
||||
|
|
|
@ -36,7 +36,6 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
|||
ASSERT_EQ(0, engine->executor.size()) << "plain#1";
|
||||
|
||||
// check all events starting from now
|
||||
int timeStartUs = eth.getTimeNowUs();
|
||||
// advance 1 revolution
|
||||
// because we have trivial TT_ONE trigger here synchronization would happen with just one rise front
|
||||
eth.fireRise(200);
|
||||
|
@ -81,7 +80,6 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
|||
eth.fireFall(60);
|
||||
|
||||
eth.clearQueue();
|
||||
timeStartUs = eth.getTimeNowUs();
|
||||
eth.fireTriggerEventsWithDuration(60);
|
||||
|
||||
// check if the mode is now changed to 'running' at higher RPM
|
||||
|
|
|
@ -52,7 +52,7 @@ static void test100dutyCycle() {
|
|||
&pin,
|
||||
1000 /* frequency */,
|
||||
1.0 /* duty cycle */,
|
||||
&testApplyPinState);
|
||||
(pwm_gen_callback*)&testApplyPinState);
|
||||
|
||||
expectedTimeOfNextEvent += 1000;
|
||||
assertEqualsM2("1@1000/100", expectedTimeOfNextEvent, executor.getForUnitTest(0)->momentX, 0);
|
||||
|
@ -79,7 +79,7 @@ static void testSwitchToNanPeriod() {
|
|||
&pin,
|
||||
1000 /* frequency */,
|
||||
0.60 /* duty cycle */,
|
||||
&testApplyPinState);
|
||||
(pwm_gen_callback*)&testApplyPinState);
|
||||
|
||||
expectedTimeOfNextEvent += 600;
|
||||
assertEqualsM2("1@1000/70", expectedTimeOfNextEvent, executor.getForUnitTest(0)->momentX, 0);
|
||||
|
@ -118,7 +118,7 @@ TEST(misc, testPwmGenerator) {
|
|||
&pin,
|
||||
1000 /* frequency */,
|
||||
0.80 /* duty cycle */,
|
||||
&testApplyPinState);
|
||||
(pwm_gen_callback*)&testApplyPinState);
|
||||
|
||||
|
||||
expectedTimeOfNextEvent += 800;
|
||||
|
|
Loading…
Reference in New Issue