From 839539abc499e4f3b6fb33bffb7a315cd5da7858 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 23 Jun 2021 17:16:11 -0400 Subject: [PATCH] fan2 bench --- .../boards/hellen/hellen72/board_configuration.cpp | 2 ++ firmware/controllers/bench_test.cpp | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/firmware/config/boards/hellen/hellen72/board_configuration.cpp b/firmware/config/boards/hellen/hellen72/board_configuration.cpp index bcb960e24b..f39c2659a9 100644 --- a/firmware/config/boards/hellen/hellen72/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen72/board_configuration.cpp @@ -159,6 +159,8 @@ void setBoardDefaultConfiguration(void) { engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9 engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5 engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 + engineConfiguration->fan2Pin = GPIOD_9; + engineConfiguration->enableFan2WithAc = true; engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3 // "required" hardware is done - set some reasonable defaults diff --git a/firmware/controllers/bench_test.cpp b/firmware/controllers/bench_test.cpp index 5cd4c7fe35..f6a083d122 100644 --- a/firmware/controllers/bench_test.cpp +++ b/firmware/controllers/bench_test.cpp @@ -202,6 +202,10 @@ void fanBench(void) { fanBenchExt("3000"); } +void fan2Bench(void) { + pinbench("0", "3000", "100", "1", &enginePins.fanRelay2, CONFIG(fan2Pin)); +} + /** * we are blinking for 16 seconds so that one can click the button and walk around to see the light blinking */ @@ -318,6 +322,9 @@ static void handleBenchCategory(uint16_t index) { case CMD_TS_BENCH_FAN_RELAY: fanBench(); return; + case CMD_TS_BENCH_AC_FAN_RELAY: + fan2Bench(); + return; default: firmwareError(OBD_PCM_Processor_Fault, "Unexpected bench function %d", index); } @@ -495,9 +502,10 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) { void initBenchTest() { addConsoleAction("fuelpumpbench", fuelPumpBench); - addConsoleAction("acrelaybench", acRelayBench); + addConsoleAction(CMD_AC_RELAY_BENCH, acRelayBench); addConsoleActionS("fuelpumpbench2", fuelPumpBenchExt); - addConsoleAction("fanbench", fanBench); + addConsoleAction(CMD_FAN_BENCH, fanBench); + addConsoleAction(CMD_FAN2_BENCH, fan2Bench); addConsoleAction("mainrelaybench", mainRelayBench); addConsoleActionS("fanbench2", fanBenchExt); @@ -509,7 +517,7 @@ void initBenchTest() { addConsoleAction(CMD_STARTER_BENCH, starterRelayBench); addConsoleAction(CMD_MIL_BENCH, milBench); addConsoleActionSSS(CMD_FUEL_BENCH, fuelbench); - addConsoleActionSSS("sparkbench", sparkbench); + addConsoleActionSSS(CMD_SPARK_BENCH, sparkbench); addConsoleAction(CMD_HPFP_BENCH, hpfpValveBench); addConsoleActionSSSSS("fuelbench2", fuelbench2);