auto-sync

This commit is contained in:
rusEfi 2016-12-17 12:03:02 -05:00
parent 6bfd64cb5d
commit 8fe71598d8
8 changed files with 19 additions and 5 deletions

View File

@ -209,7 +209,7 @@ static void printSensors(Logging *log, bool fileFormat) {
} }
#endif /* EFI_ANALOG_SENSORS */ #endif /* EFI_ANALOG_SENSORS */
if (hasAftSensor(PASS_ENGINE_PARAMETER_F)) { if (hasAfrSensor(PASS_ENGINE_PARAMETER_F)) {
reportSensorF(log, fileFormat, "afr", "AFR", getAfr(PASS_ENGINE_PARAMETER_F), 2); reportSensorF(log, fileFormat, "afr", "AFR", getAfr(PASS_ENGINE_PARAMETER_F), 2);
} }

View File

@ -144,7 +144,7 @@ typedef enum {
//P0118 Engine Coolant Temperature Circuit High Input //P0118 Engine Coolant Temperature Circuit High Input
//P0119 Engine Coolant Temperature Circuit Intermittent //P0119 Engine Coolant Temperature Circuit Intermittent
OBD_Throttle_Position_Sensor_Circuit_Malfunction = 120, OBD_Throttle_Position_Sensor_Circuit_Malfunction = 120,
//P0121 Throttle Position Sensor/Switch A Circuit Range/Performance Problem OBD_Throttle_Position_Sensor_Range_Performance_Problem = 121,
//P0122 Throttle Position Sensor/Switch A Circuit Low Input //P0122 Throttle Position Sensor/Switch A Circuit Low Input
//P0123 Throttle Position Sensor/Switch A Circuit High Input //P0123 Throttle Position Sensor/Switch A Circuit High Input
//P0124 Throttle Position Sensor/Switch A Circuit Intermittent //P0124 Throttle Position Sensor/Switch A Circuit Intermittent

View File

@ -50,6 +50,8 @@ typedef enum {
LE_METHOD_SELF = 114, LE_METHOD_SELF = 114,
LE_METHOD_MAP = 115, LE_METHOD_MAP = 115,
LE_METHOD_FSIO_ANALOG_INPUT = 116, LE_METHOD_FSIO_ANALOG_INPUT = 116,
LE_METHOD_INTAKE_VVT = 117,
LE_METHOD_EXHAUST_VVT = 118,
Force_4b_le_action = ENUM_32_BITS, Force_4b_le_action = ENUM_32_BITS,

View File

@ -41,6 +41,8 @@ static LENameOrdinalPair leFsioSetting(LE_METHOD_FSIO_SETTING, "fsio_setting");
static LENameOrdinalPair leFsioTable(LE_METHOD_FSIO_TABLE, "fsio_table"); static LENameOrdinalPair leFsioTable(LE_METHOD_FSIO_TABLE, "fsio_table");
static LENameOrdinalPair leFsioAnalogInput(LE_METHOD_FSIO_ANALOG_INPUT, "fsio_input"); static LENameOrdinalPair leFsioAnalogInput(LE_METHOD_FSIO_ANALOG_INPUT, "fsio_input");
static LENameOrdinalPair leKnock(LE_METHOD_KNOCK, "knock"); static LENameOrdinalPair leKnock(LE_METHOD_KNOCK, "knock");
static LENameOrdinalPair leIntakeVVT(LE_METHOD_INTAKE_VVT, "ivvt");
static LENameOrdinalPair leExhaustVVT(LE_METHOD_EXHAUST_VVT, "evvt");
#define LE_EVAL_POOL_SIZE 32 #define LE_EVAL_POOL_SIZE 32
@ -89,6 +91,9 @@ float getLEValue(Engine *engine, calc_stack_t *s, le_action_e action) {
return getMaf(PASS_ENGINE_PARAMETER_F); return getMaf(PASS_ENGINE_PARAMETER_F);
case LE_METHOD_MAP: case LE_METHOD_MAP:
return getMap(); return getMap();
case LE_METHOD_INTAKE_VVT:
case LE_METHOD_EXHAUST_VVT:
return engine->triggerCentral.vvtPosition;
case LE_METHOD_TIME_SINCE_BOOT: case LE_METHOD_TIME_SINCE_BOOT:
return getTimeNowSeconds(); return getTimeNowSeconds();
case LE_METHOD_FAN_OFF_SETTING: case LE_METHOD_FAN_OFF_SETTING:

View File

@ -8,7 +8,7 @@
EXTERN_ENGINE; EXTERN_ENGINE;
bool hasAftSensor(DECLARE_ENGINE_PARAMETER_F) { bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_F) {
return engineConfiguration->afr.hwChannel != EFI_ADC_NONE; return engineConfiguration->afr.hwChannel != EFI_ADC_NONE;
} }

View File

@ -15,7 +15,7 @@
#include "engine_configuration.h" #include "engine_configuration.h"
float getAfr(DECLARE_ENGINE_PARAMETER_F); float getAfr(DECLARE_ENGINE_PARAMETER_F);
bool hasAftSensor(DECLARE_ENGINE_PARAMETER_F); bool hasAfrSensor(DECLARE_ENGINE_PARAMETER_F);
void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_S); void setEgoSensor(ego_sensor_e type DECLARE_ENGINE_PARAMETER_S);
#endif #endif

View File

@ -63,6 +63,13 @@ percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_S) {
return NAN; return NAN;
} }
float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 100, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 0, adc); float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 100, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 0, adc);
if (result < engineConfiguration->tpsErrorDetectionTooLow) {
warning(OBD_Throttle_Position_Sensor_Circuit_Malfunction, "TPS too low: %f", result);
}
if (result > engineConfiguration->tpsErrorDetectionTooHigh) {
warning(OBD_Throttle_Position_Sensor_Range_Performance_Problem, "TPS too high: %f", result);
}
// this would put the value into the 0-100 range // this would put the value into the 0-100 range
return maxF(0, minF(100, result)); return maxF(0, minF(100, result));
} }

View File

@ -281,7 +281,7 @@ void firmwareError(obd_code_e code, const char *errorMsg, ...) {
} }
} }
static char UNUSED_RAM_SIZE[1200]; static char UNUSED_RAM_SIZE[1100];
static char UNUSED_CCM_SIZE[26500] CCM_OPTIONAL; static char UNUSED_CCM_SIZE[26500] CCM_OPTIONAL;