SD card logs not valid for REO #1864
This commit is contained in:
parent
07a905b1fe
commit
048c7a6025
|
@ -196,7 +196,7 @@ typedef struct {
|
||||||
// we want a hash of engineMake+engineCode+vehicleName in the log file in order to match TS logs to rusEFI Online tune
|
// we want a hash of engineMake+engineCode+vehicleName in the log file in order to match TS logs to rusEFI Online tune
|
||||||
int16_t engineMakeCodeNameCrc16; // 138
|
int16_t engineMakeCodeNameCrc16; // 138
|
||||||
// Errors
|
// Errors
|
||||||
int totalTriggerErrorCounter; // 140
|
scaled_channel<uint32_t> totalTriggerErrorCounter; // 140
|
||||||
int orderingErrorCounter; // 144
|
int orderingErrorCounter; // 144
|
||||||
int16_t warningCounter; // 148
|
int16_t warningCounter; // 148
|
||||||
int16_t lastErrorCode; // 150
|
int16_t lastErrorCode; // 150
|
||||||
|
|
|
@ -10,8 +10,16 @@
|
||||||
#include "efitime.h"
|
#include "efitime.h"
|
||||||
#include "crc.h"
|
#include "crc.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define TIME_PRECISION 1000
|
||||||
|
|
||||||
|
// floating number of seconds with millisecond precision
|
||||||
|
scaled_channel<uint32_t, TIME_PRECISION> packedTime;
|
||||||
|
|
||||||
static const LogField fields[] = {
|
static const LogField fields[] = {
|
||||||
{tsOutputChannels.rpm, GAUGE_NAME_RPM, "rpm", 0},
|
{tsOutputChannels.rpm, GAUGE_NAME_RPM, "rpm", 0},
|
||||||
|
{packedTime, GAUGE_NAME_TIME, "sec", 0},
|
||||||
|
{tsOutputChannels.totalTriggerErrorCounter, GAUGE_NAME_TRG_ERR, "err", 0},
|
||||||
{tsOutputChannels.vehicleSpeedKph, GAUGE_NAME_VVS, "kph", 0},
|
{tsOutputChannels.vehicleSpeedKph, GAUGE_NAME_VVS, "kph", 0},
|
||||||
{tsOutputChannels.internalMcuTemperature, GAUGE_NAME_CPU_TEMP, "C", 0},
|
{tsOutputChannels.internalMcuTemperature, GAUGE_NAME_CPU_TEMP, "C", 0},
|
||||||
{tsOutputChannels.coolantTemperature, GAUGE_NAME_CLT, "C", 1},
|
{tsOutputChannels.coolantTemperature, GAUGE_NAME_CLT, "C", 1},
|
||||||
|
@ -108,6 +116,8 @@ size_t writeBlock(char* buffer) {
|
||||||
buffer[2] = timestamp >> 8;
|
buffer[2] = timestamp >> 8;
|
||||||
buffer[3] = timestamp & 0xFF;
|
buffer[3] = timestamp & 0xFF;
|
||||||
|
|
||||||
|
packedTime = currentTimeMillis() * 1.0 / TIME_PRECISION;
|
||||||
|
|
||||||
// Offset 4 = field data
|
// Offset 4 = field data
|
||||||
const char* dataBlockStart = buffer + 4;
|
const char* dataBlockStart = buffer + 4;
|
||||||
char* dataBlock = buffer + 4;
|
char* dataBlock = buffer + 4;
|
||||||
|
|
Loading…
Reference in New Issue