auto-sync
This commit is contained in:
parent
f348336907
commit
a428148b9c
|
@ -32,6 +32,19 @@
|
||||||
|
|
||||||
#define xxxxx 12
|
#define xxxxx 12
|
||||||
|
|
||||||
|
static const fsio_table_8x8_f32t vBattTarget = {
|
||||||
|
/* Generated by TS2C on Sat Jul 02 16:13:34 EDT 2016*/
|
||||||
|
{/* 0 20.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
{/* 1 30.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
{/* 2 40.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
{/* 3 60.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
{/* 4 70.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
{/* 5 90.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
{/* 6 100.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
{/* 7 120.000 *//* 0 650.0*/12.000, /* 1 800.0*/12.000, /* 2 1650.0*/13.000, /* 3 2500.0*/14.000, /* 4 3350.0*/15.000, /* 5 4200.0*/15.000, /* 6 5050.0*/15.000, /* 7 7000.0*/15.000, },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static const fuel_table_t alphaNfuel = {
|
static const fuel_table_t alphaNfuel = {
|
||||||
{/*0 engineLoad=0.00*/ /*0 800.0*/003.7, /*1 1213.0*/003.6, /*2 1626.0*/003.6, /*3 2040.0*/004.0, /*4 2453.0*/004.0, /*5 2866.0*/004.0, /*6 3280.0*/006.0, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
|
{/*0 engineLoad=0.00*/ /*0 800.0*/003.7, /*1 1213.0*/003.6, /*2 1626.0*/003.6, /*3 2040.0*/004.0, /*4 2453.0*/004.0, /*5 2866.0*/004.0, /*6 3280.0*/006.0, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
|
||||||
{/*1 engineLoad=6.66*/ /*0 800.0*/004.0, /*1 1213.0*/004.0, /*2 1626.0*/004.0, /*3 2040.0*/005.0, /*4 2453.0*/004.5, /*5 2866.0*/004.5, /*6 3280.0*/005.0, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
|
{/*1 engineLoad=6.66*/ /*0 800.0*/004.0, /*1 1213.0*/004.0, /*2 1626.0*/004.0, /*3 2040.0*/005.0, /*4 2453.0*/004.5, /*5 2866.0*/004.5, /*6 3280.0*/005.0, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
|
||||||
|
@ -272,6 +285,8 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
//setWholeTimingTable(12 PASS_ENGINE_PARAMETER);
|
//setWholeTimingTable(12 PASS_ENGINE_PARAMETER);
|
||||||
copyTimingTable(fromODB, config->ignitionTable);
|
copyTimingTable(fromODB, config->ignitionTable);
|
||||||
|
|
||||||
|
copy2DTable<FSIO_TABLE_8, FSIO_TABLE_8, float>(vBattTarget, config->fsioTable1);
|
||||||
|
|
||||||
copyFuelTable(veDodgeNeon2003Table, config->veTable);
|
copyFuelTable(veDodgeNeon2003Table, config->veTable);
|
||||||
//setMap(config->veTable, 50);
|
//setMap(config->veTable, 50);
|
||||||
|
|
||||||
|
@ -310,7 +325,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
* http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board
|
* http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board
|
||||||
*/
|
*/
|
||||||
// Frankenso low out #1: PE6 main relay
|
// Frankenso low out #1: PE6 main relay
|
||||||
// Frankenso low out #2: PE5 alternator field control
|
// Frankenso low out #2: PE5
|
||||||
// Frankenso low out #3: PD7 coolant fan relay
|
// Frankenso low out #3: PD7 coolant fan relay
|
||||||
// Frankenso low out #4: PC13 idle valve solenoid
|
// Frankenso low out #4: PC13 idle valve solenoid
|
||||||
// Frankenso low out #5: PE3 fuel pump relay
|
// Frankenso low out #5: PE3 fuel pump relay
|
||||||
|
@ -423,15 +438,22 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
// boardConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD
|
// boardConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD
|
||||||
boardConfiguration->clutchUpPinMode = PI_PULLUP;
|
boardConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||||
|
|
||||||
// alt GPIOC_12
|
engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator
|
||||||
|
engineConfiguration->auxPidFrequency[0] = 300;
|
||||||
|
|
||||||
|
engineConfiguration->isVerboseAuxPid = true;
|
||||||
|
engineConfiguration->auxPid1.offset = 10;
|
||||||
|
engineConfiguration->auxPid1.pFactor = 5;
|
||||||
|
engineConfiguration->auxPid1.iFactor = 0.1;
|
||||||
|
engineConfiguration->auxPid1.dFactor = 0.1;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* set_fsio_setting 0 0.11
|
|
||||||
*/
|
|
||||||
boardConfiguration->fsio_setting[0] = 0.2;
|
|
||||||
#if EFI_FSIO || defined(__DOXYGEN__)
|
#if EFI_FSIO || defined(__DOXYGEN__)
|
||||||
boardConfiguration->fsio_setting[0] = 0.55;
|
// /**
|
||||||
setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER);
|
// * set_fsio_setting 0 0.55
|
||||||
|
// */
|
||||||
|
// boardConfiguration->fsio_setting[0] = 0.55;
|
||||||
|
// setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
||||||
|
@ -446,7 +468,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
boardConfiguration->tunerStudioSerialSpeed = 19200;
|
boardConfiguration->tunerStudioSerialSpeed = 19200;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||||
|
|
||||||
boardConfiguration->alternatorControlPin = GPIOD_5;
|
//temp boardConfiguration->alternatorControlPin = GPIOD_5;
|
||||||
engineConfiguration->targetVBatt = 14.5;
|
engineConfiguration->targetVBatt = 14.5;
|
||||||
engineConfiguration->alternatorControl.offset = 10;
|
engineConfiguration->alternatorControl.offset = 10;
|
||||||
engineConfiguration->alternatorControl.pFactor = 5;
|
engineConfiguration->alternatorControl.pFactor = 5;
|
||||||
|
|
|
@ -657,6 +657,8 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
for (int i = 0; i < EGT_CHANNEL_COUNT; i++) {
|
for (int i = 0; i < EGT_CHANNEL_COUNT; i++) {
|
||||||
boardConfiguration->max31855_cs[i] = GPIO_UNASSIGNED;
|
boardConfiguration->max31855_cs[i] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
engineConfiguration->alternatorPwmFrequency = 300;
|
||||||
for (int i = 0; i < AUX_PID_COUNT; i++) {
|
for (int i = 0; i < AUX_PID_COUNT; i++) {
|
||||||
engineConfiguration->auxPidPins[i] = GPIO_UNASSIGNED;
|
engineConfiguration->auxPidPins[i] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#define LE_COMMAND_LENGTH 200
|
#define LE_COMMAND_LENGTH 200
|
||||||
#define FSIO_ADC_COUNT 4
|
#define FSIO_ADC_COUNT 4
|
||||||
#define TS_FILE_VERSION 20160430
|
#define TS_FILE_VERSION 20160702
|
||||||
#define WARMUP_TARGET_AFR_SIZE 4
|
#define WARMUP_TARGET_AFR_SIZE 4
|
||||||
#define MAP_ANGLE_SIZE 8
|
#define MAP_ANGLE_SIZE 8
|
||||||
#define MAP_WINDOW_SIZE 8
|
#define MAP_WINDOW_SIZE 8
|
||||||
|
|
|
@ -126,6 +126,15 @@ void Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE, vType>::setAll(vType value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE, typename vType>
|
||||||
|
void copy2DTable(const vType source[LOAD_BIN_SIZE][RPM_BIN_SIZE], vType destination[LOAD_BIN_SIZE][RPM_BIN_SIZE]) {
|
||||||
|
for (int k = 0; k < LOAD_BIN_SIZE; k++) {
|
||||||
|
for (int rpmIndex = 0; rpmIndex < RPM_BIN_SIZE; rpmIndex++) {
|
||||||
|
destination[k][rpmIndex] = source[k][rpmIndex];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AFR value is packed into uint8_t with a multiplier of 10
|
* AFR value is packed into uint8_t with a multiplier of 10
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,7 +21,7 @@ struct_no_prefix engine_configuration_s
|
||||||
!
|
!
|
||||||
! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
|
! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
|
||||||
! so not forget to change fileVersion in rusefi.ini
|
! so not forget to change fileVersion in rusefi.ini
|
||||||
#define TS_FILE_VERSION 20160430
|
#define TS_FILE_VERSION 20160702
|
||||||
|
|
||||||
#define WARMUP_TARGET_AFR_SIZE 4
|
#define WARMUP_TARGET_AFR_SIZE 4
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,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 automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jul 02 13:56:26 EDT 2016
|
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jul 02 16:24:07 EDT 2016
|
||||||
|
|
||||||
pageSize = 16376
|
pageSize = 16376
|
||||||
page = 1
|
page = 1
|
||||||
|
@ -741,7 +741,7 @@ page = 1
|
||||||
[OutputChannels]
|
[OutputChannels]
|
||||||
|
|
||||||
; see TS_FILE_VERSION in firmware code
|
; see TS_FILE_VERSION in firmware code
|
||||||
fileVersion = { 20160430 }
|
fileVersion = { 20160702 }
|
||||||
|
|
||||||
ochGetCommand = "O"
|
ochGetCommand = "O"
|
||||||
|
|
||||||
|
@ -1665,6 +1665,9 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
|
||||||
field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1}
|
field = "P factor", auxPid1_pFactor, {activateAuxPid1 == 1}
|
||||||
field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1}
|
field = "I factor", auxPid1_iFactor, {activateAuxPid1 == 1}
|
||||||
field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1}
|
field = "D factor", auxPid1_dFactor, {activateAuxPid1 == 1}
|
||||||
|
field = "FSIO pin #2", auxPidPins2
|
||||||
|
field = "FSIO pin #3", auxPidPins3
|
||||||
|
field = "FSIO pin #4", auxPidPins4
|
||||||
|
|
||||||
; Engine->Battery & Alternator
|
; Engine->Battery & Alternator
|
||||||
dialog = batteryDialog, "Battery Settings", yAxis
|
dialog = batteryDialog, "Battery Settings", yAxis
|
||||||
|
@ -1676,6 +1679,7 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
|
||||||
field = "Target", targetVBatt, {isAlternatorControlEnabled == 1}
|
field = "Target", targetVBatt, {isAlternatorControlEnabled == 1}
|
||||||
field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1}
|
field = "Pin", alternatorControlPin, {isAlternatorControlEnabled == 1}
|
||||||
field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1}
|
field = "Pin Mode", alternatorControlPinMode, {isAlternatorControlEnabled == 1}
|
||||||
|
field = "PWM frequency", alternatorPwmFrequency, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0}
|
||||||
field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1}
|
field = "Off Above TPS", alternatorOffAboveTps, {isAlternatorControlEnabled == 1}
|
||||||
field = "Verbose", isVerboseAlternator, {isAlternatorControlEnabled == 1}
|
field = "Verbose", isVerboseAlternator, {isAlternatorControlEnabled == 1}
|
||||||
field = "control period", alternatorDT, {isAlternatorControlEnabled == 1}
|
field = "control period", alternatorDT, {isAlternatorControlEnabled == 1}
|
||||||
|
|
|
@ -93,6 +93,7 @@ public enum Sensor {
|
||||||
DWELL(SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
DWELL(SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
||||||
actualLastInjection(SensorCategory.FUEL, FieldType.FLOAT, 64, BackgroundColor.MUD, 0, 30, "ms"),
|
actualLastInjection(SensorCategory.FUEL, FieldType.FLOAT, 64, BackgroundColor.MUD, 0, 30, "ms"),
|
||||||
VSS(SensorCategory.OPERATIONS, FieldType.FLOAT, 76, BackgroundColor.BLUE),
|
VSS(SensorCategory.OPERATIONS, FieldType.FLOAT, 76, BackgroundColor.BLUE),
|
||||||
|
FIRMWARE_VERSION(SensorCategory.OPERATIONS, FieldType.INT, 84, BackgroundColor.BLUE),
|
||||||
CURRENT_VE(SensorCategory.FUEL, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
CURRENT_VE(SensorCategory.FUEL, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
||||||
|
|
||||||
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
package com.rusefi;
|
package com.rusefi;
|
||||||
|
|
||||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||||
|
import com.rusefi.config.Fields;
|
||||||
import com.rusefi.core.EngineState;
|
import com.rusefi.core.EngineState;
|
||||||
import com.rusefi.core.MessagesCentral;
|
import com.rusefi.core.MessagesCentral;
|
||||||
|
import com.rusefi.core.Sensor;
|
||||||
|
import com.rusefi.core.SensorCentral;
|
||||||
import com.rusefi.io.ConnectionStatus;
|
import com.rusefi.io.ConnectionStatus;
|
||||||
import com.rusefi.io.ConnectionWatchdog;
|
import com.rusefi.io.ConnectionWatchdog;
|
||||||
import com.rusefi.io.LinkManager;
|
import com.rusefi.io.LinkManager;
|
||||||
|
@ -46,6 +49,7 @@ public class Launcher {
|
||||||
// todo: the logic around 'fatalError' could be implemented nicer
|
// todo: the logic around 'fatalError' could be implemented nicer
|
||||||
private String fatalError;
|
private String fatalError;
|
||||||
public static EngineSnifferPanel engineSnifferPanel;
|
public static EngineSnifferPanel engineSnifferPanel;
|
||||||
|
private static SensorCentral.SensorListener wrongVersionListener;
|
||||||
|
|
||||||
private final JTabbedPane tabbedPane = new JTabbedPane() {
|
private final JTabbedPane tabbedPane = new JTabbedPane() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -254,6 +258,20 @@ public class Launcher {
|
||||||
if (result == JOptionPane.NO_OPTION)
|
if (result == JOptionPane.NO_OPTION)
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
}
|
}
|
||||||
|
wrongVersionListener = new SensorCentral.SensorListener() {
|
||||||
|
@Override
|
||||||
|
public void onSensorUpdate(double value) {
|
||||||
|
if (value != Fields.TS_FILE_VERSION) {
|
||||||
|
String message = "This copy of rusEfi console is not compatible with this version of firmware\r\n" +
|
||||||
|
"Console compatible with " + Fields.TS_FILE_VERSION + " while firmware compatible with " +
|
||||||
|
(int)value;
|
||||||
|
JOptionPane.showMessageDialog(Launcher.getFrame(), message);
|
||||||
|
assert wrongVersionListener != null;
|
||||||
|
SensorCentral.getInstance().removeListener(Sensor.FIRMWARE_VERSION, wrongVersionListener);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
SensorCentral.getInstance().addListener(Sensor.FIRMWARE_VERSION, wrongVersionListener);
|
||||||
JustOneInstance.onStart();
|
JustOneInstance.onStart();
|
||||||
try {
|
try {
|
||||||
boolean isPortDefined = args.length > 0;
|
boolean isPortDefined = args.length > 0;
|
||||||
|
|
Loading…
Reference in New Issue