More portability & bootloader fix (#720)
* fix bootloader * EFI_FSIO * EFI_EMULATE_POSITION_SENSORS, EFI_BOARD_TEST, EFI_AUX_PID, EFI_JOYSTICK
This commit is contained in:
parent
1238a16c63
commit
001fbb2526
|
@ -127,7 +127,7 @@ include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
|
|||
|
||||
include $(CONFIG)/boards/$(PROJECT_BOARD)/board.mk
|
||||
|
||||
include $(PROJECT_DIR)/hw_layer/$(CPU_HWLAYER)/hw_stm32.mk
|
||||
include $(PROJECT_DIR)/hw_layer/$(CPU_HWLAYER)/hw_ports.mk
|
||||
|
||||
# Define linker script file here
|
||||
ifeq ($(LDSCRIPT),)
|
||||
|
|
|
@ -229,6 +229,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
||||
|
||||
// VICS solenoid
|
||||
#if EFI_FSIO || defined(__DOXYGEN__)
|
||||
/**
|
||||
* to test
|
||||
* set_fsio_setting 1 5000
|
||||
|
@ -237,7 +238,6 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// set_fsio_expression 1 "rpm > fsio_setting(1)"
|
||||
setFsioExt(0, GPIOE_3, RPM_ABOVE_USER_SETTING_1, 150 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
|
||||
// warning light
|
||||
/**
|
||||
* to test
|
||||
|
@ -255,7 +255,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
// setFsio(1, GPIOC_13, "rpm 2 fsio_setting > coolant 3 fsio_setting > | vbatt 4 fsio_setting < |" PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
setFsio(1, GPIOD_7, RPM_ABOVE_USER_SETTING_2 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#endif /* EFI_FSIO */
|
||||
|
||||
config->ignitionRpmBins[0] = 800;
|
||||
config->ignitionRpmBins[1] = 1200;
|
||||
|
|
|
@ -50,6 +50,7 @@ void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
|
||||
// starter relay solenoid
|
||||
#if EFI_FSIO || defined(__DOXYGEN__)
|
||||
/**
|
||||
* to test
|
||||
* set_fsio_setting 1 5000
|
||||
|
@ -57,5 +58,5 @@ void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->bc.fsio_setting[0] = 500;
|
||||
// set_rpn_expression 1 "rpm 0 fsio_setting <"
|
||||
setFsioExt(0, GPIOE_3, RPM_BELOW_USER_SETTING_1, 0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#endif /* EFI_FSIO */
|
||||
}
|
||||
|
|
|
@ -231,8 +231,10 @@ void setMiataNA6_MAP_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
// set_fsio_expression 0 "((rpm > fsio_setting(4) & (fsio_analog_input < fsio_setting(5)) | rpm > fsio_setting(1) | (coolant > fsio_setting(2) > | (vbatt < fsio_setting(3)"
|
||||
|
||||
#if EFI_FSIO || defined(__DOXYGEN__)
|
||||
// todo: convert
|
||||
setFsio(0, GPIOC_13, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
#endif /* EFI_FSIO */
|
||||
|
||||
boardConfiguration->injectionPins[0] = GPIOD_3; // #1&3 pin 3U
|
||||
boardConfiguration->injectionPins[1] = GPIOE_2; // #2&4 pin 3V
|
||||
|
|
|
@ -90,7 +90,7 @@ void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#if EFI_FSIO || defined(__DOXYGEN__)
|
||||
setFsioExt(0, GPIOC_9, RPM_ABOVE_6000_SOLENOID_80_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
setFsioExt(1, GPIOC_7, RPM_ABOVE_2000_SOLENOID_50_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
#endif
|
||||
#endif /* EFI_FSIO */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -194,8 +194,9 @@ void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
onConfigurationChangeRpmEmulatorCallback(&activeConfiguration);
|
||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||
|
||||
#if EFI_FSIO || defined(__DOXYGEN__)
|
||||
onConfigurationChangeFsioCallback(&activeConfiguration PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#endif /* EFI_FSIO */
|
||||
rememberCurrentConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
||||
|
@ -1108,6 +1109,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
setBoardConfigurationOverrides();
|
||||
#endif
|
||||
|
||||
#if EFI_FSIO || defined(__DOXYGEN__)
|
||||
/**
|
||||
* to test:
|
||||
* set_fsio_setting 1 5000
|
||||
|
@ -1121,7 +1123,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// simple warning light as default configuration
|
||||
// set_fsio_expression 1 "rpm > fsio_setting(1)"
|
||||
setFsio(0, GPIO_UNASSIGNED, RPM_ABOVE_USER_SETTING_1 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#endif /* EFI_FSIO */
|
||||
}
|
||||
|
||||
void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
|
|
@ -1309,10 +1309,10 @@ static void setValue(const char *paramStr, const char *valueStr) {
|
|||
engineConfiguration->tpsMax = valueI;
|
||||
} else if (strEqualCaseInsensitive(paramStr, "tps_min")) {
|
||||
engineConfiguration->tpsMin = valueI;
|
||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
|
||||
} else if (strEqualCaseInsensitive(paramStr, "rpm")) {
|
||||
setTriggerEmulatorRPM(valueI);
|
||||
#endif /* ! EFI_UNIT_TEST */
|
||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||
} else if (strEqualCaseInsensitive(paramStr, "vvt_offset")) {
|
||||
engineConfiguration->vvtOffset = valueF;
|
||||
} else if (strEqualCaseInsensitive(paramStr, "vvt_mode")) {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#if EFI_BOARD_TEST
|
||||
#if EFI_BOARD_TEST || defined(__DOXYGEN__)
|
||||
#include "engine.h"
|
||||
#include "board_test.h"
|
||||
#include "pin_repository.h"
|
||||
|
|
|
@ -278,7 +278,9 @@ void applyNewHardwareSettings(void) {
|
|||
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
|
||||
stopVSSPins();
|
||||
#endif /* EFI_VEHICLE_SPEED */
|
||||
#if EFI_AUX_PID || defined(__DOXYGEN__)
|
||||
stopAuxPins();
|
||||
#endif /* EFI_AUX_PID */
|
||||
|
||||
if (engineConfiguration->bc.is_enabled_spi_1 != activeConfiguration.bc.is_enabled_spi_1)
|
||||
stopSpi(SPI_DEVICE_1);
|
||||
|
@ -316,7 +318,9 @@ void applyNewHardwareSettings(void) {
|
|||
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
|
||||
startVSSPins();
|
||||
#endif /* EFI_VEHICLE_SPEED */
|
||||
#if EFI_AUX_PID || defined(__DOXYGEN__)
|
||||
startAuxPins();
|
||||
#endif /* EFI_AUX_PID */
|
||||
|
||||
adcConfigListener(engine);
|
||||
}
|
||||
|
@ -419,10 +423,12 @@ void initHardware(Logging *l) {
|
|||
initAdcInputs(isBoardTestMode_b);
|
||||
#endif
|
||||
|
||||
#if EFI_BOARD_TEST || defined(__DOXYGEN__)
|
||||
if (isBoardTestMode_b) {
|
||||
// this method never returns
|
||||
initBoardTest();
|
||||
}
|
||||
#endif /* EFI_BOARD_TEST */
|
||||
|
||||
initRtc();
|
||||
|
||||
|
@ -513,9 +519,9 @@ void initHardware(Logging *l) {
|
|||
cdmIonInit();
|
||||
#endif
|
||||
|
||||
#if (HAL_USE_PAL && EFI_PROD_CODE) || defined(__DOXYGEN__)
|
||||
#if (HAL_USE_PAL && EFI_JOYSTICK) || defined(__DOXYGEN__)
|
||||
initJoystick(sharedLogger);
|
||||
#endif /* HAL_USE_PAL && EFI_PROD_CODE */
|
||||
#endif /* HAL_USE_PAL && EFI_JOYSTICK */
|
||||
|
||||
calcFastAdcIndexes();
|
||||
|
||||
|
|
|
@ -168,12 +168,12 @@ static int getParameterCount(action_type_e parameterType) {
|
|||
* @brief This function prints out a list of all available commands
|
||||
*/
|
||||
void helpCommand(void) {
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
#if EFI_BOARD_TEST || defined(__DOXYGEN__)
|
||||
if (isBoardTestMode()) {
|
||||
printBoardTestState();
|
||||
return;
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
#endif /* EFI_BOARD_TEST */
|
||||
|
||||
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
||||
scheduleMsg(logging, "%d actions available", consoleActionCount);
|
||||
|
|
Loading…
Reference in New Issue