diff --git a/firmware/controllers/engine_cycle/aux_valves.cpp b/firmware/controllers/engine_cycle/aux_valves.cpp index 898e46a8b9..d0e222cedb 100644 --- a/firmware/controllers/engine_cycle/aux_valves.cpp +++ b/firmware/controllers/engine_cycle/aux_valves.cpp @@ -22,7 +22,11 @@ EXTERN_ENGINE; -void plainPinTurnOn(AuxActor *current) { +static void plainPinTurnOff(NamedOutputPin *output) { + output->setLow(); +} + +void auxPlainPinTurnOn(AuxActor *current) { NamedOutputPin *output = &enginePins.auxValve[current->valveIndex]; output->setHigh(); @@ -35,7 +39,7 @@ void plainPinTurnOn(AuxActor *current) { TRIGGER_EVENT_UNDEFINED, getTimeNowNt(), current->extra + engine->engineState.auxValveStart, - { plainPinTurnOn, current } + { auxPlainPinTurnOn, current } PASS_ENGINE_PARAMETER_SUFFIX ); @@ -52,10 +56,6 @@ void plainPinTurnOn(AuxActor *current) { ); } -void plainPinTurnOff(NamedOutputPin *output) { - output->setLow(); -} - void initAuxValves(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { UNUSED(sharedLogger); if (engineConfiguration->auxValves[0] == GPIO_UNASSIGNED) { @@ -83,7 +83,7 @@ void initAuxValves(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { TRIGGER_EVENT_UNDEFINED, getTimeNowNt(), actor->extra + engine->engineState.auxValveStart, - { plainPinTurnOn, actor } + { auxPlainPinTurnOn, actor } PASS_ENGINE_PARAMETER_SUFFIX ); } diff --git a/firmware/controllers/engine_cycle/aux_valves.h b/firmware/controllers/engine_cycle/aux_valves.h index 3909107762..db84f0d820 100644 --- a/firmware/controllers/engine_cycle/aux_valves.h +++ b/firmware/controllers/engine_cycle/aux_valves.h @@ -11,5 +11,4 @@ void initAuxValves(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void recalculateAuxValveTiming(DECLARE_ENGINE_PARAMETER_SIGNATURE); -void plainPinTurnOn(AuxActor *current); -void plainPinTurnOff(NamedOutputPin *output); +void auxPlainPinTurnOn(AuxActor *current); diff --git a/unit_tests/tests/test_aux_valves.cpp b/unit_tests/tests/test_aux_valves.cpp index 0f5426941f..d199da8590 100644 --- a/unit_tests/tests/test_aux_valves.cpp +++ b/unit_tests/tests/test_aux_valves.cpp @@ -22,8 +22,8 @@ TEST(misc, testAuxValves) { eth.fireTriggerEvents2(2 /* count */ , 600 /* ms */); ASSERT_EQ( 100, GET_RPM()) << "spinning-RPM#1"; - eth.assertTriggerEvent("a0", 0, &engine->auxValves[0][0].open, (void*)&plainPinTurnOn, 7, 86); - eth.assertTriggerEvent("a1", 1, &engine->auxValves[0][1].open, (void*)&plainPinTurnOn, 3, 86); - eth.assertTriggerEvent("a2", 2, &engine->auxValves[1][0].open, (void*)&plainPinTurnOn, 1, 86); + eth.assertTriggerEvent("a0", 0, &engine->auxValves[0][0].open, (void*)&auxPlainPinTurnOn, 7, 86); + eth.assertTriggerEvent("a1", 1, &engine->auxValves[0][1].open, (void*)&auxPlainPinTurnOn, 3, 86); + eth.assertTriggerEvent("a2", 2, &engine->auxValves[1][0].open, (void*)&auxPlainPinTurnOn, 1, 86); }