This commit is contained in:
rusefi 2018-01-23 08:34:18 -05:00
parent 56153a8880
commit 3e48813e73
13 changed files with 66 additions and 11 deletions

View File

@ -284,6 +284,7 @@ void prepareVoidConfiguration(engine_configuration_s *activeConfiguration) {
engineConfiguration->auxValves[i] = GPIO_UNASSIGNED;
}
engineConfiguration->LIS302DLCsPin = GPIO_UNASSIGNED;
engineConfiguration->flexFuelSensor = GPIO_UNASSIGNED;
boardConfiguration->joystickCenterPin = GPIO_UNASSIGNED;
boardConfiguration->joystickAPin = GPIO_UNASSIGNED;

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jan 22 23:24:40 EST 2018
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -2075,7 +2075,11 @@ typedef struct {
/**
* offset 3304
*/
int unusedEnd[794];
brain_input_pin_e flexFuelSensor;
/**
* offset 3308
*/
int unusedEnd[793];
/** total size 6480*/
} engine_configuration_s;
@ -2321,4 +2325,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jan 22 23:24:40 EST 2018

View File

@ -1526,8 +1526,10 @@
#define fsioCurve4Bins_offset_hex ca8
#define fsioCurve4_offset 3272
#define fsioCurve4_offset_hex cc8
#define unusedEnd_offset 3304
#define unusedEnd_offset_hex ce8
#define flexFuelSensor_offset 3304
#define flexFuelSensor_offset_hex ce8
#define unusedEnd_offset 3308
#define unusedEnd_offset_hex cec
#define cltCrankingCorrBins_offset 6480
#define cltCrankingCorrBins_offset_hex 1950
#define cltCrankingCorr_offset 6512

View File

@ -15,6 +15,7 @@ EXTERN_ENGINE;
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
initThermistors(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
initMapDecoder(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
initFlexFuelSensor();
}
// todo: move this somewhere else? maybe.

View File

@ -20,6 +20,7 @@
#include "voltage.h"
#include "thermistors.h"
#include "oil_pressure.h"
#include "flex_fuel.h"
#include "adc_inputs.h"
#include "analog_input.h"

View File

@ -0,0 +1,26 @@
/*
* @file flex_fuel.cpp
*
* GM 12568450
* GM 12570260
* GM 13577394
* GM 13577429
*
* @author Andrey Belomutskiy, (c) 2012-2018
* @date Jan 22, 2018
*/
#ifndef CONTROLLERS_SENSORS_FLEX_FUEL_CPP_
#define CONTROLLERS_SENSORS_FLEX_FUEL_CPP_
#include "engine.h"
EXTERN_ENGINE
;
void initFlexFuelSensor() {
}
#endif /* CONTROLLERS_SENSORS_FLEX_FUEL_CPP_ */

View File

@ -0,0 +1,13 @@
/*
* @file flex_fuel.h
*
* @author Andrey Belomutskiy, (c) 2012-2018
* @date Jan 22, 2018
*/
#ifndef CONTROLLERS_SENSORS_FLEX_FUEL_H_
#define CONTROLLERS_SENSORS_FLEX_FUEL_H_
void initFlexFuelSensor();
#endif /* CONTROLLERS_SENSORS_FLEX_FUEL_H_ */

View File

@ -9,4 +9,5 @@ CONTROLLERS_SENSORS_SRC_CPP = $(PROJECT_DIR)/controllers/sensors/thermistors.cp
$(PROJECT_DIR)/controllers/sensors/tps.cpp \
$(PROJECT_DIR)/controllers/sensors/ego.cpp \
$(PROJECT_DIR)/controllers/sensors/hip9011_lookup.cpp \
$(PROJECT_DIR)/controllers/sensors/flex_fuel.cpp \
$(PROJECT_DIR)/controllers/sensors/oil_pressure.cpp

View File

@ -886,7 +886,8 @@ spi_device_e accelerometerSpiDevice;
float[FSIO_CURVE_8] fsioCurve3;;"y", 1, 0, -999, 1000.0, 3
float[FSIO_CURVE_8] fsioCurve4Bins;;"x", 1, 0, -999, 1000.0, 3
float[FSIO_CURVE_8] fsioCurve4;;"y", 1, 0, -999, 1000.0, 3
int[794] unusedEnd;
brain_input_pin_e flexFuelSensor;
int[793] unusedEnd;
end_struct

View File

@ -263,5 +263,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20180121;
return 20180122;
}

View File

@ -63,7 +63,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jan 22 23:24:40 EST 2018
pageSize = 20000
page = 1
@ -767,7 +767,8 @@ page = 1
fsioCurve3 = array, F32, 3208, [8], "y", 1, 0, -999, 1000.0, 3
fsioCurve4Bins = array, F32, 3240, [8], "x", 1, 0, -999, 1000.0, 3
fsioCurve4 = array, F32, 3272, [8], "y", 1, 0, -999, 1000.0, 3
;skipping unusedEnd offset 3304
flexFuelSensor = bits, U32, 3304, [0:6], "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "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", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "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"
;skipping unusedEnd offset 3308
cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2
cltCrankingCorr = array, F32, 6512, [8], "%", 1, 0, 0.0, 500.0, 2
idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2
@ -2523,6 +2524,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
field = "!todo: move MAF channel to maf curve dialog"
field = "MAF ADC input", mafAdcChannel
field = "Baro ADC input", baroSensor_hwChannel
field = "Flex Fuel", flexFuelSensor
field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap
field = "Analog divider", analogInputDividerCoefficient
field = "Use BiQuad averaging", useBiQuadAnalogFiltering

View File

@ -1707,6 +1707,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
field = "!todo: move MAF channel to maf curve dialog"
field = "MAF ADC input", mafAdcChannel
field = "Baro ADC input", baroSensor_hwChannel
field = "Flex Fuel", flexFuelSensor
field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap
field = "Analog divider", analogInputDividerCoefficient
field = "Use BiQuad averaging", useBiQuadAnalogFiltering

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 21 12:13:41 EST 2018
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jan 22 23:24:40 EST 2018
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int BLOCKING_FACTOR = 400;
@ -1014,7 +1014,8 @@ public class Fields {
public static final int fsioCurve3_offset = 3208;
public static final int fsioCurve4Bins_offset = 3240;
public static final int fsioCurve4_offset = 3272;
public static final int unusedEnd_offset = 3304;
public static final int flexFuelSensor_offset = 3304;
public static final int unusedEnd_offset = 3308;
public static final int cltCrankingCorrBins_offset = 6480;
public static final int cltCrankingCorrBins_offset_hex = 1950;
public static final int cltCrankingCorr_offset = 6512;
@ -1828,6 +1829,7 @@ public class Fields {
public static final Field OILPRESSURE_V2 = Field.create("OILPRESSURE_V2", 2908, FieldType.FLOAT);
public static final Field OILPRESSURE_VALUE2 = Field.create("OILPRESSURE_VALUE2", 2912, FieldType.FLOAT);
public static final Field ACCELEROMETERSPIDEVICE = Field.create("ACCELEROMETERSPIDEVICE", 2916, FieldType.INT);
public static final Field FLEXFUELSENSOR = Field.create("FLEXFUELSENSOR", 3304, FieldType.INT, brain_input_pin_e);
public static final Field FSIOFORMULAS1 = Field.create("FSIOFORMULAS1", 6672, FieldType.INT);
public static final Field FSIOFORMULAS2 = Field.create("FSIOFORMULAS2", 6872, FieldType.INT);
public static final Field FSIOFORMULAS3 = Field.create("FSIOFORMULAS3", 7072, FieldType.INT);