FATAL error loading TS project

fix #736
This commit is contained in:
rusefi 2019-04-09 22:15:55 -04:00
parent f6d2f47bd1
commit 57ac71a814
4 changed files with 17 additions and 11 deletions

View File

@ -809,5 +809,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0) if (initBootloader() != 0)
return 123; return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */ #endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20190408; return 20190409;
} }

View File

@ -260,12 +260,12 @@ void stopSpi(spi_device_e device) {
} }
void applyNewHardwareSettings(void) { void applyNewHardwareSettings(void) {
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
applyNewTriggerInputPins();
#endif /* EFI_SHAFT_POSITION_INPUT */
// all 'stop' methods need to go before we begin starting pins // all 'stop' methods need to go before we begin starting pins
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
stopTriggerInputPins();
#endif /* EFI_SHAFT_POSITION_INPUT */
enginePins.stopInjectionPins(); enginePins.stopInjectionPins();
enginePins.stopIgnitionPins(); enginePins.stopIgnitionPins();
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__) #if EFI_CAN_SUPPORT || defined(__DOXYGEN__)
@ -293,8 +293,6 @@ void applyNewHardwareSettings(void) {
if (engineConfiguration->bc.is_enabled_spi_3 != activeConfiguration.bc.is_enabled_spi_3) if (engineConfiguration->bc.is_enabled_spi_3 != activeConfiguration.bc.is_enabled_spi_3)
stopSpi(SPI_DEVICE_3); stopSpi(SPI_DEVICE_3);
unregisterPin(engineConfiguration->bc.HD44780_rs, activeConfiguration.bc.HD44780_rs); unregisterPin(engineConfiguration->bc.HD44780_rs, activeConfiguration.bc.HD44780_rs);
unregisterPin(engineConfiguration->bc.HD44780_e, activeConfiguration.bc.HD44780_e); unregisterPin(engineConfiguration->bc.HD44780_e, activeConfiguration.bc.HD44780_e);
unregisterPin(engineConfiguration->bc.HD44780_db4, activeConfiguration.bc.HD44780_db4); unregisterPin(engineConfiguration->bc.HD44780_db4, activeConfiguration.bc.HD44780_db4);
@ -306,6 +304,9 @@ void applyNewHardwareSettings(void) {
enginePins.unregisterPins(); enginePins.unregisterPins();
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
startTriggerInputPins();
#endif /* EFI_SHAFT_POSITION_INPUT */
enginePins.startInjectionPins(); enginePins.startInjectionPins();
enginePins.startIgnitionPins(); enginePins.startIgnitionPins();

View File

@ -13,5 +13,7 @@
void turnOnTriggerInputPins(Logging *sharedLogger); void turnOnTriggerInputPins(Logging *sharedLogger);
void applyNewTriggerInputPins(void); void applyNewTriggerInputPins(void);
void startTriggerInputPins(void);
void stopTriggerInputPins(void);
#endif /* CRANK_INPUT_H_ */ #endif /* CRANK_INPUT_H_ */

View File

@ -173,11 +173,7 @@ void stopTriggerInputPins(void) {
} }
} }
void applyNewTriggerInputPins(void) { void startTriggerInputPins(void) {
// first we will turn off all the changed pins
stopTriggerInputPins();
// then we will enable all the changed pins
for (int i = 0; i < TRIGGER_SUPPORTED_CHANNELS; i++) { for (int i = 0; i < TRIGGER_SUPPORTED_CHANNELS; i++) {
if (CONFIGB(triggerInputPins)[i] if (CONFIGB(triggerInputPins)[i]
!= activeConfiguration.bc.triggerInputPins[i]) { != activeConfiguration.bc.triggerInputPins[i]) {
@ -193,4 +189,11 @@ void applyNewTriggerInputPins(void) {
rememberPrimaryChannel(); rememberPrimaryChannel();
} }
void applyNewTriggerInputPins(void) {
// first we will turn off all the changed pins
stopTriggerInputPins();
// then we will enable all the changed pins
startTriggerInputPins();
}
#endif /* EFI_SHAFT_POSITION_INPUT && HAL_USE_ICU */ #endif /* EFI_SHAFT_POSITION_INPUT && HAL_USE_ICU */