PROTEUS_QC_TEST_BOARD
This commit is contained in:
parent
88105f0805
commit
af6ad0757e
|
@ -4,6 +4,8 @@ export PROJECT_BOARD=proteus
|
|||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS="-DVR_HW_CHECK_MODE=TRUE -DSHORT_BOARD_NAME=proteus_f4"
|
||||
|
||||
export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
|
||||
|
||||
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g3"
|
||||
|
||||
bash ../common_make.sh
|
||||
|
|
|
@ -70,19 +70,12 @@
|
|||
|
||||
#include "bmw_m73.h"
|
||||
#include "custom_engine.h"
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||
#include "electronic_throttle.h"
|
||||
#endif
|
||||
|
||||
EXTERN_CONFIG;
|
||||
|
||||
static const float hardCodedetbHitachiBiasBins[8] = {0.0, 19.0, 21.0, 22.0, 23.0, 25.0, 30.0, 100.0};
|
||||
|
||||
static const float hardCodedetbHitachiBiasValues[8] = {-18.0, -17.0, -15.0, 0.0, 16.0, 20.0, 20.0, 20.0};
|
||||
|
||||
/* Generated by TS2C on Thu Aug 20 21:10:02 EDT 2020*/
|
||||
static void setHitachiEtbBiasBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
MEMCPY(engineConfiguration->etbBiasBins, hardCodedetbHitachiBiasBins);
|
||||
MEMCPY(engineConfiguration->etbBiasValues, hardCodedetbHitachiBiasValues);
|
||||
}
|
||||
|
||||
void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
// 13641435991 injector
|
||||
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
|
||||
|
@ -232,14 +225,6 @@ GPIOA_6
|
|||
engineConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
||||
static void toyota89281_33010_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
engineConfiguration->throttlePedalUpVoltage = 0;
|
||||
engineConfiguration->throttlePedalWOTVoltage = 4.1;
|
||||
engineConfiguration->throttlePedalSecondaryUpVoltage = 0.73;
|
||||
engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.9;
|
||||
}
|
||||
|
||||
/**
|
||||
* set engine_type 63
|
||||
*
|
||||
|
@ -312,38 +297,8 @@ void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
CONFIG(startStopButtonPin) = GPIOE_12;
|
||||
CONFIG(startStopButtonMode) = PI_PULLUP;
|
||||
|
||||
|
||||
// EFI_ADC_12: "Analog Volt 3"
|
||||
engineConfiguration->tps1_2AdcChannel = EFI_ADC_12;
|
||||
// EFI_ADC_13: "Analog Volt 4"
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_13;
|
||||
// EFI_ADC_0: "Analog Volt 5"
|
||||
engineConfiguration->tps2_2AdcChannel = EFI_ADC_0;
|
||||
// EFI_ADC_1: "Analog Volt 6"
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_1;
|
||||
toyota89281_33010_pedal_position_sensor(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
// EFI_ADC_2: "Analog Volt 7"
|
||||
engineConfiguration->throttlePedalPositionSecondAdcChannel = EFI_ADC_2;
|
||||
|
||||
|
||||
setHitachiEtbBiasBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
engineConfiguration->etb.pFactor = 2.7999;
|
||||
engineConfiguration->etb.iFactor = 25.5;
|
||||
engineConfiguration->etb.dFactor = 0.053;
|
||||
engineConfiguration->etb.offset = 0.0;
|
||||
engineConfiguration->etb.periodMs = 5.0;
|
||||
engineConfiguration->etb.minValue = -100.0;
|
||||
engineConfiguration->etb.maxValue = 100.0;
|
||||
|
||||
setProteusHitachiEtbDefaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
CONFIG(useETBforIdleControl) = true;
|
||||
|
||||
// Nissan 60mm throttle
|
||||
CONFIG(tpsMin) = CONFIG(tps2Min) = 113;
|
||||
CONFIG(tpsMax) = CONFIG(tps2Max) = 846;
|
||||
CONFIG(tps1SecondaryMin) = CONFIG(tps2SecondaryMin) = 897;
|
||||
CONFIG(tps1SecondaryMax) = CONFIG(tps2SecondaryMax) = 161;
|
||||
}
|
||||
#endif // HW_PROTEUS
|
||||
|
|
|
@ -509,6 +509,15 @@ void mreBoardOldTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
#endif /* BOARD_TLE8888_COUNT */
|
||||
}
|
||||
|
||||
#if HW_PROTEUS
|
||||
void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
engineConfiguration->specs.cylindersCount = 12;
|
||||
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6_7_8_9_10_11_12;
|
||||
|
||||
setProteusHitachiEtbDefaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
}
|
||||
#endif // HW_PROTEUS
|
||||
|
||||
void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
|
|
|
@ -23,5 +23,7 @@ void mreBoardOldTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
|||
void mreBoardNewTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
void setTest33816EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setBoschHDEV_5_injectors(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
|
|
@ -101,6 +101,17 @@ static bool startupPositionError = false;
|
|||
|
||||
#define STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD 5
|
||||
|
||||
static const float hardCodedetbHitachiBiasBins[8] = {0.0, 19.0, 21.0, 22.0, 23.0, 25.0, 30.0, 100.0};
|
||||
|
||||
static const float hardCodedetbHitachiBiasValues[8] = {-18.0, -17.0, -15.0, 0.0, 16.0, 20.0, 20.0, 20.0};
|
||||
|
||||
/* Generated by TS2C on Thu Aug 20 21:10:02 EDT 2020*/
|
||||
void setHitachiEtbBiasBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
MEMCPY(engineConfiguration->etbBiasBins, hardCodedetbHitachiBiasBins);
|
||||
MEMCPY(engineConfiguration->etbBiasValues, hardCodedetbHitachiBiasValues);
|
||||
}
|
||||
|
||||
|
||||
static SensorType functionToPositionSensor(etb_function_e func) {
|
||||
switch(func) {
|
||||
case ETB_Throttle1: return SensorType::Tps1;
|
||||
|
@ -951,4 +962,42 @@ void setEtbWastegatePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
}
|
||||
}
|
||||
|
||||
static void toyota89281_33010_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
engineConfiguration->throttlePedalUpVoltage = 0;
|
||||
engineConfiguration->throttlePedalWOTVoltage = 4.1;
|
||||
engineConfiguration->throttlePedalSecondaryUpVoltage = 0.73;
|
||||
engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.9;
|
||||
}
|
||||
|
||||
void setProteusHitachiEtbDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
// EFI_ADC_12: "Analog Volt 3"
|
||||
engineConfiguration->tps1_2AdcChannel = EFI_ADC_12;
|
||||
// EFI_ADC_13: "Analog Volt 4"
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_13;
|
||||
// EFI_ADC_0: "Analog Volt 5"
|
||||
engineConfiguration->tps2_2AdcChannel = EFI_ADC_0;
|
||||
// EFI_ADC_1: "Analog Volt 6"
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_1;
|
||||
toyota89281_33010_pedal_position_sensor(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
// EFI_ADC_2: "Analog Volt 7"
|
||||
engineConfiguration->throttlePedalPositionSecondAdcChannel = EFI_ADC_2;
|
||||
|
||||
setHitachiEtbBiasBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
engineConfiguration->etb.pFactor = 2.7999;
|
||||
engineConfiguration->etb.iFactor = 25.5;
|
||||
engineConfiguration->etb.dFactor = 0.053;
|
||||
engineConfiguration->etb.offset = 0.0;
|
||||
engineConfiguration->etb.periodMs = 5.0;
|
||||
engineConfiguration->etb.minValue = -100.0;
|
||||
engineConfiguration->etb.maxValue = 100.0;
|
||||
|
||||
// Nissan 60mm throttle
|
||||
CONFIG(tpsMin) = CONFIG(tps2Min) = 113;
|
||||
CONFIG(tpsMax) = CONFIG(tps2Max) = 846;
|
||||
CONFIG(tps1SecondaryMin) = CONFIG(tps2SecondaryMin) = 897;
|
||||
CONFIG(tps1SecondaryMax) = CONFIG(tps2SecondaryMax) = 161;
|
||||
}
|
||||
|
||||
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
||||
|
|
|
@ -27,6 +27,7 @@ void setEtbOffset(int value);
|
|||
void setThrottleDutyCycle(percent_t level);
|
||||
void onConfigurationChangeElectronicThrottleCallback(engine_configuration_s *previousConfiguration);
|
||||
void unregisterEtbPins();
|
||||
void setProteusHitachiEtbDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
void etbAutocal(size_t throttleIndex);
|
||||
|
||||
|
|
Loading…
Reference in New Issue