diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 5f26f62e1c..0ca21b36c0 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -765,5 +765,5 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20190111; + return 20190120; } diff --git a/firmware/controllers/injector_central.cpp b/firmware/controllers/injector_central.cpp index 6040b6f17b..98cfdac576 100644 --- a/firmware/controllers/injector_central.cpp +++ b/firmware/controllers/injector_central.cpp @@ -244,7 +244,7 @@ void OutputPin::unregisterOutput(brain_pin_e oldPin, brain_pin_e newPin) { } } -void runBenchTest(int subsystem, int index) { +void runBenchTest(uint16_t subsystem, uint16_t index) { scheduleMsg(logger, "IO test subsystem=%d index=%d", subsystem, index); if (subsystem == 0x12) { @@ -265,6 +265,8 @@ void runBenchTest(int subsystem, int index) { } else if (subsystem == 0x20 && index == 0x3456) { // call to pit setCallFromPitStop(30000); + } else if (subsystem == 0x30) { + setEngineType(index); } else if (subsystem == 0x99) { scheduleStopEngine(); } diff --git a/firmware/controllers/injector_central.h b/firmware/controllers/injector_central.h index cd03f82bd1..3f8c859832 100644 --- a/firmware/controllers/injector_central.h +++ b/firmware/controllers/injector_central.h @@ -20,6 +20,6 @@ void milBench(void); void initInjectorCentral(Logging *sharedLogger); bool isRunningBenchTest(void); -void runBenchTest(int subsystem, int index); +void runBenchTest(uint16_t subsystem, uint16_t index); #endif /* INJECTOR_CENTRAL_H_ */ diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index dec7930e28..27d7755d6f 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -63,7 +63,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 20 20:01:54 EST 2019 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 20 22:01:21 EST 2019 pageSize = 20000 page = 1 @@ -2012,6 +2012,7 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" subMenu = ioTest, "Bench Test" + subMenu = engineTypeDialog, "Popular vehicles" subMenu = allPins, "Full pinout" [ControllerCommands] @@ -2070,6 +2071,12 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" cmd_call_from_pit = "w\x00\x20\x34\x56" cmd_stop_engine = "w\x00\x99\x00\x00" +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Miata_NA6_MAP = "w\x00\x30\x00\x29" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Miata_NA6_VAF = "w\x00\x30\x00\x39" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Miata_NA2 = "w\x00\x30\x00\x2F" [UserDefined] dialog = fuelTableBottomDialog, "", card @@ -3104,6 +3111,11 @@ cmd_stop_engine = "w\x00\x99\x00\x00" panel = testSpark, West panel = testInjectors, Center panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + commandButton = "Miata NA6 VAF", cmd_set_engine_type_Miata_NA6_VAF + commandButton = "Miata NA6 MAP", cmd_set_engine_type_Miata_NA6_MAP + commandButton = "Miata NB2 MAP", cmd_set_engine_type_Miata_NA2 ; Board->ECU stimulator diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index a05fd2130a..3d9d558bed 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1153,6 +1153,7 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" subMenu = ioTest, "Bench Test" + subMenu = engineTypeDialog, "Popular vehicles" subMenu = allPins, "Full pinout" [ControllerCommands] @@ -1211,6 +1212,12 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" cmd_call_from_pit = "w\x00\x20\x34\x56" cmd_stop_engine = "w\x00\x99\x00\x00" +; MIATA_NA6_MAP = 41 +cmd_set_engine_type_Miata_NA6_MAP = "w\x00\x30\x00\x29" +; MIATA_NA6_VAF = 57 +cmd_set_engine_type_Miata_NA6_VAF = "w\x00\x30\x00\x39" +; MAZDA_MIATA_2003 = 47 +cmd_set_engine_type_Miata_NA2 = "w\x00\x30\x00\x2F" [UserDefined] dialog = fuelTableBottomDialog, "", card @@ -2245,6 +2252,11 @@ cmd_stop_engine = "w\x00\x99\x00\x00" panel = testSpark, West panel = testInjectors, Center panel = testMisc, East + + dialog = engineTypeDialog, "Popular vehicles" + commandButton = "Miata NA6 VAF", cmd_set_engine_type_Miata_NA6_VAF + commandButton = "Miata NA6 MAP", cmd_set_engine_type_Miata_NA6_MAP + commandButton = "Miata NB2 MAP", cmd_set_engine_type_Miata_NA2 ; Board->ECU stimulator