parent
de81a2c2f7
commit
1a2c294d1d
|
@ -146,8 +146,10 @@ typedef struct {
|
||||||
int timeSeconds; // 224
|
int timeSeconds; // 224
|
||||||
float engineLoadDelta; // 228
|
float engineLoadDelta; // 228
|
||||||
float speedToRpmRatio; // 232
|
float speedToRpmRatio; // 232
|
||||||
int warningCounter; // 236
|
int16_t warningCounter; // 236
|
||||||
int lastErrorCode; // 240
|
int16_t unused_238;
|
||||||
|
int16_t lastErrorCode; // 240
|
||||||
|
int16_t unused_242;
|
||||||
/**
|
/**
|
||||||
* Microcontroller own internal temperature, C
|
* Microcontroller own internal temperature, C
|
||||||
*/
|
*/
|
||||||
|
@ -169,7 +171,8 @@ typedef struct {
|
||||||
float injectionOffset; // 288
|
float injectionOffset; // 288
|
||||||
int16_t debugIntField4; // 292
|
int16_t debugIntField4; // 292
|
||||||
int16_t debugIntField5; // 294
|
int16_t debugIntField5; // 294
|
||||||
int unused3[15];
|
int16_t recentErrorCodes[8]; // 298
|
||||||
|
int unused3[11];
|
||||||
/* see also [OutputChannels] in rusefi.input */
|
/* see also [OutputChannels] in rusefi.input */
|
||||||
} TunerStudioOutputChannels;
|
} TunerStudioOutputChannels;
|
||||||
|
|
||||||
|
|
|
@ -911,6 +911,9 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
|
|
||||||
tsOutputChannels->warningCounter = engine->engineState.warnings.warningCounter;
|
tsOutputChannels->warningCounter = engine->engineState.warnings.warningCounter;
|
||||||
tsOutputChannels->lastErrorCode = engine->engineState.warnings.lastErrorCode;
|
tsOutputChannels->lastErrorCode = engine->engineState.warnings.lastErrorCode;
|
||||||
|
for (int i = 0; i < 8;i++) {
|
||||||
|
tsOutputChannels->recentErrorCodes[i] = engine->engineState.warnings.recentWarnings.get(i);
|
||||||
|
}
|
||||||
|
|
||||||
tsOutputChannels->knockNowIndicator = engine->knockCount > 0;
|
tsOutputChannels->knockNowIndicator = engine->knockCount > 0;
|
||||||
tsOutputChannels->knockEverIndicator = engine->knockEver;
|
tsOutputChannels->knockEverIndicator = engine->knockEver;
|
||||||
|
|
|
@ -63,7 +63,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 Sun Jan 13 19:36:29 EST 2019
|
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 13 20:26:55 EST 2019
|
||||||
|
|
||||||
pageSize = 20000
|
pageSize = 20000
|
||||||
page = 1
|
page = 1
|
||||||
|
@ -1101,8 +1101,10 @@ fileVersion = { 20171101 }
|
||||||
debugIntField3 = scalar, U32, 220, "val", 1, 0.0;
|
debugIntField3 = scalar, U32, 220, "val", 1, 0.0;
|
||||||
engineLoadDelta = scalar,F32, 228, "value", 1, 0
|
engineLoadDelta = scalar,F32, 228, "value", 1, 0
|
||||||
speedToRpmRatio = scalar,F32, 232, "value", 1, 0
|
speedToRpmRatio = scalar,F32, 232, "value", 1, 0
|
||||||
warningCounter = scalar,U32, 236, "count", 1, 0
|
warningCounter = scalar,U16, 236, "count", 1, 0
|
||||||
lastErrorCode = scalar,U32, 240, "error", 1, 0
|
|
||||||
|
lastErrorCode = scalar,U16, 240, "error", 1, 0
|
||||||
|
|
||||||
internalMcuTemperature = scalar,F32, 244, "C", 1, 0
|
internalMcuTemperature = scalar,F32, 244, "C", 1, 0
|
||||||
vvtPosition = scalar,F32, 248, "deg", 1, 0
|
vvtPosition = scalar,F32, 248, "deg", 1, 0
|
||||||
engineMode = scalar, U32, 252, "em", 1, 0.0;
|
engineMode = scalar, U32, 252, "em", 1, 0.0;
|
||||||
|
@ -1118,6 +1120,14 @@ fileVersion = { 20171101 }
|
||||||
injectionOffset = scalar, F32, 288, "deg", 1, 0;
|
injectionOffset = scalar, F32, 288, "deg", 1, 0;
|
||||||
debugIntField4 = scalar, S16, 292, "val", 1, 0.0;
|
debugIntField4 = scalar, S16, 292, "val", 1, 0.0;
|
||||||
debugIntField5 = scalar, S16, 294, "val", 1, 0.0;
|
debugIntField5 = scalar, S16, 294, "val", 1, 0.0;
|
||||||
|
recentErrorCode0 = scalar,U16, 298, "error", 1, 0
|
||||||
|
recentErrorCode1 = scalar,U16, 300, "error", 1, 0
|
||||||
|
recentErrorCode2 = scalar,U16, 302, "error", 1, 0
|
||||||
|
recentErrorCode3 = scalar,U16, 304, "error", 1, 0
|
||||||
|
recentErrorCode4 = scalar,U16, 306, "error", 1, 0
|
||||||
|
recentErrorCode5 = scalar,U16, 308, "error", 1, 0
|
||||||
|
recentErrorCode6 = scalar,U16, 310, "error", 1, 0
|
||||||
|
recentErrorCode7 = scalar,U16, 312, "error", 1, 0
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -1585,7 +1595,15 @@ fileVersion = { 20171101 }
|
||||||
|
|
||||||
speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4
|
speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4
|
||||||
warningCounterGauge = warningCounter, "warn", "", 0, 100, 0, 0, 100, 100, 0, 0
|
warningCounterGauge = warningCounter, "warn", "", 0, 100, 0, 0, 100, 100, 0, 0
|
||||||
lastErrorCodeGauge = lastErrorCode, "error", "", 0, 8000, 0, 0, 8000, 8000, 0, 0
|
lastErrorCodeGauge = lastErrorCode, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode0Gauge = recentErrorCode0, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode1Gauge = recentErrorCode1, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode2Gauge = recentErrorCode2, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode3Gauge = recentErrorCode3, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode4Gauge = recentErrorCode4, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode5Gauge = recentErrorCode5, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode6Gauge = recentErrorCode6, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode7Gauge = recentErrorCode7, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
|
||||||
gaugeCategory = Debug
|
gaugeCategory = Debug
|
||||||
debugFloatField1Gauge = debugFloatField1, "debug f1", "%", 0, 100, 0, 0, 100, 100, 4, 4
|
debugFloatField1Gauge = debugFloatField1, "debug f1", "%", 0, 100, 0, 0, 100, 100, 4, 4
|
||||||
|
@ -1837,6 +1855,14 @@ gaugeCategory = Fuel Data
|
||||||
entry = engineMode, "Engine Mode",int,"%d"
|
entry = engineMode, "Engine Mode",int,"%d"
|
||||||
entry = warningCounter, "warning: counter",int,"%d"
|
entry = warningCounter, "warning: counter",int,"%d"
|
||||||
entry = lastErrorCode, "warning: last",int,"%d"
|
entry = lastErrorCode, "warning: last",int,"%d"
|
||||||
|
entry = recentErrorCode0, "error 0",int,"%d"
|
||||||
|
entry = recentErrorCode1, "error 1",int,"%d"
|
||||||
|
entry = recentErrorCode2, "error 2",int,"%d"
|
||||||
|
entry = recentErrorCode3, "error 3",int,"%d"
|
||||||
|
entry = recentErrorCode4, "error 4",int,"%d"
|
||||||
|
entry = recentErrorCode5, "error 5",int,"%d"
|
||||||
|
entry = recentErrorCode6, "error 6",int,"%d"
|
||||||
|
entry = recentErrorCode7, "error 7",int,"%d"
|
||||||
entry = internalMcuTemperature, "CPU Temperature",float,"%.2f"
|
entry = internalMcuTemperature, "CPU Temperature",float,"%.2f"
|
||||||
|
|
||||||
entry = tCharge, "tCharge",float,"%.3f"
|
entry = tCharge, "tCharge",float,"%.3f"
|
||||||
|
|
|
@ -245,8 +245,10 @@ fileVersion = { 20171101 }
|
||||||
debugIntField3 = scalar, U32, 220, "val", 1, 0.0;
|
debugIntField3 = scalar, U32, 220, "val", 1, 0.0;
|
||||||
engineLoadDelta = scalar,F32, 228, "value", 1, 0
|
engineLoadDelta = scalar,F32, 228, "value", 1, 0
|
||||||
speedToRpmRatio = scalar,F32, 232, "value", 1, 0
|
speedToRpmRatio = scalar,F32, 232, "value", 1, 0
|
||||||
warningCounter = scalar,U32, 236, "count", 1, 0
|
warningCounter = scalar,U16, 236, "count", 1, 0
|
||||||
lastErrorCode = scalar,U32, 240, "error", 1, 0
|
|
||||||
|
lastErrorCode = scalar,U16, 240, "error", 1, 0
|
||||||
|
|
||||||
internalMcuTemperature = scalar,F32, 244, "C", 1, 0
|
internalMcuTemperature = scalar,F32, 244, "C", 1, 0
|
||||||
vvtPosition = scalar,F32, 248, "deg", 1, 0
|
vvtPosition = scalar,F32, 248, "deg", 1, 0
|
||||||
engineMode = scalar, U32, 252, "em", 1, 0.0;
|
engineMode = scalar, U32, 252, "em", 1, 0.0;
|
||||||
|
@ -262,6 +264,14 @@ fileVersion = { 20171101 }
|
||||||
injectionOffset = scalar, F32, 288, "deg", 1, 0;
|
injectionOffset = scalar, F32, 288, "deg", 1, 0;
|
||||||
debugIntField4 = scalar, S16, 292, "val", 1, 0.0;
|
debugIntField4 = scalar, S16, 292, "val", 1, 0.0;
|
||||||
debugIntField5 = scalar, S16, 294, "val", 1, 0.0;
|
debugIntField5 = scalar, S16, 294, "val", 1, 0.0;
|
||||||
|
recentErrorCode0 = scalar,U16, 298, "error", 1, 0
|
||||||
|
recentErrorCode1 = scalar,U16, 300, "error", 1, 0
|
||||||
|
recentErrorCode2 = scalar,U16, 302, "error", 1, 0
|
||||||
|
recentErrorCode3 = scalar,U16, 304, "error", 1, 0
|
||||||
|
recentErrorCode4 = scalar,U16, 306, "error", 1, 0
|
||||||
|
recentErrorCode5 = scalar,U16, 308, "error", 1, 0
|
||||||
|
recentErrorCode6 = scalar,U16, 310, "error", 1, 0
|
||||||
|
recentErrorCode7 = scalar,U16, 312, "error", 1, 0
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -729,7 +739,15 @@ fileVersion = { 20171101 }
|
||||||
|
|
||||||
speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4
|
speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4
|
||||||
warningCounterGauge = warningCounter, "warn", "", 0, 100, 0, 0, 100, 100, 0, 0
|
warningCounterGauge = warningCounter, "warn", "", 0, 100, 0, 0, 100, 100, 0, 0
|
||||||
lastErrorCodeGauge = lastErrorCode, "error", "", 0, 8000, 0, 0, 8000, 8000, 0, 0
|
lastErrorCodeGauge = lastErrorCode, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode0Gauge = recentErrorCode0, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode1Gauge = recentErrorCode1, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode2Gauge = recentErrorCode2, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode3Gauge = recentErrorCode3, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode4Gauge = recentErrorCode4, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode5Gauge = recentErrorCode5, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode6Gauge = recentErrorCode6, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
recentErrorCode7Gauge = recentErrorCode7, "error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
|
||||||
|
|
||||||
gaugeCategory = Debug
|
gaugeCategory = Debug
|
||||||
debugFloatField1Gauge = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@, "%", 0, 100, 0, 0, 100, 100, 4, 4
|
debugFloatField1Gauge = debugFloatField1, @@GAUGE_NAME_DEBUG_F1@@, "%", 0, 100, 0, 0, 100, 100, 4, 4
|
||||||
|
@ -981,6 +999,14 @@ gaugeCategory = Fuel Data
|
||||||
entry = engineMode, "Engine Mode",int,"%d"
|
entry = engineMode, "Engine Mode",int,"%d"
|
||||||
entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d"
|
entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d"
|
||||||
entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d"
|
entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d"
|
||||||
|
entry = recentErrorCode0, "error 0",int,"%d"
|
||||||
|
entry = recentErrorCode1, "error 1",int,"%d"
|
||||||
|
entry = recentErrorCode2, "error 2",int,"%d"
|
||||||
|
entry = recentErrorCode3, "error 3",int,"%d"
|
||||||
|
entry = recentErrorCode4, "error 4",int,"%d"
|
||||||
|
entry = recentErrorCode5, "error 5",int,"%d"
|
||||||
|
entry = recentErrorCode6, "error 6",int,"%d"
|
||||||
|
entry = recentErrorCode7, "error 7",int,"%d"
|
||||||
entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f"
|
entry = internalMcuTemperature, @@GAUGE_NAME_CPU_TEMP@@,float,"%.2f"
|
||||||
|
|
||||||
entry = tCharge, "tCharge",float,"%.3f"
|
entry = tCharge, "tCharge",float,"%.3f"
|
||||||
|
|
|
@ -71,6 +71,7 @@ cyclic_buffer<T, maxSize>::cyclic_buffer(int size) {
|
||||||
template<typename T, size_t maxSize>
|
template<typename T, size_t maxSize>
|
||||||
void cyclic_buffer<T, maxSize>::baseC(int size) {
|
void cyclic_buffer<T, maxSize>::baseC(int size) {
|
||||||
currentIndex = 0;
|
currentIndex = 0;
|
||||||
|
memset(elements, 0, sizeof(elements));
|
||||||
setSize(size);
|
setSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue