diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index 7aa3b18efc..bc0b1e3de4 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -569,8 +569,8 @@ case FRANKENSO_QA_ENGINE: return "FRANKENSO_QA_ENGINE"; case Force_4_bytes_size_engine_type: return "Force_4_bytes_size_engine_type"; -case GEO_STORM: - return "GEO_STORM"; +case BMW_M73: + return "BMW_M73"; case MRE_BOARD_TEST: return "MRE_BOARD_TEST"; case GY6_139QMB: diff --git a/firmware/config/engines/bmw_e34.h b/firmware/config/engines/bmw_e34.h index 319f141376..554d94ad1c 100644 --- a/firmware/config/engines/bmw_e34.h +++ b/firmware/config/engines/bmw_e34.h @@ -5,11 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef BMW_E34_H_ -#define BMW_E34_H_ +#pragma once #include "engine_configuration.h" void setBmwE34(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* BMW_E34_H_ */ diff --git a/firmware/config/engines/bmw_m73.cpp b/firmware/config/engines/bmw_m73.cpp index 9634015c91..af90e03754 100644 --- a/firmware/config/engines/bmw_m73.cpp +++ b/firmware/config/engines/bmw_m73.cpp @@ -32,11 +32,11 @@ * ECU pin 22: IN RED/BRN GRN CLT sensor * ECU pin 27: OUT injector #6 * ECU pin 28: OUT injector #5 - * ECU pin 32: IN ORG VR crankshaft sensor + * ECU pin 32: IN ORG VR positive crankshaft sensor - only 2x 5k per channel, R111 not installed, W1002 not installed * ECU pin 40: OUT BRN/BLK injector #3 * ECU pin 41: OUT BRN/WHT injector #1 * ECU pin 45: GND crankshaft shield - * ECU pin 46: IN BLK BLU VR crankshaft sensor + * ECU pin 46: IN BLK BLU VR negative crankshaft sensor * * * Plug #4 40 pin @@ -46,6 +46,9 @@ * ECU pin 40: OUT YEL/BRN BRN starter enable * * + * set engine_type 40 + * + * * @date Nov 1, 2019 * @author Andrey Belomutskiy, (c) 2012-2019 */ @@ -62,6 +65,15 @@ void setEngineBMW_M73(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->specs.displacement = 5.4; engineConfiguration->specs.firingOrder = FO_1_7_5_11_3_9_6_12_2_8_4_10; + boardConfiguration->triggerInputPins[0] = GPIOA_5; + boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; + engineConfiguration->camInputs[0] = GPIOC_6; + engineConfiguration->vvtMode = VVT_FIRST_HALF; + + setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); + engineConfiguration->trigger.type = TT_60_2_VW; + + // 13641435991 injector engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info } diff --git a/firmware/config/engines/engines.mk b/firmware/config/engines/engines.mk index 96e7d72912..f83ff040c4 100644 --- a/firmware/config/engines/engines.mk +++ b/firmware/config/engines/engines.mk @@ -23,7 +23,6 @@ ENGINES_SRC_CPP = $(PROJECT_DIR)/config/engines/ford_aspire.cpp \ $(PROJECT_DIR)/config/engines/rover_v8.cpp \ $(PROJECT_DIR)/config/engines/mazda_323.cpp \ $(PROJECT_DIR)/config/engines/mazda_626.cpp \ - $(PROJECT_DIR)/config/engines/prometheus.cpp \ $(PROJECT_DIR)/config/engines/sachs.cpp \ $(PROJECT_DIR)/config/engines/test_engine.cpp \ $(PROJECT_DIR)/config/engines/mitsubishi.cpp \ diff --git a/firmware/config/engines/ford_aspire.h b/firmware/config/engines/ford_aspire.h index 680732cb34..01834638e3 100644 --- a/firmware/config/engines/ford_aspire.h +++ b/firmware/config/engines/ford_aspire.h @@ -9,11 +9,8 @@ * */ -#ifndef FORD_ASPIRE_H_ -#define FORD_ASPIRE_H_ +#pragma once #include "engine_configuration.h" void setFordAspireEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* FORD_ASPIRE_H_ */ diff --git a/firmware/config/engines/mazda_miata.h b/firmware/config/engines/mazda_miata.h index f9f3907856..89df89f884 100644 --- a/firmware/config/engines/mazda_miata.h +++ b/firmware/config/engines/mazda_miata.h @@ -9,8 +9,7 @@ * Injectors: Denso 195500-2180, 230-265cc (?), tan, 13.9 ohms */ -#ifndef MAZDA_MIATA_H_ -#define MAZDA_MIATA_H_ +#pragma once #include "engine_configuration.h" @@ -18,5 +17,3 @@ void common079721_2351(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiata1990(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiata1994_d(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiata1996(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* MAZDA_MIATA_H_ */ diff --git a/firmware/config/engines/mazda_miata_na8.h b/firmware/config/engines/mazda_miata_na8.h index 2c80448641..709db5dacc 100644 --- a/firmware/config/engines/mazda_miata_na8.h +++ b/firmware/config/engines/mazda_miata_na8.h @@ -5,11 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef CONFIG_ENGINES_MAZDA_MIATA_NA8_H_ -#define CONFIG_ENGINES_MAZDA_MIATA_NA8_H_ +#pragma once #include "engine_configuration.h" void setMazdaMiataNA8Configuration(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* CONFIG_ENGINES_MAZDA_MIATA_NA8_H_ */ diff --git a/firmware/config/engines/mazda_miata_nb.h b/firmware/config/engines/mazda_miata_nb.h index b5b11a622b..b886db1b43 100644 --- a/firmware/config/engines/mazda_miata_nb.h +++ b/firmware/config/engines/mazda_miata_nb.h @@ -5,11 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef MAZDA_MIATA_NB1_H_ -#define MAZDA_MIATA_NB1_H_ +#pragma once #include "engine_configuration.h" void setMazdaMiataNb1EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* MAZDA_MIATA_NB1_H_ */ diff --git a/firmware/config/engines/mazda_miata_vvt.h b/firmware/config/engines/mazda_miata_vvt.h index bdc5e0f170..a5acf6b878 100644 --- a/firmware/config/engines/mazda_miata_vvt.h +++ b/firmware/config/engines/mazda_miata_vvt.h @@ -7,8 +7,7 @@ * http://rusefi.com/forum/viewtopic.php?f=3&t=1095 */ -#ifndef CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ -#define CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ +#pragma once #include "engine_configuration.h" @@ -20,5 +19,3 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIG void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiataNB2_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* CONFIG_ENGINES_MAZDA_MIATA_VVT_H_ */ diff --git a/firmware/config/engines/prometheus.cpp b/firmware/config/engines/prometheus.cpp deleted file mode 100644 index ea20717595..0000000000 --- a/firmware/config/engines/prometheus.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * prometheus.cpp - * - * set engine_type 100 - * - * @date May 6, 2017 - * @author Andrey Belomutskiy, (c) 2012-2018 - */ - -#include "prometheus.h" - -void setPrometheusDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { - -} - - - diff --git a/firmware/config/engines/prometheus.h b/firmware/config/engines/prometheus.h deleted file mode 100644 index ee4ae84ef0..0000000000 --- a/firmware/config/engines/prometheus.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * prometheus.h - * - * @date May 6, 2017 - * @author Andrey Belomutskiy, (c) 2012-2017 - */ - -#ifndef CONFIG_ENGINES_PROMETHEUS_H_ -#define CONFIG_ENGINES_PROMETHEUS_H_ - -#include "engine_configuration.h" -void setPrometheusDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* CONFIG_ENGINES_PROMETHEUS_H_ */ diff --git a/firmware/controllers/algo/accel_enrichment.h b/firmware/controllers/algo/accel_enrichment.h index 844f23f717..d5a3351f0f 100644 --- a/firmware/controllers/algo/accel_enrichment.h +++ b/firmware/controllers/algo/accel_enrichment.h @@ -7,8 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ACC_ENRICHMENT_H_ -#define ACC_ENRICHMENT_H_ +#pragma once #include "global.h" #include "cyclic_buffer.h" @@ -93,6 +92,3 @@ void setDecelThr(float value); void setDecelMult(float value); void updateAccelParameters(); - -#endif /* ACC_ENRICHMENT_H_ */ - diff --git a/firmware/controllers/algo/advance_map.h b/firmware/controllers/algo/advance_map.h index 58e4e0ab75..f9cf4b94f0 100644 --- a/firmware/controllers/algo/advance_map.h +++ b/firmware/controllers/algo/advance_map.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ADVANCE_H_ -#define ADVANCE_H_ +#pragma once #include "engine.h" @@ -17,5 +16,3 @@ float getTopAdvanceForBore(chamber_style_e style, int octane, double compression float getInitialAdvance(int rpm, float map, float advanceMax); void buildTimingMap(float advanceMax DECLARE_CONFIG_PARAMETER_SUFFIX); angle_t getAdvanceCorrections(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); - -#endif /* ADVANCE_H_ */ diff --git a/firmware/controllers/algo/algo.h b/firmware/controllers/algo/algo.h index 2444b99040..f08b8d1497 100644 --- a/firmware/controllers/algo/algo.h +++ b/firmware/controllers/algo/algo.h @@ -5,12 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ALGO_H_ -#define ALGO_H_ +#pragma once #include "global.h" #include "engine_configuration.h" void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initAlgo(Logging *sharedLogger); - -#endif /* ALGO_H_ */ diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 5f0482fdcf..f920b61ffc 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -707,8 +707,8 @@ case FRANKENSO_QA_ENGINE: return "FRANKENSO_QA_ENGINE"; case Force_4_bytes_size_engine_type: return "Force_4_bytes_size_engine_type"; -case GEO_STORM: - return "GEO_STORM"; +case BMW_M73: + return "BMW_M73"; case MRE_BOARD_TEST: return "MRE_BOARD_TEST"; case GY6_139QMB: diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 5b68e8029b..8271361c37 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -38,6 +38,7 @@ #include "custom_engine.h" #include "engine_template.h" #include "bmw_e34.h" +#include "bmw_m73.h" #include "dodge_neon.h" #include "dodge_ram.h" @@ -62,7 +63,6 @@ #include "citroenBerlingoTU3JP.h" #include "rover_v8.h" #include "mitsubishi.h" -#include "prometheus.h" #include "subaru.h" #include "test_engine.h" #include "sachs.h" @@ -1053,10 +1053,12 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb */ switch (engineType) { case DEFAULT_FRANKENSO: - case GEO_STORM: case FRANKENSO_QA_ENGINE: setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; + case BMW_M73: + setEngineBMW_M73(PASS_CONFIG_PARAMETER_SIGNATURE); + break; case MRE_MIATA_NA6: setMiataNA6_VAF_MRE(PASS_CONFIG_PARAMETER_SIGNATURE); break; @@ -1066,6 +1068,7 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb case MRE_MIATA_NB2: setMiataNB2_MRE(PASS_CONFIG_PARAMETER_SIGNATURE); break; + case PROMETHEUS_DEFAULTS: case MINIMAL_PINS: // all basic settings are already set in prepareVoidConfiguration(), no need to set anything here break; @@ -1223,9 +1226,6 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb case MAZDA_MIATA_2003_BOARD_TEST: setMazdaMiata2003EngineConfigurationBoardTest(PASS_CONFIG_PARAMETER_SIGNATURE); break; - case PROMETHEUS_DEFAULTS: - setPrometheusDefaults(PASS_CONFIG_PARAMETER_SIGNATURE); - break; case SUBARUEJ20G_DEFAULTS: setSubaruEJ20GDefaults(PASS_CONFIG_PARAMETER_SIGNATURE); break; diff --git a/firmware/controllers/algo/lcd_menu_tree.h b/firmware/controllers/algo/lcd_menu_tree.h index 2a8e208ec0..ae2dc7285f 100644 --- a/firmware/controllers/algo/lcd_menu_tree.h +++ b/firmware/controllers/algo/lcd_menu_tree.h @@ -4,8 +4,8 @@ * @date Jan 6, 2015 * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef CONTROLLERS_ALGO_LCD_MENU_TREE_H_ -#define CONTROLLERS_ALGO_LCD_MENU_TREE_H_ + +#pragma once typedef enum { LL_STRING, @@ -73,7 +73,3 @@ public: MenuItem *current = nullptr; MenuItem *topVisible = nullptr; }; - - - -#endif /* CONTROLLERS_ALGO_LCD_MENU_TREE_H_ */ diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 9250c39f4b..b1b2ffc756 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef RUSEFI_ENUMS_H_ -#define RUSEFI_ENUMS_H_ +#pragma once #include "efifeatures.h" #include "obd_error_codes.h" @@ -131,7 +130,7 @@ typedef enum { LADA_KALINA = 39, - GEO_STORM = 40, + BMW_M73 = 40, // Frankenso board MIATA_NA6_MAP = 41, @@ -839,5 +838,3 @@ typedef enum { */ Force_4bytes_size_idle_state_e = ENUM_32_BITS, } idle_state_e; - -#endif /* RUSEFI_ENUMS_H_ */ diff --git a/firmware/controllers/flash_main.h b/firmware/controllers/flash_main.h index fcde19c9fa..7552df3d12 100644 --- a/firmware/controllers/flash_main.h +++ b/firmware/controllers/flash_main.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef FLASH_MAIN_H_ -#define FLASH_MAIN_H_ +#pragma once #include "engine.h" @@ -38,5 +37,3 @@ void setNeedToWriteConfiguration(void); */ bool getNeedToWriteConfiguration(void); void writeToFlashIfPending(void); - -#endif /* FLASH_MAIN_H_ */ diff --git a/firmware/controllers/injector_central.h b/firmware/controllers/injector_central.h index ce05e66694..de9cdc0c2c 100644 --- a/firmware/controllers/injector_central.h +++ b/firmware/controllers/injector_central.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef INJECTOR_CENTRAL_H_ -#define INJECTOR_CENTRAL_H_ +#pragma once #include "engine.h" @@ -21,5 +20,3 @@ void initInjectorCentral(Logging *sharedLogger); bool isRunningBenchTest(void); void executeTSCommand(uint16_t subsystem, uint16_t index); - -#endif /* INJECTOR_CENTRAL_H_ */ diff --git a/firmware/controllers/map_averaging.h b/firmware/controllers/map_averaging.h index 6df7c1125b..3069b4eb17 100644 --- a/firmware/controllers/map_averaging.h +++ b/firmware/controllers/map_averaging.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef ADC_AVERAGING_H_ -#define ADC_AVERAGING_H_ +#pragma once #include "engine.h" @@ -24,5 +23,3 @@ void postMapState(TunerStudioOutputChannels *tsOutputChannels); #endif #endif /* EFI_MAP_AVERAGING */ - -#endif /* ADC_AVERAGING_H_ */ diff --git a/hardware/DDPAK_breakout/known_issues.txt b/hardware/DDPAK_breakout/known_issues.txt index 063a62ed77..ccf5e02361 100644 --- a/hardware/DDPAK_breakout/known_issues.txt +++ b/hardware/DDPAK_breakout/known_issues.txt @@ -1,4 +1,5 @@ 1) RESOLVED IN R0.2 DPAK2 is apparently different than D2PAK, now it uses TO-263AB 2) RESOLVED IN R0.2 Make vias under large GND pad larger to allow more heat form iron during soldering 3) RESOLVED IN R0.2 move Via's to PCB edge to allow install on proto area of Frankenso -4) RESOLVED IN R0.2 add 4-40 mounting screw hole(s) \ No newline at end of file +4) RESOLVED IN R0.2 add 4-40 mounting screw hole(s) +5) signal wire hole to be a bit bigger - bottom-left on https://raw.githubusercontent.com/rusefi/rusefi/master/hardware/DDPAK_breakout/BTS2140.jpg \ No newline at end of file diff --git a/unit_tests/boards.h b/unit_tests/boards.h index 579840c2e7..f59bcf0add 100644 --- a/unit_tests/boards.h +++ b/unit_tests/boards.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef BOARDS_H_ -#define BOARDS_H_ +#pragma once #include "engine_configuration.h" #include "adc_math.h" @@ -14,5 +13,3 @@ #define ADC_CHANNEL_VREF 0 int getAdcValue(const char *msg, adc_channel_e channel); - -#endif /* BOARDS_H_ */ diff --git a/unit_tests/globalaccess.h b/unit_tests/globalaccess.h index b5e5d19ced..a5d45353dc 100644 --- a/unit_tests/globalaccess.h +++ b/unit_tests/globalaccess.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef GLOBALACCESS_H_ -#define GLOBALACCESS_H_ +#pragma once #define DECLARE_CONFIG_PARAMETER_SIGNATURE engine_configuration_s *engineConfiguration, persistent_config_s *config, board_configuration_s *boardConfiguration #define DECLARE_CONFIG_PARAMETER_SUFFIX , DECLARE_CONFIG_PARAMETER_SIGNATURE @@ -26,5 +25,3 @@ //#define CONFIGB(x) engine->engineConfigurationPtr->bc.x #define CONFIGB(x) CONFIG(bc.x) #define ENGINE(x) engine->x - -#endif /* GLOBALACCESS_H_ */