multi-channel Tuner Studio tooth logger #1284

This commit is contained in:
rusefi 2020-04-13 20:47:54 -04:00
parent 412fea4648
commit 5f1e4666e2
12 changed files with 253 additions and 64 deletions

View File

@ -441,9 +441,9 @@
#define coastingFuelCutTps_offset_hex c50 #define coastingFuelCutTps_offset_hex c50
#define communicationLedPin_offset 1812 #define communicationLedPin_offset 1812
#define communicationLedPin_offset_hex 714 #define communicationLedPin_offset_hex 714
#define COMPOSITE_DATA_LENGTH 2000 #define COMPOSITE_DATA_LENGTH 2500
#define COMPOSITE_PACKET_COUNT 1000 #define COMPOSITE_PACKET_COUNT 500
#define COMPOSITE_PACKET_SIZE 2 #define COMPOSITE_PACKET_SIZE 5
#define CONSOLE_DATA_PROTOCOL_TAG " @" #define CONSOLE_DATA_PROTOCOL_TAG " @"
#define consoleLoopPeriodMs_offset 716 #define consoleLoopPeriodMs_offset 716
#define consoleLoopPeriodMs_offset_hex 2cc #define consoleLoopPeriodMs_offset_hex 2cc
@ -1965,6 +1965,9 @@
#define todoClutchDownPinInverted_offset_hex 3d0 #define todoClutchDownPinInverted_offset_hex 3d0
#define todoClutchUpPinInverted_offset 976 #define todoClutchUpPinInverted_offset 976
#define todoClutchUpPinInverted_offset_hex 3d0 #define todoClutchUpPinInverted_offset_hex 3d0
#define TOOTH_DATA_LENGTH 2000
#define TOOTH_PACKET_COUNT 1000
#define TOOTH_PACKET_SIZE 2
#define TOP_DEAD_CENTER_MESSAGE "r" #define TOP_DEAD_CENTER_MESSAGE "r"
#define TOTAL_CONFIG_SIZE 20000 #define TOTAL_CONFIG_SIZE 20000
#define TOTAL_CONFIG_SIZE_hex 4e20 #define TOTAL_CONFIG_SIZE_hex 4e20

View File

@ -16,17 +16,51 @@
#include "efilib.h" #include "efilib.h"
#include "tunerstudio_configuration.h" #include "tunerstudio_configuration.h"
static uint16_t buffer[1000] CCM_OPTIONAL; typedef struct __attribute__ ((packed)) {
uint16_t timestamp;
} tooth_logger_s;
typedef struct __attribute__ ((packed)) {
// the whole order of all packet bytes is reversed, not just the 'endian-swap' integers
uint32_t timestamp;
// unfortunately all these fields are required by TS...
bool priLevel : 1;
bool secLevel : 1;
bool trigger : 1;
bool sync : 1;
} composite_logger_s;
static composite_logger_s buffer[COMPOSITE_PACKET_COUNT] CCM_OPTIONAL;
static size_t NextIdx = 0; static size_t NextIdx = 0;
static volatile bool ToothLoggerEnabled = false; static volatile bool ToothLoggerEnabled = false;
static uint32_t lastEdgeTimestamp = 0; static uint32_t lastEdgeTimestamp = 0;
void SetNextEntry(uint16_t entry) { static bool trigger1 = false;
static bool trigger2 = false;
//char (*__kaboom)[sizeof( composite_logger_s )] = 1;
//char (*__kaboom)[sizeof( buffer )] = 1;
//void SetNextToothEntry(uint16_t entry) {
// TS uses big endian, grumble // TS uses big endian, grumble
buffer[NextIdx] = SWAP_UINT16(entry); // buffer[NextIdx] = SWAP_UINT16(entry);
//NextIdx++;
static void SetNextCompositeEntry(uint32_t nowUs, bool trigger1, bool trigger2) {
// TS uses big endian, grumble
buffer[NextIdx].timestamp = SWAP_UINT32(nowUs);
buffer[NextIdx].priLevel = trigger1;
buffer[NextIdx].secLevel = trigger2;
// todo:
//buffer[NextIdx].sync = isSynced;
//buffer[NextIdx].trigger = wtfIsTriggerIdk;
NextIdx++; NextIdx++;
static_assert(sizeof(composite_logger_s) == COMPOSITE_PACKET_SIZE, "composite packet size");
// If we hit the end, loop // If we hit the end, loop
if (NextIdx >= sizeof(buffer) / sizeof(buffer[0])) { if (NextIdx >= sizeof(buffer) / sizeof(buffer[0])) {
NextIdx = 0; NextIdx = 0;
@ -39,19 +73,41 @@ void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp) {
return; return;
} }
// We currently only support the primary trigger falling edge /*
// (this is the edge that VR sensors are accurate on) // We currently only support the primary trigger falling edge
// Since VR sensors are the most useful case here, this is okay for now. // (this is the edge that VR sensors are accurate on)
if (tooth != SHAFT_PRIMARY_FALLING) { // Since VR sensors are the most useful case here, this is okay for now.
return; if (tooth != SHAFT_PRIMARY_FALLING) {
return;
}
uint32_t nowUs = NT2US(timestamp);
// 10us per LSB - this gives plenty of accuracy, yet fits 655.35 ms in to a uint16
uint16_t delta = static_cast<uint16_t>((nowUs - lastEdgeTimestamp) / 10);
lastEdgeTimestamp = nowUs;
SetNextEntry(delta);
*/
switch (tooth) {
case SHAFT_PRIMARY_FALLING:
trigger1 = false;
break;
case SHAFT_PRIMARY_RISING:
trigger1 = true;
break;
case SHAFT_SECONDARY_FALLING:
trigger2 = false;
break;
case SHAFT_SECONDARY_RISING:
trigger2 = true;
break;
default:
break;
} }
uint32_t nowUs = NT2US(timestamp); uint32_t nowUs = NT2US(timestamp);
// 10us per LSB - this gives plenty of accuracy, yet fits 655.35 ms in to a uint16 SetNextCompositeEntry(nowUs, trigger1, trigger2);
uint16_t delta = static_cast<uint16_t>((nowUs - lastEdgeTimestamp) / 10);
lastEdgeTimestamp = nowUs;
SetNextEntry(delta);
} }
void EnableToothLogger() { void EnableToothLogger() {

View File

@ -441,9 +441,9 @@
#define coastingFuelCutTps_offset_hex c50 #define coastingFuelCutTps_offset_hex c50
#define communicationLedPin_offset 1812 #define communicationLedPin_offset 1812
#define communicationLedPin_offset_hex 714 #define communicationLedPin_offset_hex 714
#define COMPOSITE_DATA_LENGTH 2000 #define COMPOSITE_DATA_LENGTH 2500
#define COMPOSITE_PACKET_COUNT 1000 #define COMPOSITE_PACKET_COUNT 500
#define COMPOSITE_PACKET_SIZE 2 #define COMPOSITE_PACKET_SIZE 5
#define CONSOLE_DATA_PROTOCOL_TAG " @" #define CONSOLE_DATA_PROTOCOL_TAG " @"
#define consoleLoopPeriodMs_offset 716 #define consoleLoopPeriodMs_offset 716
#define consoleLoopPeriodMs_offset_hex 2cc #define consoleLoopPeriodMs_offset_hex 2cc
@ -1965,6 +1965,9 @@
#define todoClutchDownPinInverted_offset_hex 3d0 #define todoClutchDownPinInverted_offset_hex 3d0
#define todoClutchUpPinInverted_offset 976 #define todoClutchUpPinInverted_offset 976
#define todoClutchUpPinInverted_offset_hex 3d0 #define todoClutchUpPinInverted_offset_hex 3d0
#define TOOTH_DATA_LENGTH 2000
#define TOOTH_PACKET_COUNT 1000
#define TOOTH_PACKET_SIZE 2
#define TOP_DEAD_CENTER_MESSAGE "r" #define TOP_DEAD_CENTER_MESSAGE "r"
#define TOTAL_CONFIG_SIZE 20000 #define TOTAL_CONFIG_SIZE 20000
#define TOTAL_CONFIG_SIZE_hex 4e20 #define TOTAL_CONFIG_SIZE_hex 4e20

View File

@ -76,8 +76,12 @@ struct_no_prefix engine_configuration_s
#define TRIGGER_TYPE_60_2 8 #define TRIGGER_TYPE_60_2 8
#define TRIGGER_TYPE_36_1 9 #define TRIGGER_TYPE_36_1 9
#define COMPOSITE_PACKET_COUNT 1000 #define TOOTH_PACKET_COUNT 1000
#define COMPOSITE_PACKET_SIZE 2 #define TOOTH_PACKET_SIZE 2
#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@
#define COMPOSITE_PACKET_COUNT 500
#define COMPOSITE_PACKET_SIZE 5
#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ #define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@
#define MAP_ANGLE_SIZE 8 #define MAP_ANGLE_SIZE 8

View File

@ -86,7 +86,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 rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:58:49 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 20:23:02 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -1275,22 +1275,39 @@ page = 1
[LoggerDefinition] [LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv ; valid logger types: composite, tooth, trigger, csv
loggerDef = compositeLogger, "Primary Trigger Logger", tooth ; loggerDef = compositeLogger, "Primary Trigger Logger", tooth
loggerDef = compositeLogger, "Trigger Logger", composite
startCommand = "l\x01" startCommand = "l\x01"
stopCommand = "l\x02" stopCommand = "l\x02"
dataReadCommand = "L" dataReadCommand = "L"
dataReadTimeout = 10000 ; time in ms dataReadTimeout = 10000 ; time in ms
dataReadyCondition = { toothLogReady } dataReadyCondition = { toothLogReady }
; each packet is 2 and we have 1000 of those continuousRead = true
dataLength = 2000 ; each packet is 5 and we have 500 of those
dataLength = 2500
;tooth
; recordDef = headerLen, footerLen, recordLen ; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 2 ; recordDef = 0, 0, 5
; uint16 that stores 1/100 second ; uint16 that stores 1/100 second
recordField = toothTime, "tooth", 0, 16, 0.01, "ms" ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms"
; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 5
; these names are hard-coded inside TS
recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag"
recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag"
recordField = trigger, "Trigger", 2, 1, 1.0, "Flag"
recordField = sync, "Sync", 3, 1, 1.0, "Flag"
recordField = time, "Time", 8, 32, 0.01, "ms"
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze] [VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition

View File

@ -109,22 +109,39 @@ enable2ndByteCanID = false
[LoggerDefinition] [LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv ; valid logger types: composite, tooth, trigger, csv
loggerDef = compositeLogger, "Primary Trigger Logger", tooth ; loggerDef = compositeLogger, "Primary Trigger Logger", tooth
loggerDef = compositeLogger, "Trigger Logger", composite
startCommand = "l\x01" startCommand = "l\x01"
stopCommand = "l\x02" stopCommand = "l\x02"
dataReadCommand = "L" dataReadCommand = "L"
dataReadTimeout = 10000 ; time in ms dataReadTimeout = 10000 ; time in ms
dataReadyCondition = { toothLogReady } dataReadyCondition = { toothLogReady }
continuousRead = true
; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those
dataLength = @@COMPOSITE_DATA_LENGTH@@ dataLength = @@COMPOSITE_DATA_LENGTH@@
;tooth
; recordDef = headerLen, footerLen, recordLen ; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ ; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@
; uint16 that stores 1/100 second ; uint16 that stores 1/100 second
recordField = toothTime, "tooth", 0, 16, 0.01, "ms" ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms"
; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@
; these names are hard-coded inside TS
recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag"
recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag"
recordField = trigger, "Trigger", 2, 1, 1.0, "Flag"
recordField = sync, "Sync", 3, 1, 1.0, "Flag"
recordField = time, "Time", 8, 32, 0.01, "ms"
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze] [VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition

View File

@ -86,7 +86,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 rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:59:01 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 20:23:08 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -1275,22 +1275,39 @@ page = 1
[LoggerDefinition] [LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv ; valid logger types: composite, tooth, trigger, csv
loggerDef = compositeLogger, "Primary Trigger Logger", tooth ; loggerDef = compositeLogger, "Primary Trigger Logger", tooth
loggerDef = compositeLogger, "Trigger Logger", composite
startCommand = "l\x01" startCommand = "l\x01"
stopCommand = "l\x02" stopCommand = "l\x02"
dataReadCommand = "L" dataReadCommand = "L"
dataReadTimeout = 10000 ; time in ms dataReadTimeout = 10000 ; time in ms
dataReadyCondition = { toothLogReady } dataReadyCondition = { toothLogReady }
; each packet is 2 and we have 1000 of those continuousRead = true
dataLength = 2000 ; each packet is 5 and we have 500 of those
dataLength = 2500
;tooth
; recordDef = headerLen, footerLen, recordLen ; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 2 ; recordDef = 0, 0, 5
; uint16 that stores 1/100 second ; uint16 that stores 1/100 second
recordField = toothTime, "tooth", 0, 16, 0.01, "ms" ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms"
; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 5
; these names are hard-coded inside TS
recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag"
recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag"
recordField = trigger, "Trigger", 2, 1, 1.0, "Flag"
recordField = sync, "Sync", 3, 1, 1.0, "Flag"
recordField = time, "Time", 8, 32, 0.01, "ms"
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze] [VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition

View File

@ -86,7 +86,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 rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Mon Apr 13 18:54:34 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Mon Apr 13 20:23:18 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -1275,22 +1275,39 @@ page = 1
[LoggerDefinition] [LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv ; valid logger types: composite, tooth, trigger, csv
loggerDef = compositeLogger, "Primary Trigger Logger", tooth ; loggerDef = compositeLogger, "Primary Trigger Logger", tooth
loggerDef = compositeLogger, "Trigger Logger", composite
startCommand = "l\x01" startCommand = "l\x01"
stopCommand = "l\x02" stopCommand = "l\x02"
dataReadCommand = "L" dataReadCommand = "L"
dataReadTimeout = 10000 ; time in ms dataReadTimeout = 10000 ; time in ms
dataReadyCondition = { toothLogReady } dataReadyCondition = { toothLogReady }
; each packet is 2 and we have 1000 of those continuousRead = true
dataLength = 2000 ; each packet is 5 and we have 500 of those
dataLength = 2500
;tooth
; recordDef = headerLen, footerLen, recordLen ; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 2 ; recordDef = 0, 0, 5
; uint16 that stores 1/100 second ; uint16 that stores 1/100 second
recordField = toothTime, "tooth", 0, 16, 0.01, "ms" ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms"
; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 5
; these names are hard-coded inside TS
recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag"
recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag"
recordField = trigger, "Trigger", 2, 1, 1.0, "Flag"
recordField = sync, "Sync", 3, 1, 1.0, "Flag"
recordField = time, "Time", 8, 32, 0.01, "ms"
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze] [VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition
@ -2919,6 +2936,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
dialog = allPins1_1 dialog = allPins1_1
field = mc33816_cs, mc33816_cs field = mc33816_cs, mc33816_cs
field = mc33816_rstb, mc33816_rstb field = mc33816_rstb, mc33816_rstb
field = mc33816_flag0, mc33816_flag0
field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1
field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2
field = mc33816_driven, mc33816_driven field = mc33816_driven, mc33816_driven

View File

@ -86,7 +86,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 rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:58:59 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 20:23:05 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -1275,22 +1275,39 @@ page = 1
[LoggerDefinition] [LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv ; valid logger types: composite, tooth, trigger, csv
loggerDef = compositeLogger, "Primary Trigger Logger", tooth ; loggerDef = compositeLogger, "Primary Trigger Logger", tooth
loggerDef = compositeLogger, "Trigger Logger", composite
startCommand = "l\x01" startCommand = "l\x01"
stopCommand = "l\x02" stopCommand = "l\x02"
dataReadCommand = "L" dataReadCommand = "L"
dataReadTimeout = 10000 ; time in ms dataReadTimeout = 10000 ; time in ms
dataReadyCondition = { toothLogReady } dataReadyCondition = { toothLogReady }
; each packet is 2 and we have 1000 of those continuousRead = true
dataLength = 2000 ; each packet is 5 and we have 500 of those
dataLength = 2500
;tooth
; recordDef = headerLen, footerLen, recordLen ; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 2 ; recordDef = 0, 0, 5
; uint16 that stores 1/100 second ; uint16 that stores 1/100 second
recordField = toothTime, "tooth", 0, 16, 0.01, "ms" ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms"
; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 5
; these names are hard-coded inside TS
recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag"
recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag"
recordField = trigger, "Trigger", 2, 1, 1.0, "Flag"
recordField = sync, "Sync", 3, 1, 1.0, "Flag"
recordField = time, "Time", 8, 32, 0.01, "ms"
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze] [VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition

View File

@ -86,7 +86,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 rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:59:03 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 20:23:12 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -1275,22 +1275,39 @@ page = 1
[LoggerDefinition] [LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv ; valid logger types: composite, tooth, trigger, csv
loggerDef = compositeLogger, "Primary Trigger Logger", tooth ; loggerDef = compositeLogger, "Primary Trigger Logger", tooth
loggerDef = compositeLogger, "Trigger Logger", composite
startCommand = "l\x01" startCommand = "l\x01"
stopCommand = "l\x02" stopCommand = "l\x02"
dataReadCommand = "L" dataReadCommand = "L"
dataReadTimeout = 10000 ; time in ms dataReadTimeout = 10000 ; time in ms
dataReadyCondition = { toothLogReady } dataReadyCondition = { toothLogReady }
; each packet is 2 and we have 1000 of those continuousRead = true
dataLength = 2000 ; each packet is 5 and we have 500 of those
dataLength = 2500
;tooth
; recordDef = headerLen, footerLen, recordLen ; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 2 ; recordDef = 0, 0, 5
; uint16 that stores 1/100 second ; uint16 that stores 1/100 second
recordField = toothTime, "tooth", 0, 16, 0.01, "ms" ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms"
; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 5
; these names are hard-coded inside TS
recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag"
recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag"
recordField = trigger, "Trigger", 2, 1, 1.0, "Flag"
recordField = sync, "Sync", 3, 1, 1.0, "Flag"
recordField = time, "Time", 8, 32, 0.01, "ms"
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze] [VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition

View File

@ -86,7 +86,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 rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:59:04 EDT 2020 ; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 20:23:15 EDT 2020
pageSize = 20000 pageSize = 20000
page = 1 page = 1
@ -1275,22 +1275,39 @@ page = 1
[LoggerDefinition] [LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv ; valid logger types: composite, tooth, trigger, csv
loggerDef = compositeLogger, "Primary Trigger Logger", tooth ; loggerDef = compositeLogger, "Primary Trigger Logger", tooth
loggerDef = compositeLogger, "Trigger Logger", composite
startCommand = "l\x01" startCommand = "l\x01"
stopCommand = "l\x02" stopCommand = "l\x02"
dataReadCommand = "L" dataReadCommand = "L"
dataReadTimeout = 10000 ; time in ms dataReadTimeout = 10000 ; time in ms
dataReadyCondition = { toothLogReady } dataReadyCondition = { toothLogReady }
; each packet is 2 and we have 1000 of those continuousRead = true
dataLength = 2000 ; each packet is 5 and we have 500 of those
dataLength = 2500
;tooth
; recordDef = headerLen, footerLen, recordLen ; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 2 ; recordDef = 0, 0, 5
; uint16 that stores 1/100 second ; uint16 that stores 1/100 second
recordField = toothTime, "tooth", 0, 16, 0.01, "ms" ; recordField = toothTime, "tooth", 0, 16, 0.01, "ms"
; recordDef = headerLen, footerLen, recordLen
recordDef = 0, 0, 5
; these names are hard-coded inside TS
recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag"
recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag"
recordField = trigger, "Trigger", 2, 1, 1.0, "Flag"
recordField = sync, "Sync", 3, 1, 1.0, "Flag"
recordField = time, "Time", 8, 32, 0.01, "ms"
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze] [VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 18:54:18 EDT 2020 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Mon Apr 13 20:23:02 EDT 2020
// by class com.rusefi.output.FileJavaFieldsConsumer // by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*; import com.rusefi.config.*;
@ -285,9 +285,9 @@ public class Fields {
public static final int coastingFuelCutTps_offset = 3152; public static final int coastingFuelCutTps_offset = 3152;
public static final int communicationLedPin_offset = 1812; public static final int communicationLedPin_offset = 1812;
public static final int communicationLedPin_offset_hex = 714; public static final int communicationLedPin_offset_hex = 714;
public static final int COMPOSITE_DATA_LENGTH = 2000; public static final int COMPOSITE_DATA_LENGTH = 2500;
public static final int COMPOSITE_PACKET_COUNT = 1000; public static final int COMPOSITE_PACKET_COUNT = 500;
public static final int COMPOSITE_PACKET_SIZE = 2; public static final int COMPOSITE_PACKET_SIZE = 5;
public static final String CONSOLE_DATA_PROTOCOL_TAG = " @"; public static final String CONSOLE_DATA_PROTOCOL_TAG = " @";
public static final int consoleLoopPeriodMs_offset = 716; public static final int consoleLoopPeriodMs_offset = 716;
public static final int consoleSerialRxPin_offset = 1819; public static final int consoleSerialRxPin_offset = 1819;
@ -1293,6 +1293,9 @@ public class Fields {
public static final int tle8888spiDevice_offset = 4000; public static final int tle8888spiDevice_offset = 4000;
public static final int todoClutchDownPinInverted_offset = 976; public static final int todoClutchDownPinInverted_offset = 976;
public static final int todoClutchUpPinInverted_offset = 976; public static final int todoClutchUpPinInverted_offset = 976;
public static final int TOOTH_DATA_LENGTH = 2000;
public static final int TOOTH_PACKET_COUNT = 1000;
public static final int TOOTH_PACKET_SIZE = 2;
public static final String TOP_DEAD_CENTER_MESSAGE = "r"; public static final String TOP_DEAD_CENTER_MESSAGE = "r";
public static final int TOTAL_CONFIG_SIZE = 20000; public static final int TOTAL_CONFIG_SIZE = 20000;
public static final int tps1_1AdcChannel_offset = 512; public static final int tps1_1AdcChannel_offset = 512;