auto-sync
This commit is contained in:
parent
6b073eb78e
commit
f3fbaab188
|
@ -526,7 +526,7 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
||||||
boardConfiguration->hip9011Gain = 1;
|
boardConfiguration->hip9011Gain = 1;
|
||||||
|
|
||||||
boardConfiguration->isSdCardEnabled = true;
|
boardConfiguration->isSdCardEnabled = true;
|
||||||
boardConfiguration->isFastAdcEnabled = false;
|
boardConfiguration->isFastAdcEnabled = true;
|
||||||
boardConfiguration->isEngineControlEnabled = true;
|
boardConfiguration->isEngineControlEnabled = true;
|
||||||
|
|
||||||
boardConfiguration->tunerStudioSerialSpeed = TS_DEFAULT_SPEED;
|
boardConfiguration->tunerStudioSerialSpeed = TS_DEFAULT_SPEED;
|
||||||
|
|
|
@ -97,12 +97,16 @@ static float getPrimatyRawTPS(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
|
|
||||||
// todo: static float getSecondaryRawTPS
|
// todo: static float getSecondaryRawTPS
|
||||||
|
|
||||||
|
#define NO_TPS_MAGIC_VALUE 66.6
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In case of dual TPS this function would return logical TPS position
|
* In case of dual TPS this function would return logical TPS position
|
||||||
*
|
*
|
||||||
* @return Current TPS position, percent of WOT. 0 means idle and 100 means Wide Open Throttle
|
* @return Current TPS position, percent of WOT. 0 means idle and 100 means Wide Open Throttle
|
||||||
*/
|
*/
|
||||||
float getTPS(DECLARE_ENGINE_PARAMETER_F) {
|
float getTPS(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
|
if(!engineConfiguration->hasTpsSensor)
|
||||||
|
return NO_TPS_MAGIC_VALUE;
|
||||||
// todo: if (config->isDualTps)
|
// todo: if (config->isDualTps)
|
||||||
// todo: blah blah
|
// todo: blah blah
|
||||||
// todo: if two TPS do not match - show OBD code via malfunction_central.c
|
// todo: if two TPS do not match - show OBD code via malfunction_central.c
|
||||||
|
|
|
@ -384,6 +384,11 @@ static void printMAPInfo(void) {
|
||||||
|
|
||||||
static void printTPSInfo(void) {
|
static void printTPSInfo(void) {
|
||||||
#if (EFI_PROD_CODE && HAL_USE_ADC) || defined(__DOXYGEN__)
|
#if (EFI_PROD_CODE && HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
if(!engineConfiguration->hasTpsSensor) {
|
||||||
|
scheduleMsg(&logger, "NO TPS SENSOR");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GPIO_TypeDef* port = getAdcChannelPort(engineConfiguration->tpsAdcChannel);
|
GPIO_TypeDef* port = getAdcChannelPort(engineConfiguration->tpsAdcChannel);
|
||||||
int pin = getAdcChannelPin(engineConfiguration->tpsAdcChannel);
|
int pin = getAdcChannelPin(engineConfiguration->tpsAdcChannel);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue