auto-sync

This commit is contained in:
rusEfi 2015-02-11 16:04:02 -06:00
parent 1836ba5854
commit 5af66c152c
4 changed files with 210 additions and 171 deletions

View File

@ -16,9 +16,9 @@
/**
* this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
*/
#define TS_FILE_VERSION 20150202
#define TS_FILE_VERSION 20150211
#define PAGE_0_SIZE 11832
#define PAGE_0_SIZE 15160
#define TS_OUTPUT_SIZE 116
typedef struct {

View File

@ -1,4 +1,4 @@
// this section was generated by config_definition.jar on Sun Feb 08 19:20:53 BOT 2015
// this section was generated by config_definition.jar on Wed Feb 11 16:24:32 EST 2015
// begin
#include "rusefi_types.h"
typedef struct {
@ -690,444 +690,472 @@ typedef struct {
* offset 620
*/
float sparkDwell[DWELL_COUNT];
/**
* offset 652
*/
float ignitionLoadBins[IGN_LOAD_COUNT];
/**
* offset 716
*/
float ignitionRpmBins[IGN_RPM_COUNT];
/**
* this value could be used to offset the whole ignition timing table by a constant
* offset 780
* offset 652
*/
float ignitionBaseAngle;
/**
* While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft
* degrees, not in absolute time as in running mode.
* offset 784
* offset 656
*/
float crankingChargeAngle;
/**
* offset 788
* offset 660
*/
timing_mode_e timingMode;
/**
* This value is used in 'fixed timing' mode, i.e. constant timing
* This mode is useful for instance while adjusting distributor location
* offset 792
* offset 664
*/
float fixedModeTiming;
/**
* offset 796
*/
float fuelLoadBins[FUEL_LOAD_COUNT];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 860
*/
float fuelRpmBins[FUEL_RPM_COUNT];
/**
* offset 924
* offset 668
*/
specs_s specs;
/**
* offset 936
* offset 680
*/
int rpmHardLimit;
/**
* offset 940
* offset 684
*/
injection_mode_e crankingInjectionMode;
/**
* offset 944
* offset 688
*/
injection_mode_e injectionMode;
/**
* This field is the angle between Top Dead Center (TDC) and the first trigger event.
* Knowing this angle allows us to control timing and other angles in reference to TDC.
* offset 948
* offset 692
*/
float globalTriggerAngleOffset;
/**
* This parameter holds the coefficient of input voltage dividers
* offset 952
* offset 696
*/
float analogInputDividerCoefficient;
/**
* This setting controls which algorithm is used for ENGINE LOAD
* offset 956
* offset 700
*/
engine_load_mode_e algorithm;
/**
* offset 960
* offset 704
*/
float vbattDividerCoeff;
/**
* Cooling fan turn-on temperature threshold, in Celsuis
* offset 964
* offset 708
*/
float fanOnTemperature;
/**
* Cooling fan turn-off temperature threshold, in Celsuis
* offset 968
* offset 712
*/
float fanOffTemperature;
/**
* offset 972
* offset 716
*/
brain_pin_e vehicleSpeedSensorInputPin;
/**
* This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h
* offset 976
* offset 720
*/
float vehicleSpeedCoef;
/**
* offset 980
* offset 724
*/
can_nbc_e canNbcType;
/**
* offset 984
* offset 728
*/
int canSleepPeriod;
/**
* offset 988
* offset 732
*/
ignition_mode_e ignitionMode;
/**
* todo: refactor this, see operation_mode_e
* offset 992
* offset 736
*/
float rpmMultiplier;
/**
* offset 996
* offset 740
*/
display_mode_e displayMode;
/**
* offset 1000
* offset 744
*/
log_format_e logFormat;
/**
* offset 1004
* offset 748
*/
int firmwareVersion;
/**
* offset 1008
* offset 752
*/
int HD44780width;
/**
* offset 1012
* offset 756
*/
int HD44780height;
/**
* offset 1016
* offset 760
*/
adc_channel_e tpsAdcChannel;
/**
* offset 1020
* offset 764
*/
int overrideCrankingIgnition;
/**
* offset 1024
* offset 768
*/
int analogChartFrequency;
/**
* offset 1028
* offset 772
*/
trigger_config_s trigger;
/**
* offset 1056
* offset 800
*/
spi_device_e hip9011SpiDevice;
/**
* offset 1060
* offset 804
*/
adc_channel_e vbattAdcChannel;
/**
* offset 1064
* offset 808
*/
float globalFuelCorrection;
/**
* todo: merge with channel settings, use full-scale Thermistor!
* offset 1068
* offset 812
*/
adc_channel_e cltAdcChannel;
/**
* offset 1072
* offset 816
*/
adc_channel_e iatAdcChannel;
/**
* offset 1076
* offset 820
*/
adc_channel_e mafAdcChannel;
/**
* @see hasAfrSensor
* offset 1080
* offset 824
*/
afr_sensor_s afr;
/**
* this is about deciding when the injector starts it's squirt
* offset 1100
* offset 844
*/
float injectionAngle;
/**
* offset 1104
* offset 848
*/
float crankingTimingAngle;
/**
* offset 1108
* offset 852
*/
float diffLoadEnrichmentCoef;
/**
* @see hasBaroSensor
* offset 1112
* offset 856
*/
air_pressure_sensor_config_s baroSensor;
/**
* offset 1128
*/
float veLoadBins[FUEL_LOAD_COUNT];
/**
* offset 1192
*/
float veRpmBins[FUEL_RPM_COUNT];
/**
* offset 1256
*/
float afrLoadBins[FUEL_LOAD_COUNT];
/**
* offset 1320
*/
float afrRpmBins[FUEL_RPM_COUNT];
/**
* offset 1384
*/
fuel_table_t fuelTable;
/**
* offset 2408
*/
ignition_table_t ignitionTable;
/**
* offset 3432
*/
ve_table_t veTable;
/**
* offset 4456
*/
afr_table_t afrTable;
/**
* offset 5480
* offset 872
*/
board_configuration_s bc;
/**
* @see isMapAveragingEnabled
offset 9484 bit 0 */
offset 4876 bit 0 */
bool_t hasMapSensor : 1;
/**
offset 9484 bit 1 */
offset 4876 bit 1 */
bool_t hasIatSensor : 1;
/**
offset 9484 bit 2 */
offset 4876 bit 2 */
bool_t hasBaroSensor : 1;
/**
offset 9484 bit 3 */
offset 4876 bit 3 */
bool_t hasAfrSensor : 1;
/**
offset 9484 bit 4 */
offset 4876 bit 4 */
bool_t useConstantDwellDuringCranking : 1;
/**
offset 9484 bit 5 */
offset 4876 bit 5 */
bool_t isDigitalChartEnabled : 1;
/**
offset 9484 bit 6 */
offset 4876 bit 6 */
bool_t isCanEnabled : 1;
/**
offset 9484 bit 7 */
offset 4876 bit 7 */
bool_t hasCltSensor : 1;
/**
offset 9484 bit 8 */
offset 4876 bit 8 */
bool_t canReadEnabled : 1;
/**
offset 9484 bit 9 */
offset 4876 bit 9 */
bool_t canWriteEnabled : 1;
/**
offset 9484 bit 10 */
offset 4876 bit 10 */
bool_t hasVehicleSpeedSensor : 1;
/**
offset 9484 bit 11 */
offset 4876 bit 11 */
bool_t isJoystickEnabled : 1;
/**
offset 9484 bit 12 */
offset 4876 bit 12 */
bool_t isGpsEnabled : 1;
/**
offset 9484 bit 13 */
offset 4876 bit 13 */
bool_t hasMafSensor : 1;
/**
offset 9484 bit 14 */
offset 4876 bit 14 */
bool_t hasTpsSensor : 1;
/**
* offset 9488
* offset 4880
*/
adc_channel_e hipOutputChannel;
/**
* offset 9492
* offset 4884
*/
idle_mode_e idleMode;
/**
offset 9496 bit 0 */
offset 4888 bit 0 */
bool_t isInjectionEnabled : 1;
/**
offset 9496 bit 1 */
offset 4888 bit 1 */
bool_t isIgnitionEnabled : 1;
/**
offset 9496 bit 2 */
offset 4888 bit 2 */
bool_t isCylinderCleanupEnabled : 1;
/**
offset 9496 bit 3 */
offset 4888 bit 3 */
bool_t secondTriggerChannelEnabled : 1;
/**
offset 9496 bit 4 */
offset 4888 bit 4 */
bool_t needSecondTriggerInputDeprecated : 1;
/**
offset 9496 bit 5 */
offset 4888 bit 5 */
bool_t isMapAveragingEnabled : 1;
/**
offset 9496 bit 6 */
offset 4888 bit 6 */
bool_t isMilEnabled : 1;
/**
offset 9496 bit 7 */
offset 4888 bit 7 */
bool_t isFuelPumpEnabled : 1;
/**
offset 9496 bit 8 */
offset 4888 bit 8 */
bool_t isTunerStudioEnabled : 1;
/**
offset 9496 bit 9 */
offset 4888 bit 9 */
bool_t isWaveAnalyzerEnabled : 1;
/**
offset 9496 bit 10 */
offset 4888 bit 10 */
bool_t isIdleThreadEnabled : 1;
/**
offset 9496 bit 11 */
offset 4888 bit 11 */
bool_t isPrintTriggerSynchDetails : 1;
/**
* Usually if we have no trigger events that means engine is stopped
* Unless we are troubleshooting and spinning the engine by hand - this case a longer
* delay is needed
offset 9496 bit 12 */
offset 4888 bit 12 */
bool_t isManualSpinningMode : 1;
/**
offset 9496 bit 13 */
offset 4888 bit 13 */
bool_t twoWireBatch : 1;
/**
* offset 9500
* offset 4892
*/
uint32_t digitalChartSize;
/**
* offset 9504
* offset 4896
*/
float crankingFuelCoef[CRANKING_CURVE_SIZE];
/**
* offset 9536
* offset 4928
*/
float crankingFuelBins[CRANKING_CURVE_SIZE];
/**
* offset 9568
* offset 4960
*/
float crankingCycleCoef[CRANKING_CURVE_SIZE];
/**
* offset 9600
* offset 4992
*/
float crankingCycleBins[CRANKING_CURVE_SIZE];
/**
* offset 9632
* offset 5024
*/
float ignitionDwellForCrankingMs;
/**
* offset 9636
* offset 5028
*/
int targetIdleRpm;
/**
* A/C button input handled as analog input
* offset 9640
* offset 5032
*/
adc_channel_e acSwitchAdc;
/**
* offset 9644
* offset 5036
*/
int ignMathCalculateAtIndex;
/**
* offset 9648
* offset 5040
*/
int16_t acCutoffLowRpm;
/**
* offset 9650
* offset 5042
*/
int16_t acCutoffHighRpm;
/**
* offset 9652
* offset 5044
*/
int16_t acIdleRpmBump;
/**
* offset 9654
* offset 5046
*/
int16_t unusedShort;
/**
* offset 9656
* offset 5048
*/
adc_channel_e vRefAdcChannel;
/**
* offset 9660
* offset 5052
*/
float knockDetectionWindowStart;
/**
* offset 9664
* offset 5056
*/
float knockDetectionWindowEnd;
/**
* Cylinder diameter, in mm.
* offset 9668
* offset 5060
*/
float cylinderBore;
/**
* Some vehicles have a switch to indicate that clutch pedal is all the way up
* offset 9672
* offset 5064
*/
brain_pin_e clutchUpPin;
/**
* offset 9676
* offset 5068
*/
pin_input_mode_e clutchUpPinMode;
/**
* offset 9680
* offset 5072
*/
float hipThreshold;
/**
* offset 9684
* offset 5076
*/
brain_pin_e fsioInputs[LE_COMMAND_COUNT];
/**
* offset 9748
* offset 5140
*/
pin_input_mode_e fsioInputModes[LE_COMMAND_COUNT];
/**
* offset 9812
* offset 5204
*/
int unused3[149];
/**
* offset 10408
* offset 5800
*/
le_formula_t timingMultiplier;
/**
* offset 10608
* offset 6000
*/
le_formula_t timingAdditive;
/**
* offset 10808
* offset 6200
*/
float mafDecoding[MAF_DECODING_COUNT];
/**
* offset 7224
*/
float mafDecodingBins[MAF_DECODING_COUNT];
/**
* offset 8248
*/
fuel_table_t fuelTable;
/**
* offset 9272
*/
float fuelLoadBins[FUEL_LOAD_COUNT];
/**
* RPM is float and not integer in order to use unified methods for interpolation
* offset 9336
*/
float fuelRpmBins[FUEL_RPM_COUNT];
/**
* offset 9400
*/
ignition_table_t ignitionTable;
/**
* offset 10424
*/
float ignitionLoadBins[IGN_LOAD_COUNT];
/**
* offset 10488
*/
float ignitionRpmBins[IGN_RPM_COUNT];
/**
* offset 10552
*/
ve_table_t veTable;
/**
* offset 11576
*/
float veLoadBins[FUEL_LOAD_COUNT];
/**
* offset 11640
*/
float veRpmBins[FUEL_RPM_COUNT];
/**
* offset 11704
*/
afr_table_t afrTable;
/**
* offset 12728
*/
float afrLoadBins[FUEL_LOAD_COUNT];
/**
* offset 12792
*/
float afrRpmBins[FUEL_RPM_COUNT];
/**
* offset 12856
*/
fuel_table_t injectionPhase;
/** total size 11832*/
/**
* offset 13880
*/
float injPhaseLoadBins[FUEL_LOAD_COUNT];
/**
* offset 13944
*/
float injPhaseRpmBins[FUEL_RPM_COUNT];
/**
* offset 14008
*/
ve_table_t ve2Table;
/**
* offset 15032
*/
float ve2LoadBins[FUEL_LOAD_COUNT];
/**
* offset 15096
*/
float ve2RpmBins[FUEL_RPM_COUNT];
/** total size 15160*/
} engine_configuration_s;
// end
// this section was generated by config_definition.jar on Sun Feb 08 19:20:53 BOT 2015
// this section was generated by config_definition.jar on Wed Feb 11 16:24:32 EST 2015

View File

@ -249,9 +249,9 @@ void firmwareError(const char *errorMsg, ...) {
}
}
static char UNUSED_RAM_SIZE[12500];
static char UNUSED_RAM_SIZE[9999];
static char UNUSED_CCM_SIZE[8000] CCM_OPTIONAL;
static char UNUSED_CCM_SIZE[4900] CCM_OPTIONAL;
int getRusEfiVersion(void) {
if (UNUSED_RAM_SIZE == 0)

View File

@ -35,6 +35,8 @@ struct engine_configuration_s
#define IGN_LOAD_COUNT 16
#define IGN_RPM_COUNT 16
#define MAF_DECODING_COUNT 256
! please note that 1024 here is 4 * FUEL_RPM_COUNT * FUEL_LOAD_COUNT
custom fuel_table_t 1024 array, F32, @OFFSET@, [16x16],"ms", 1, 0, 0.0, 300.0, 2
custom ve_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, 0, 100.0, 2
@ -135,8 +137,6 @@ ThermistorConf iat;
float[DWELL_COUNT] sparkDwellBins;;"RPM", 1, 0.0, 0.0, 18000, 2
float[DWELL_COUNT] sparkDwell;;"ms", 1, 0.0, 0.0, 30.0, 2
float[IGN_LOAD_COUNT] ignitionLoadBins;;"Load", 1, 0.0, 0, 300.0, 2
float[IGN_RPM_COUNT] ignitionRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
float ignitionBaseAngle;this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0
@ -149,11 +149,6 @@ timing_mode_e timingMode;
float fixedModeTiming;This value is used in 'fixed timing' mode, i.e. constant timing\nThis mode is useful for instance while adjusting distributor location;"RPM", 1, 0, 0, 3000.0, 0
float[FUEL_LOAD_COUNT] fuelLoadBins;;"V", 1, 0, 0.0, 300.0, 2
float[FUEL_RPM_COUNT] fuelRpmBins;RPM is float and not integer in order to use unified methods for interpolation;"RPM", 1, 0, 0.0, 25500.0, 2
struct_no_prefix specs_s
float displacement;Engine displacement, in liters\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2
@ -256,15 +251,6 @@ float injectionAngle;this is about deciding when the injector starts it's squirt
float diffLoadEnrichmentCoef;
air_pressure_sensor_config_s baroSensor;@see hasBaroSensor
float[FUEL_LOAD_COUNT] veLoadBins;;"%", 1, 0.0, 0, 300.0, 2
float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
float[FUEL_LOAD_COUNT] afrLoadBins;;"%", 1, 0.0, 0, 300.0, 2
float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
fuel_table_t fuelTable;
ignition_table_t ignitionTable;
ve_table_t veTable;
afr_table_t afrTable;
struct_no_prefix board_configuration_s
brain_pin_e idleValvePin;
@ -487,7 +473,32 @@ custom pin_input_mode_e 4 scalar, F32, @OFFSET@, "ms", 1, 0, 0, 200, 1
le_formula_t timingMultiplier;
le_formula_t timingAdditive;
fuel_table_t injectionPhase;
float[MAF_DECODING_COUNT] mafDecoding;
float[MAF_DECODING_COUNT] mafDecodingBins;
fuel_table_t fuelTable;
float[FUEL_LOAD_COUNT] fuelLoadBins;;"V", 1, 0, 0.0, 300.0, 2
float[FUEL_RPM_COUNT] fuelRpmBins;RPM is float and not integer in order to use unified methods for interpolation;"RPM", 1, 0, 0.0, 25500.0, 2
ignition_table_t ignitionTable;
float[IGN_LOAD_COUNT] ignitionLoadBins;;"Load", 1, 0.0, 0, 300.0, 2
float[IGN_RPM_COUNT] ignitionRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
ve_table_t veTable;
float[FUEL_LOAD_COUNT] veLoadBins;;"%", 1, 0.0, 0, 300.0, 2
float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
afr_table_t afrTable;
float[FUEL_LOAD_COUNT] afrLoadBins;;"%", 1, 0.0, 0, 300.0, 2
float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
fuel_table_t injectionPhase;
float[FUEL_LOAD_COUNT] injPhaseLoadBins;;"Load", 1, 0.0, 0, 300.0, 2
float[FUEL_RPM_COUNT] injPhaseRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
ve_table_t ve2Table;
float[FUEL_LOAD_COUNT] ve2LoadBins;;"%", 1, 0.0, 0, 300.0, 2
float[FUEL_RPM_COUNT] ve2RpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
end_struct