auto-sync

This commit is contained in:
rusEfi 2015-01-27 18:05:24 -06:00
parent 700c291b0b
commit 1c05b8e23b
5 changed files with 357 additions and 328 deletions

View File

@ -48,7 +48,7 @@ void setSachs(engine_configuration_s *engineConfiguration) {
// Frankenstein analog input #11: PC4 adc14
// Frankenstein analog input #12: PC5 adc15
engineConfiguration->tpsAdcChannel = EFI_ADC_1;
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
/**
* TPS 0% 0.9v

View File

@ -1,5 +1,6 @@
// this section was generated by config_definition.jar on Tue Jan 27 18:37:17 EST 2015
// begin
#include "rusefi_types.h"
typedef struct {
/**
* offset 0
@ -120,7 +121,6 @@ typedef struct {
/** total size 40*/
} ThermistorConf;
/**
* @brief Trigger wheel(s) configuration
@ -178,7 +178,7 @@ typedef struct {
* offset 16
*/
float value2;
/** total size 20*/
/** total size 20*/
} afr_sensor_s;
typedef struct {
@ -372,21 +372,27 @@ typedef struct {
* offset 368
*/
pin_output_mode_e o2heaterPinModeTodO;
/** offset 372 bit 0 */
uint32_t is_enabled_spi_1 : 1;
/** offset 372 bit 1 */
uint32_t is_enabled_spi_2 : 1;
/** offset 372 bit 2 */
uint32_t is_enabled_spi_3 : 1;
/** offset 372 bit 3 */
uint32_t isSdCardEnabled : 1;
/** offset 372 bit 4 */
uint32_t isFastAdcEnabled : 1;
/** offset 372 bit 5 */
uint32_t isEngineControlEnabled : 1;
/** offset 372 bit 6 */
uint32_t isHip9011Enabled : 1;
/**
offset 372 bit 0 */
bool_t is_enabled_spi_1 :1;
/**
offset 372 bit 1 */
bool_t is_enabled_spi_2 :1;
/**
offset 372 bit 2 */
bool_t is_enabled_spi_3 :1;
/**
offset 372 bit 3 */
bool_t isSdCardEnabled :1;
/**
offset 372 bit 4 */
bool_t isFastAdcEnabled :1;
/**
offset 372 bit 5 */
bool_t isEngineControlEnabled :1;
/**
offset 372 bit 6 */
bool_t isHip9011Enabled :1;
/**
* offset 376
*/
@ -409,141 +415,139 @@ typedef struct {
*/
egt_cs_array_t max31855_cs;
/**
* offset 408
* offset 436
*/
spi_device_e max31855spiDevice;
/**
* offset 412
* offset 440
*/
brain_pin_e fsioPins[LE_COMMAND_COUNT];
/**
* offset 476
* offset 504
*/
pin_output_mode_e gpioPinModes[LE_COMMAND_COUNT];
/**
* offset 540
* offset 568
*/
brain_pin_e joystickPins[JOYSTICK_PIN_COUNT];
/**
* This pin is used for debugging - snap a logic analyzer on it and see if it's ever high
* offset 560
* offset 588
*/
brain_pin_e triggerErrorPin;
/**
* offset 564
* offset 592
*/
pin_output_mode_e triggerErrorPinMode;
/**
* value between 0 and 1
* offset 568
* offset 596
*/
float idleSolenoidPwm;
/**
* offset 572
* offset 600
*/
brain_pin_e acRelayPin;
/**
* offset 576
* offset 604
*/
pin_output_mode_e acRelayPinMode;
/**
* offset 580
* offset 608
*/
int16_t fsioFrequency[LE_COMMAND_COUNT];
/**
* offset 612
* offset 640
*/
brain_pin_e hip9011CsPin;
/**
* offset 616
* offset 644
*/
brain_pin_e hip9011IntHoldPin;
/**
* offset 620
* offset 648
*/
brain_pin_e hip9011OutPin;
/**
* offset 624
* offset 652
*/
float fsio_setting[LE_COMMAND_COUNT];
/**
* offset 688
* offset 716
*/
brain_pin_e spi1mosiPin;
/**
* offset 692
* offset 720
*/
brain_pin_e spi1misoPin;
/**
* offset 696
* offset 724
*/
brain_pin_e spi1sckPin;
/**
* offset 700
* offset 728
*/
brain_pin_e spi2mosiPin;
/**
* offset 704
* offset 732
*/
brain_pin_e spi2misoPin;
/**
* offset 708
* offset 736
*/
brain_pin_e spi2sckPin;
/**
* offset 712
* offset 740
*/
brain_pin_e spi3mosiPin;
/**
* offset 716
* offset 744
*/
brain_pin_e spi3misoPin;
/**
* offset 720
* offset 748
*/
brain_pin_e spi3sckPin;
/**
* offset 724
* offset 752
*/
float hip9011Gain;
/**
* offset 728
* offset 756
*/
brain_pin_e joystickCenterPin;
/**
* offset 732
* offset 760
*/
brain_pin_e joystickAPin;
/**
* offset 736
* offset 764
*/
brain_pin_e joystickBPin;
/**
* offset 740
* offset 768
*/
brain_pin_e joystickCPin;
/**
* offset 744
* offset 772
*/
brain_pin_e joystickDPin;
/**
* offset 748
* offset 776
*/
analog_chart_e analogChartMode;
/**
* offset 752
* offset 780
*/
int unusedbs[6];
/**
* offset 776
* offset 804
*/
le_formula_t le_formulas[LE_COMMAND_COUNT];
/** total size 3976*/
/** total size 4004*/
} board_configuration_s;
typedef struct {
// this section was generated by config_definition.jar on Thu Jan 15 15:59:00 EST 2015
// begin
/**
* http://rusefi.com/wiki/index.php?title=Manual:Engine_Type
* offset 0
@ -600,7 +604,6 @@ typedef struct {
* offset 334
*/
uint16_t unused334;
/**
* todo: finish implementation. These values are used for TPS disconnect detection
* offset 336
@ -620,7 +623,6 @@ typedef struct {
* offset 344
*/
int engineCycle;
/**
* offset 348
*/
@ -631,7 +633,6 @@ typedef struct {
* offset 356
*/
MAP_sensor_config_s map;
/**
* todo: merge with channel settings, use full-scale Thermistor here!
* offset 500
@ -889,84 +890,106 @@ typedef struct {
* offset 4452
*/
fuel_table_t afrTable;
/**
* offset 5476
*/
board_configuration_s bc;
// offset 6280 ????
/**
* @see isMapAveragingEnabled
*/
/** offset 9480 bit 0 */
bool_t hasMapSensor : 1;
/** offset 9480 bit 1 */
bool_t hasIatSensor : 1;
/** offset 9480 bit 2 */
bool_t hasBaroSensor : 1;
/** offset 9480 bit 3 */
bool_t hasAfrSensor : 1;
/** offset 9480 bit 4 */
bool_t useConstantDwellDuringCranking : 1;
/** offset 9480 bit 5 */
bool_t isDigitalChartEnabled : 1;
/** offset 9480 bit 6 */
bool_t isCanEnabled : 1;
/** offset 9480 bit 7 */
bool_t hasCltSensor : 1;
/** offset 9480 bit 8 */
bool_t canReadEnabled : 1;
/** offset 9480 bit 9 */
bool_t canWriteEnabled : 1;
/** offset 9480 bit 10 */
bool_t hasVehicleSpeedSensor : 1;
/** offset 9480 bit 11 */
bool_t isJoystickEnabled : 1;
/** offset 9480 bit 12 */
bool_t isGpsEnabled : 1;
/** offset 9480 bit 13 */
bool_t hasMafSensor : 1;
/** offset 9480 bit 14 */
bool_t hasTpsSensor : 1;
offset 9480 bit 0 */
bool_t hasMapSensor :1;
/**
* offset 6284 ???
offset 9480 bit 1 */
bool_t hasIatSensor :1;
/**
offset 9480 bit 2 */
bool_t hasBaroSensor :1;
/**
offset 9480 bit 3 */
bool_t hasAfrSensor :1;
/**
offset 9480 bit 4 */
bool_t useConstantDwellDuringCranking :1;
/**
offset 9480 bit 5 */
bool_t isDigitalChartEnabled :1;
/**
offset 9480 bit 6 */
bool_t isCanEnabled :1;
/**
offset 9480 bit 7 */
bool_t hasCltSensor :1;
/**
offset 9480 bit 8 */
bool_t canReadEnabled :1;
/**
offset 9480 bit 9 */
bool_t canWriteEnabled :1;
/**
offset 9480 bit 10 */
bool_t hasVehicleSpeedSensor :1;
/**
offset 9480 bit 11 */
bool_t isJoystickEnabled :1;
/**
offset 9480 bit 12 */
bool_t isGpsEnabled :1;
/**
offset 9480 bit 13 */
bool_t hasMafSensor :1;
/**
offset 9480 bit 14 */
bool_t hasTpsSensor :1;
/**
* offset 9484
*/
adc_channel_e hipOutputChannel;
/**
* offset 9488
*/
idle_mode_e idleMode;
/** offset 9492 bit 0 */
bool_t isInjectionEnabled : 1;
/** offset 9492 bit 1 */
bool_t isIgnitionEnabled : 1;
/** offset 9492 bit 2 */
bool_t isCylinderCleanupEnabled : 1;
/** offset 9492 bit 3 */
bool_t secondTriggerChannelEnabled : 1;
/** offset 9492 bit 4 */
bool_t needSecondTriggerInput : 1;
/** offset 9492 bit 5 */
bool_t isMapAveragingEnabled : 1;
/** offset 9492 bit 6 */
bool_t isMilEnabled : 1;
/** offset 9492 bit 7 */
bool_t isFuelPumpEnabled : 1;
/** offset 9492 bit 8 */
bool_t isTunerStudioEnabled : 1;
/** offset 9492 bit 9 */
bool_t isWaveAnalyzerEnabled : 1;
/** offset 9492 bit 10 */
bool_t isIdleThreadEnabled : 1;
/** offset 9492 bit 11 */
bool_t isPrintTriggerSynchDetails : 1;
/**
offset 9492 bit 0 */
bool_t isInjectionEnabled :1;
/**
offset 9492 bit 1 */
bool_t isIgnitionEnabled :1;
/**
offset 9492 bit 2 */
bool_t isCylinderCleanupEnabled :1;
/**
offset 9492 bit 3 */
bool_t secondTriggerChannelEnabled :1;
/**
offset 9492 bit 4 */
bool_t needSecondTriggerInput :1;
/**
offset 9492 bit 5 */
bool_t isMapAveragingEnabled :1;
/**
offset 9492 bit 6 */
bool_t isMilEnabled :1;
/**
offset 9492 bit 7 */
bool_t isFuelPumpEnabled :1;
/**
offset 9492 bit 8 */
bool_t isTunerStudioEnabled :1;
/**
offset 9492 bit 9 */
bool_t isWaveAnalyzerEnabled :1;
/**
offset 9492 bit 10 */
bool_t isIdleThreadEnabled :1;
/**
offset 9492 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
*/
bool isManualSpinningMode : 1; // bit 11
offset 9492 bit 12 */
bool_t isManualSpinningMode :1;
/**
* offset 9496
*/
@ -1082,4 +1105,8 @@ typedef struct {
* offset 10808
*/
fuel_table_t injectionPhase;
/** total size 11832*/
} engine_configuration_s;
// end
// this section was generated by config_definition.jar on Tue Jan 27 18:37:17 EST 2015

View File

@ -1,2 +1,2 @@
java -jar ../java_tools/ConfigDefinition.jar .
java -jar ../java_tools/ConfigDefinition.jar . controllers\algo

View File

@ -173,9 +173,9 @@ display_mode_e displayMode;
custom log_format_e 4 bits, U32, %OFFSET%, [0:0], "native", "Mega Log Viewer"
log_format_e logFormat;
int firmwareVersion;"index", 1, 0, 0, 300, 0
int HD44780width;"index", 1, 0, 0, 300, 0
int HD44780height;"index", 1, 0, 0, 300, 0
int firmwareVersion;;"index", 1, 0, 0, 300, 0
int HD44780width;;"index", 1, 0, 0, 300, 0
int HD44780height;;"index", 1, 0, 0, 300, 0
adc_channel_e tpsAdcChannel;
int overrideCrankingIgnition;
@ -393,7 +393,7 @@ le_formula_t[LE_COMMAND_COUNT] le_formulas;
end_struct
board_configuration_s bc;
bit hasMapSensor
bit hasMapSensor;@see isMapAveragingEnabled
bit hasIatSensor
bit hasBaroSensor
bit hasAfrSensor
@ -426,6 +426,8 @@ bit hasMapSensor
bit isWaveAnalyzerEnabled
bit isIdleThreadEnabled
bit isPrintTriggerSynchDetails
bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed
uint32_t digitalChartSize;

View File

@ -534,7 +534,7 @@ fileVersion = { 20150112 }
table = fuelTableTbl, fuelTableMap, "Fuel Table", 1
; constant, variable
xBins = fuelRpmBins, rpm
yBins = fuelKeyBins, engineLoad
yBins = fuelLoadBins, engineLoad
zBins = fuelTable
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
@ -543,7 +543,7 @@ fileVersion = { 20150112 }
table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1
; constant, variable
xBins = ignitionRpmBins, rpm
yBins = ignitionKeyBins, engineLoad
yBins = ignitionLoadBins, engineLoad
zBins = ignitionTable
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
@ -619,7 +619,7 @@ fileVersion = { 20150112 }
; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg
; important status
indicator = { firmwareTsVersion == fileVersion }, "NOT COMPATIBLE", "", red, black, green, black
indicator = { firmwareTsVersion == fileVersion }, "NOT COMPATIBLE", "OK", red, black, green, black
indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black
indicator = { ind_ignition_enabled}, "no ignition", "ignition", red, black, green, black
indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black
@ -737,7 +737,7 @@ fileVersion = { 20150112 }
; Engine->Trigger configuration
dialog = triggerConfiguration, "Trigger configuration"
field = "Trigger type", trigger_type
field = "globalTriggerOffsetAngle", globalTriggerOffsetAngle
field = "globalTriggerAngleOffset", globalTriggerAngleOffset
field = "#Custom Trigger"
field = "Synchronization Needed?", isSynchronizationNeeded, {trigger_type == 0}
field = "total Tooth Count", totalToothCount, {trigger_type == 0}
@ -807,7 +807,7 @@ fileVersion = { 20150112 }
; Engine->MAP Sensor Settings
dialog = mapSensor, "Sensor Settings", xAxis
field = "Map type", mapSensorType
field = "Map type", map_sensor_type
field = "MAP at minimum voltage", map_sensor_valueAt0, { map_sensor_type == 0}
field = "MAP at maximum voltage", map_sensor_valueAt5, { map_sensor_type == 0}
@ -828,8 +828,8 @@ fileVersion = { 20150112 }
; Engine->Fan Settings
dialog = fanSetting, "Fan Settings"
field = "Fan On Temperature", FanONTemperature
field = "Fan Off Temperature", FanOffTemperature
field = "Fan On Temperature", fanOnTemperature
field = "Fan Off Temperature", fanOffTemperature
; Board->Board inputs
dialog = triggerInputs, "Trigger inputs", xAxis
@ -838,7 +838,7 @@ fileVersion = { 20150112 }
dialog = analogInputs, "Analog inputs"
field = "Analog Input Divider Coefficient", analogInputDividerCoefficient
field = "Battery Input Divider Coefficient", VBattDividerCoefficient
field = "Battery Input Divider Coefficient", vbattDividerCoeff
field = "TPS ADC input", tpsAdcInput
field = "CLT ADC input", cltAdcInput
field = "IAT ADC input", iatAdcInput