auto-sync

This commit is contained in:
rusEfi 2015-02-16 23:04:20 -06:00
parent 170c29a7b5
commit 4d71fd1aea
6 changed files with 34 additions and 18 deletions

View File

@ -517,6 +517,8 @@ static THD_WORKING_AREA(tsThreadStack, UTILITY_THREAD_STACK_SIZE);
#if EFI_TUNER_STUDIO
extern Map3D1616 veMap;
void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputChannels) {
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
int rpm = getRpmE(engine);
@ -543,6 +545,7 @@ void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputC
tsOutputChannels->throttlePositon = tps;
tsOutputChannels->massAirFlowVoltage = getMaf();
tsOutputChannels->massAirFlowValue = getRealMaf();
tsOutputChannels->massAirFlowValue = veMap.getValue(getMap(), rpm);
tsOutputChannels->airFuelRatio = getAfr();
tsOutputChannels->v_batt = getVBatt(engineConfiguration);
tsOutputChannels->tpsADC = getTPS10bitAdc(PASS_ENGINE_PARAMETER_F);

View File

@ -16,10 +16,10 @@
/**
* this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
*/
#define TS_FILE_VERSION 20150211
#define TS_FILE_VERSION 20150216
#define PAGE_0_SIZE 15160
#define TS_OUTPUT_SIZE 116
#define TS_OUTPUT_SIZE 196
typedef struct {
uint16_t values[EGT_CHANNEL_COUNT];
@ -82,7 +82,8 @@ typedef struct {
egt_values_s egtValues;
float rpmAcceleration;
float massAirFlowValue;
int unused3[1];
float veValue;
int unused3[20];
} TunerStudioOutputChannels;
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */

View File

@ -22,7 +22,7 @@
#define rpmMin 500
#define rpmMax 8000
static Map3D1616 veMap;
Map3D1616 veMap;
Map3D1616 ve2Map;
Map3D1616 afrMap;

View File

@ -18,7 +18,7 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
s->gapBothDirections = true;
// are these non-default values really needed here now that the gap is finally precise?
s->setTriggerSynchronizationGap2(0.8 * CHRYSLER_NGC_GAP, 1.55 * CHRYSLER_NGC_GAP);
s->setTriggerSynchronizationGap2(0.5 * CHRYSLER_NGC_GAP, 1.5 * CHRYSLER_NGC_GAP);
/*
s->addEvent(base + 26, T_PRIMARY, TV_HIGH);

View File

@ -505,12 +505,12 @@ page = 1
[OutputChannels]
; see TS_FILE_VERSION in firmware code
fileVersion = { 20150211 }
fileVersion = { 20150216 }
ochGetCommand = "O"
ochBlockSize = 116
ochBlockSize = 196
rpm = scalar, U32, 0, "RPM", 1, 0.00000
#if CELSIUS
@ -572,7 +572,9 @@ fileVersion = { 20150211 }
egt7 = scalar, S16, 100, "°C", 1, 0
egt8 = scalar, S16, 102, "°C", 1, 0
rpmAcceleration = scalar, F32, 104, "dRpm", 1, 0
egoCorrection = { 1 }
massAirFlowValue= scalar, F32, 108, "Kg/h", 1, 0
veValue = scalar, F32, 112, "ratio", 1, 0
egoCorrection = { 1 }
time = { timeNow }
; engineLoad = { algorithm == 0 ? MAF : TPS }
@ -740,9 +742,11 @@ fileVersion = { 20150211 }
egt6Gauge = egt6, "EGT#6", "C", 0, 2000
egt7Gauge = egt7, "EGT#7", "C", 0, 2000
egt8Gauge = egt8, "EGT#8", "C", 0, 2000
vssGauge = vehicleSpeedKph, "Speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1
rpmAccelerationGa = rpmAcceleration, "rpm d", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1
vssGauge = vehicleSpeedKph, "Speed", "kmh", 0, 200, 0, 1, 3, 4, 1, 1
rpmAccelerationGa = rpmAcceleration, "rpm d", "dRpm", 0, 3, 0, 1, 3, 4, 1, 1
massAirFlowValueGa = massAirFlowValue,"Air Flow", "kg/hr", 0, 50, -999, -999, 999, 999, 1, 1
veValueGauge = veValue, "ratio", "", 5, 25, 9, 9, 20, 20, 1, 1
[FrontPage]
; Gauges are numbered left to right, top to bottom.
;
@ -802,6 +806,8 @@ fileVersion = { 20150211 }
entry = ign_adv, "ignAdv", float, "%.2f"
entry = vehicleSpeedKph, "speed", float, "%.2f"
entry = rpmAcceleration, "dRPM", float, "%.3f"
entry = massAirFlowValue,"Mass", float, "%.3f"
entry = veValue, "ratio", float, "%.3f"
; tpsADC = U16, "ADC",
@ -1233,4 +1239,4 @@ fileVersion = { 20150211 }
dialog = fsioDialog, "FSIO", border
panel = fsioIO, West
panel = fsioFrequency, Center
panel = fsioSetting, East
panel = fsioSetting, East

View File

@ -41,12 +41,18 @@ public class AnalogChartPanel {
AnalogChartCentral.addListener(new AnalogChartCentral.AnalogChartListener() {
@Override
public void onAnalogChart(String message) {
unpackValues(values, message);
if (!paused) {
processValues();
UiUtils.trueRepaint(canvas);
}
public void onAnalogChart(final String message) {
// this callback is invoked from the connectivity thread, need to handle in AWT for thread-safety
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
unpackValues(values, message);
if (!paused) {
processValues();
UiUtils.trueRepaint(canvas);
}
}
});
}
});