diff --git a/firmware/controllers/bench_test.cpp b/firmware/controllers/bench_test.cpp index 9fd88cb961..219fbc6b3d 100644 --- a/firmware/controllers/bench_test.cpp +++ b/firmware/controllers/bench_test.cpp @@ -151,6 +151,10 @@ void milBench(void) { pinbench("0", "500", "500", "16", &enginePins.checkEnginePin, CONFIG(malfunctionIndicatorPin)); } +void starterRelayBench(void) { + pinbench("0", "6000", "100", "1", &enginePins.starterControl, CONFIG(starterControlPin)); +} + void fuelPumpBenchExt(const char *durationMs) { pinbench("0", durationMs, "100", "1", &enginePins.fuelPumpRelay, CONFIG(fuelPumpPin)); } @@ -246,12 +250,15 @@ static void handleCommandX14(uint16_t index) { case 9: acRelayBench(); return; - case 10: + case 0xA: // cmd_write_config #if EFI_PROD_CODE writeToFlashNow(); #endif /* EFI_PROD_CODE */ return; + case 0xB: + starterRelayBench(); + return; } @@ -286,6 +293,7 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) { } else if (subsystem == 0x20 && index == 0x3456) { // call to pit setCallFromPitStop(30000); + } else if (subsystem == 0x21) { } else if (subsystem == 0x30) { setEngineType(index); } else if (subsystem == 0x31) { @@ -313,6 +321,7 @@ void initBenchTest(Logging *sharedLogger) { addConsoleActionS("fanbench2", fanBenchExt); addConsoleAction("dizzybench", dizzyBench); // this is useful for tach output testing + addConsoleAction("starterbench", starterRelayBench); addConsoleAction("milbench", milBench); addConsoleActionSSS("fuelbench", fuelbench); addConsoleActionSSS("sparkbench", sparkbench); diff --git a/firmware/controllers/bench_test.h b/firmware/controllers/bench_test.h index 9005f5401b..f64ee1706a 100644 --- a/firmware/controllers/bench_test.h +++ b/firmware/controllers/bench_test.h @@ -12,11 +12,14 @@ #include "global.h" +void initBenchTest(Logging *sharedLogger); + +bool isRunningBenchTest(void); + void fanBench(void); void fuelPumpBench(void); void acRelayBench(void); void milBench(void); -void initBenchTest(Logging *sharedLogger); -bool isRunningBenchTest(void); +void starterRelayBench(void); void executeTSCommand(uint16_t subsystem, uint16_t index); diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 82be8247cf..c1de13fe66 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -86,7 +86,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:07:45 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:15:09 EDT 2020 pageSize = 20000 page = 1 @@ -2548,6 +2548,7 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -3862,6 +3863,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index a31972795c..b9bb855b0a 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1410,6 +1410,7 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -2725,6 +2726,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 6eff59155d..27813a9844 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -86,7 +86,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:07:55 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:15:19 EDT 2020 pageSize = 20000 page = 1 @@ -2548,6 +2548,7 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -3862,6 +3863,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index a11cc41640..21ed326b39 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -86,7 +86,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:07:50 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:15:14 EDT 2020 pageSize = 20000 page = 1 @@ -2540,6 +2540,7 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -3824,6 +3825,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 6e043369d7..f3c7fda6e7 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -86,7 +86,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:07:59 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:15:29 EDT 2020 pageSize = 20000 page = 1 @@ -2544,6 +2544,7 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -3858,6 +3859,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index b2364ede9e..cf0fb40251 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -86,7 +86,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:08:04 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 17:15:36 EDT 2020 pageSize = 20000 page = 1 @@ -2540,6 +2540,7 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -3830,6 +3831,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller