ETB
This commit is contained in:
parent
7719561433
commit
fb3d06aebf
|
@ -20,6 +20,7 @@
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
#include "can_hw.h"
|
#include "can_hw.h"
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
|
#include "electronic_throttle.h"
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
@ -261,9 +262,22 @@ void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
boardConfiguration->ignitionPins[0] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[0] = GPIO_UNASSIGNED;
|
||||||
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||||
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
/**
|
||||||
|
* remember that some H-bridges require 5v control lines, not just 3v logic outputs we have on stm32
|
||||||
|
*/
|
||||||
|
|
||||||
|
CONFIGB(etbControlPin1) = GPIOE_14;
|
||||||
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
|
setDefaultEtbParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
engineConfiguration->tpsAdcChannel = EFI_ADC_2; // PA2
|
||||||
|
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_9; // PB1
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_CPP_ */
|
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_CPP_ */
|
||||||
|
|
|
@ -249,12 +249,13 @@ void setEtbOffset(int value) {
|
||||||
showEthInfo();
|
showEthInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDefaultEtbParameters(void) {
|
void setDefaultEtbParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->throttlePedalUpVoltage = 0; // that's voltage, not ADC like with TPS
|
engineConfiguration->throttlePedalUpVoltage = 0; // that's voltage, not ADC like with TPS
|
||||||
engineConfiguration->throttlePedalWOTVoltage = 6; // that's voltage, not ADC like with TPS
|
engineConfiguration->throttlePedalWOTVoltage = 6; // that's voltage, not ADC like with TPS
|
||||||
|
|
||||||
engineConfiguration->etb.pFactor = 1;
|
engineConfiguration->etb.pFactor = 1;
|
||||||
engineConfiguration->etb.iFactor = 0.5;
|
engineConfiguration->etb.iFactor = 0.05;
|
||||||
|
engineConfiguration->etb.dFactor = 0.0;
|
||||||
engineConfiguration->etb.periodMs = 100;
|
engineConfiguration->etb.periodMs = 100;
|
||||||
engineConfiguration->etbFreq = 300;
|
engineConfiguration->etbFreq = 300;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue