auto-sync
This commit is contained in:
parent
b695d36d28
commit
ae7820f863
|
@ -51,6 +51,8 @@ void setDodgeNeon1995EngineConfiguration(engine_configuration_s *engineConfigura
|
|||
|
||||
engineConfiguration->algorithm = LM_ALPHA_N;
|
||||
|
||||
engineConfiguration->hasIatSensor = false;
|
||||
|
||||
// set_rpm_hard_limit 4000
|
||||
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
|
||||
// set_cranking_rpm 550
|
||||
|
|
|
@ -44,6 +44,8 @@ class engine_configuration2_s {
|
|||
public:
|
||||
engine_configuration2_s();
|
||||
|
||||
engine_configuration_s *engineConfiguration;
|
||||
|
||||
Thermistor iat;
|
||||
Thermistor clt;
|
||||
|
||||
|
|
|
@ -240,8 +240,10 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
|||
|
||||
engineConfiguration->diffLoadEnrichmentCoef = 1;
|
||||
|
||||
engineConfiguration->hasMapSensor = TRUE;
|
||||
engineConfiguration->hasCltSensor = TRUE;
|
||||
engineConfiguration->hasMapSensor = true;
|
||||
engineConfiguration->hasAfrSensor = true;
|
||||
engineConfiguration->hasCltSensor = true;
|
||||
engineConfiguration->hasBaroSensor = false;
|
||||
|
||||
boardConfiguration->idleSolenoidFrequency = 200;
|
||||
// engineConfiguration->idleMode = IM_AUTO;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "sensor_types.h"
|
||||
#include "can_header.h"
|
||||
#include "rusefi_enums.h"
|
||||
#include "global.h"
|
||||
|
||||
#define MOCK_UNDEFINED -1
|
||||
|
||||
|
@ -422,7 +423,11 @@ typedef struct {
|
|||
|
||||
board_configuration_s bc;
|
||||
|
||||
int hasMapSensor;
|
||||
bool_t hasMapSensor : 1; // bit 0
|
||||
bool_t hasIatSensor : 1; // bit 1
|
||||
bool_t hasBaroSensor : 1; // bit 1
|
||||
bool_t hasAfrSensor : 1; // bit 2
|
||||
// that's the next 32 bit field
|
||||
int hasCltSensor;
|
||||
|
||||
idle_mode_e idleMode;
|
||||
|
|
|
@ -194,7 +194,6 @@ static void handleGpio(Engine *engine, int index) {
|
|||
|
||||
io_pin_e pin = (io_pin_e) ((int) GPIO_0 + index);
|
||||
|
||||
|
||||
int value = calc.getValue2(fuelPumpLogic, engine);
|
||||
if (value != getOutputPinValue(pin)) {
|
||||
// scheduleMsg(&logger, "setting %s %s", getIo_pin_e(pin), boolToString(value));
|
||||
|
@ -303,11 +302,15 @@ static void printAnalogChannelInfo(const char *name, adc_channel_e hwChannel) {
|
|||
static void printAnalogInfo(void) {
|
||||
printAnalogChannelInfo("TPS", engineConfiguration->tpsAdcChannel);
|
||||
printAnalogChannelInfo("CLT", engineConfiguration->cltAdcChannel);
|
||||
if (engineConfiguration->hasIatSensor) {
|
||||
printAnalogChannelInfo("IAT", engineConfiguration->iatAdcChannel);
|
||||
}
|
||||
printAnalogChannelInfo("MAF", engineConfiguration->mafAdcChannel);
|
||||
printAnalogChannelInfo("AFR", engineConfiguration->afrSensor.afrAdcChannel);
|
||||
printAnalogChannelInfo("MAP", engineConfiguration->map.sensor.hwChannel);
|
||||
if (engineConfiguration->hasBaroSensor) {
|
||||
printAnalogChannelInfo("BARO", engineConfiguration->baroSensor.hwChannel);
|
||||
}
|
||||
printAnalogChannelInfoExt("Vbatt", engineConfiguration->vbattAdcChannel, getVBatt());
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,9 @@ bool isValidIntakeAirTemperature(float temperature) {
|
|||
float getCoolantTemperature(engine_configuration2_s * engineConfiguration2) {
|
||||
float temperature = getTemperatureC(&engineConfiguration2->clt);
|
||||
if (!isValidCoolantTemperature(temperature)) {
|
||||
if (engineConfiguration2->engineConfiguration->hasCltSensor) {
|
||||
warning(OBD_PCM_Processor_Fault, "unrealistic CLT %f", temperature);
|
||||
}
|
||||
return LIMPING_MODE_CLT_TEMPERATURE;
|
||||
}
|
||||
return temperature;
|
||||
|
@ -155,7 +157,9 @@ void prepareThermistorCurve(ThermistorConf * config) {
|
|||
float getIntakeAirTemperature(engine_configuration2_s * engineConfiguration2) {
|
||||
float temperature = getTemperatureC(&engineConfiguration2->iat);
|
||||
if (!isValidIntakeAirTemperature(temperature)) {
|
||||
if (engineConfiguration2->engineConfiguration->hasIatSensor) {
|
||||
warning(OBD_PCM_Processor_Fault, "unrealistic IAT %f", temperature);
|
||||
}
|
||||
return LIMPING_MODE_IAT_TEMPERATURE;
|
||||
}
|
||||
return temperature;
|
||||
|
|
|
@ -143,7 +143,7 @@ void runRusEfi(void) {
|
|||
// that's dirty, this assignment should be nicer or in a better spot
|
||||
engine.engineConfiguration = engineConfiguration;
|
||||
engine.engineConfiguration2 = engineConfiguration2;
|
||||
|
||||
engineConfiguration2->engineConfiguration = engineConfiguration;
|
||||
|
||||
|
||||
initErrorHandling();
|
||||
|
|
Loading…
Reference in New Issue