auto-sync

This commit is contained in:
rusEfi 2015-05-03 18:11:54 -04:00
parent f627ff824a
commit 91e6e9c808
13 changed files with 40 additions and 24 deletions

View File

@ -19,6 +19,9 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_F) {
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_DODGE_RAM; engineConfiguration->trigger.type = TT_DODGE_RAM;
// set_cranking_charge_angle 30
engineConfiguration->crankingChargeAngle = 30;
//Base engine setting //Base engine setting
engineConfiguration->specs.cylindersCount = 8; engineConfiguration->specs.cylindersCount = 8;
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2; engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;

View File

@ -156,7 +156,7 @@ static void printSensors(Logging *log, bool fileFormat) {
reportSensorF(log, fileFormat, "TRG_1_DUTY", "%", getTriggerDutyCycle(1), 2); reportSensorF(log, fileFormat, "TRG_1_DUTY", "%", getTriggerDutyCycle(1), 2);
#endif #endif
if (engineConfiguration->hasMafSensor) { if (hasMafSensor()) {
reportSensorF(log, fileFormat, "maf", "V", getMaf(), 2); reportSensorF(log, fileFormat, "maf", "V", getMaf(), 2);
reportSensorF(log, fileFormat, "mafr", "kg/hr", getRealMaf(), 2); reportSensorF(log, fileFormat, "mafr", "kg/hr", getRealMaf(), 2);
} }

View File

@ -1,4 +1,4 @@
// this section was generated by config_definition.jar on Sat Apr 25 21:03:34 EDT 2015 // this section was generated by config_definition.jar on Sun May 03 17:39:30 EDT 2015
// begin // begin
#include "rusefi_types.h" #include "rusefi_types.h"
typedef struct { typedef struct {
@ -612,7 +612,7 @@ typedef struct {
/** /**
* offset 792 * offset 792
*/ */
brain_pin_e vehicleSpeedSensorInputPin; brain_input_pin_e vehicleSpeedSensorInputPin;
/** /**
* Some vehicles have a switch to indicate that clutch pedal is all the way up * Some vehicles have a switch to indicate that clutch pedal is all the way up
* offset 796 * offset 796
@ -1290,4 +1290,4 @@ typedef struct {
} persistent_config_s; } persistent_config_s;
// end // end
// this section was generated by config_definition.jar on Sat Apr 25 21:03:34 EDT 2015 // this section was generated by config_definition.jar on Sun May 03 17:39:30 EDT 2015

View File

@ -323,7 +323,7 @@ static void printAnalogInfo(void) {
if (engineConfiguration->hasIatSensor) { if (engineConfiguration->hasIatSensor) {
printAnalogChannelInfo("IAT", engineConfiguration->iatAdcChannel); printAnalogChannelInfo("IAT", engineConfiguration->iatAdcChannel);
} }
if (engineConfiguration->hasMafSensor) { if (hasMafSensor()) {
printAnalogChannelInfo("MAF", engineConfiguration->mafAdcChannel); printAnalogChannelInfo("MAF", engineConfiguration->mafAdcChannel);
} }
printAnalogChannelInfo("AFR", engineConfiguration->afr.hwChannel); printAnalogChannelInfo("AFR", engineConfiguration->afr.hwChannel);

View File

@ -254,14 +254,14 @@ static void showLine(lcd_line_e line, int screenY) {
} }
return; return;
case LL_MAF_V: case LL_MAF_V:
if (engineConfiguration->hasMafSensor) { if (hasMafSensor()) {
lcdPrintf("MAF: %fv", getMaf()); lcdPrintf("MAF: %fv", getMaf());
} else { } else {
lcdPrintf("MAF: none"); lcdPrintf("MAF: none");
} }
return; return;
case LL_MAF_KG_HR: case LL_MAF_KG_HR:
if (engineConfiguration->hasMafSensor) { if (hasMafSensor()) {
lcdPrintf("MAF: %f kg/hr", getRealMaf()); lcdPrintf("MAF: %f kg/hr", getRealMaf());
} else { } else {
lcdPrintf("MAF: none"); lcdPrintf("MAF: none");

View File

@ -13,6 +13,10 @@ float getMaf(DECLARE_ENGINE_PARAMETER_F) {
return getMafT(engineConfiguration); return getMafT(engineConfiguration);
} }
bool_t hasMafSensor(DECLARE_ENGINE_PARAMETER_F) {
return engineConfiguration->hasMafSensor && engineConfiguration->mafAdcChannel != EFI_ADC_NONE;
}
/** /**
* @return kg/hour value * @return kg/hour value
*/ */

View File

@ -16,6 +16,7 @@
#define getMafT(ec) (getVoltageDivided("maf", ec->mafAdcChannel)) #define getMafT(ec) (getVoltageDivided("maf", ec->mafAdcChannel))
float getMaf(void); float getMaf(void);
bool_t hasMafSensor(DECLARE_ENGINE_PARAMETER_F);
float getRealMaf(DECLARE_ENGINE_PARAMETER_F); float getRealMaf(DECLARE_ENGINE_PARAMETER_F);
void setBosch0280218037(persistent_config_s *engineConfiguration); void setBosch0280218037(persistent_config_s *engineConfiguration);

View File

@ -15,11 +15,11 @@ void initDodgeRam(TriggerShape *s) {
s->isSynchronizationNeeded = false; s->isSynchronizationNeeded = false;
addSkippedToothTriggerEvents(T_SECONDARY, s, 8, 0, 0.9, -1, 360, 0, 720); addSkippedToothTriggerEvents(T_SECONDARY, s, 8, 0, 0.06, -25, 360, 0, 720);
s->addEvent(360, T_PRIMARY, TV_HIGH); s->addEvent(360, T_PRIMARY, TV_HIGH);
addSkippedToothTriggerEvents(T_SECONDARY, s, 8, 0, 0.9, 360 - 1, 360, 0, 720); addSkippedToothTriggerEvents(T_SECONDARY, s, 8, 0, 0.06, 360 - 25, 360, 0, 720);
s->addEvent(720, T_PRIMARY, TV_LOW); s->addEvent(720, T_PRIMARY, TV_LOW);
} }

View File

@ -244,13 +244,13 @@ void addSkippedToothTriggerEvents(trigger_wheel_e wheel, TriggerShape *s,
efiAssertVoid(skippedCount >= 0, "skipped count"); efiAssertVoid(skippedCount >= 0, "skipped count");
for (int i = 0; i < totalTeethCount - skippedCount - 1; i++) { for (int i = 0; i < totalTeethCount - skippedCount - 1; i++) {
float angleDown = engineCycle / totalTeethCount * (i + toothWidth); float angleDown = engineCycle / totalTeethCount * (i + (1 - toothWidth));
float angleUp = engineCycle / totalTeethCount * (i + 1); float angleUp = engineCycle / totalTeethCount * (i + 1);
s->addEvent(offset + angleDown, wheel, TV_HIGH, filterLeft, filterRight); s->addEvent(offset + angleDown, wheel, TV_HIGH, filterLeft, filterRight);
s->addEvent(offset + angleUp, wheel, TV_LOW, filterLeft, filterRight); s->addEvent(offset + angleUp, wheel, TV_LOW, filterLeft, filterRight);
} }
float angleDown = engineCycle / totalTeethCount * (totalTeethCount - skippedCount - 1 + toothWidth); float angleDown = engineCycle / totalTeethCount * (totalTeethCount - skippedCount - 1 + (1 - toothWidth) );
s->addEvent(offset + angleDown, wheel, TV_HIGH, filterLeft, filterRight); s->addEvent(offset + angleDown, wheel, TV_HIGH, filterLeft, filterRight);
s->addEvent(offset + engineCycle, wheel, TV_LOW, filterLeft, filterRight); s->addEvent(offset + engineCycle, wheel, TV_LOW, filterLeft, filterRight);
} }

View File

@ -173,7 +173,7 @@ float fanOnTemperature;Cooling fan turn-on temperature threshold, in Celsuis;"*C
float fanOffTemperature;Cooling fan turn-off temperature threshold, in Celsuis;"*C", 1, 0, 0, 1000.0, 2 float fanOffTemperature;Cooling fan turn-off temperature threshold, in Celsuis;"*C", 1, 0, 0, 1000.0, 2
int ususedBla; int ususedBla;
float vehicleSpeedCoef;This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h float vehicleSpeedCoef;This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2
custom can_nbc_e 4 bits, U32, @OFFSET@, [0:1], "BMW", "FIAT", "VAG" , "INVALID" custom can_nbc_e 4 bits, U32, @OFFSET@, [0:1], "BMW", "FIAT", "VAG" , "INVALID"
can_nbc_e canNbcType; can_nbc_e canNbcType;
@ -400,7 +400,7 @@ custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:1], "none", "trigger", "MAP", "I
sensor_chart_e sensorChartMode; sensor_chart_e sensorChartMode;
maf_sensor_type_e mafSensorType; maf_sensor_type_e mafSensorType;
brain_pin_e vehicleSpeedSensorInputPin; brain_input_pin_e vehicleSpeedSensorInputPin;
brain_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up brain_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up
pin_input_mode_e clutchUpPinMode; pin_input_mode_e clutchUpPinMode;

View File

@ -40,7 +40,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code ; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START ; CONFIG_DEFINITION_START
; this section was generated by ConfigDefinition.jar on Sat May 02 14:31:59 EDT 2015 ; this section was generated by ConfigDefinition.jar on Sun May 03 17:39:33 EDT 2015
pageSize = 15288 pageSize = 15288
page = 1 page = 1
@ -108,7 +108,7 @@ page = 1
fanOnTemperature = scalar, F32, 452, "*C", 1, 0, 0, 1000.0, 2 fanOnTemperature = scalar, F32, 452, "*C", 1, 0, 0, 1000.0, 2
fanOffTemperature = scalar, F32, 456, "*C", 1, 0, 0, 1000.0, 2 fanOffTemperature = scalar, F32, 456, "*C", 1, 0, 0, 1000.0, 2
;skipping ususedBla offset 460 ;skipping ususedBla offset 460
;skipping vehicleSpeedCoef offset 464 vehicleSpeedCoef = scalar, F32, 464, "coef", 1, 0, 0.01, 2000.0, 2
canNbcType = bits, U32, 468, [0:1], "BMW", "FIAT", "VAG" , "INVALID" canNbcType = bits, U32, 468, [0:1], "BMW", "FIAT", "VAG" , "INVALID"
canSleepPeriod = scalar, S32, 472, "ms", 1, 0, 0, 1000.0, 2 canSleepPeriod = scalar, S32, 472, "ms", 1, 0, 0, 1000.0, 2
ignitionMode = bits, U32, 476, [0:1], "One coil", "Individual Coils", "Wasted", "INVALID" ignitionMode = bits, U32, 476, [0:1], "One coil", "Individual Coils", "Wasted", "INVALID"
@ -362,7 +362,7 @@ page = 1
joystickDPin = bits, U32, 1396, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" joystickDPin = bits, U32, 1396, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
sensorChartMode = bits, S32, 1400, [0:1], "none", "trigger", "MAP", "INVALID" sensorChartMode = bits, S32, 1400, [0:1], "none", "trigger", "MAP", "INVALID"
;skipping mafSensorType offset 1404 ;skipping mafSensorType offset 1404
vehicleSpeedSensorInputPin = bits, U32, 1408, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" vehicleSpeedSensorInputPin = bits, U32, 1408, [0:6], "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOA_5", "INVALID", "INVALID", "GPIOA_8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOC_6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOE_5", "INVALID", "GPIOE_7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
clutchUpPin = bits, U32, 1412, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" clutchUpPin = bits, U32, 1412, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
clutchUpPinMode = scalar, F32, 1416, "ms", 1, 0, 0, 200, 1 clutchUpPinMode = scalar, F32, 1416, "ms", 1, 0, 0, 200, 1
fsioDigitalInputs1 = bits, U32, 1420, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" fsioDigitalInputs1 = bits, U32, 1420, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
@ -1179,9 +1179,8 @@ fileVersion = { 20150406 }
; Engine->Speed Sensor ; Engine->Speed Sensor
dialog = speedSensor, "Speed Sensor Settings" dialog = speedSensor, "Speed Sensor Settings"
field = "#There could be setting the speed sensor" field = "Input pin", vehicleSpeedSensorInputPin
field = "#Port settings" field = "revolution to speed mult", vehicleSpeedCoef
field = "#imp/km settings"
; Engine->Other inputs ; Engine->Other inputs
dialog = analogInputs, "Analog inputs" dialog = analogInputs, "Analog inputs"

View File

@ -35,18 +35,27 @@ public class AverageAngles {
} }
rpmAtPrevChart = rpm; rpmAtPrevChart = rpm;
String v[] = line.split("\\|"); String v[] = line.split("\\|");
System.out.println("rpm " + rpm + ": " + v.length + " values"); System.out.println("rpm " + rpm + ": " + v.length + " values");
for (int i = 0; i < v.length / 2; i++) { List<Double> current = new ArrayList<>();
for (int i = 0; i < v.length / 2; i++) {
Double value = Double.parseDouble(v[2 * i]);
if (Double.isNaN(value)) {
System.out.println("Skipping due to NaN");
return;
}
current.add(value);
}
for (int i = 0; i < current.size(); i++) {
List<Double> list = angleData.get(i); List<Double> list = angleData.get(i);
if (list == null) { if (list == null) {
list = new ArrayList<>(); list = new ArrayList<>();
angleData.put(i, list); angleData.put(i, list);
} }
list.add(Double.parseDouble(v[2 * i])); list.add(current.get(i));
} }
} }
@ -55,7 +64,7 @@ public class AverageAngles {
stream.println("Based on " + angleData.size() + " charts"); stream.println("Based on " + angleData.size() + " charts");
stream.println("index,average,stdev"); stream.println("index,average,stdev,diff");
double prev = 0; double prev = 0;

View File

@ -512,7 +512,7 @@ void testTriggerDecoder(void) {
// lame duty cycle implementation! // lame duty cycle implementation!
testTriggerDecoder2("ford aspire", FORD_ASPIRE_1996, 4, 0.0, 0.5); testTriggerDecoder2("ford aspire", FORD_ASPIRE_1996, 4, 0.0, 0.5);
testTriggerDecoder2("dodge ram", DODGE_RAM, 16, 0.5000, 0.100); testTriggerDecoder2("dodge ram", DODGE_RAM, 16, 0.5000, 0.06);
//testTriggerDecoder2("bmw", BMW_E34, 0, 0.9750, 0.5167); //testTriggerDecoder2("bmw", BMW_E34, 0, 0.9750, 0.5167);
testTriggerDecoder2("bmw", BMW_E34, 0, 0.4667, 0.0); testTriggerDecoder2("bmw", BMW_E34, 0, 0.4667, 0.0);