Speeduino
Loading...
Searching...
No Matches
Macros | Functions
logger.h File Reference

File for generating log files and meta data. More...

#include "globals.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LOG_ENTRY_SIZE   130
 

Functions

byte getTSLogEntry (uint16_t byteNum)
 
int16_t getReadableLogEntry (uint16_t logIndex)
 
uint8_t getLegacySecondarySerialLogEntry (uint16_t byteNum)
 
bool is2ByteEntry (uint8_t key)
 
void startToothLogger (void)
 
void stopToothLogger (void)
 
void startCompositeLogger (void)
 
void stopCompositeLogger (void)
 
void startCompositeLoggerTertiary (void)
 
void stopCompositeLoggerTertiary (void)
 
void startCompositeLoggerCams (void)
 
void stopCompositeLoggerCams (void)
 

Detailed Description

File for generating log files and meta data.

Author
Josh Stewart

This file contains functions for creating a log file for use with by TunerStudio directly or to be written to an SD card

Macro Definition Documentation

◆ LOG_ENTRY_SIZE

#define LOG_ENTRY_SIZE   130

The size of the live data packet. This MUST match ochBlockSize setting in the ini file

Function Documentation

◆ getLegacySecondarySerialLogEntry()

uint8_t getLegacySecondarySerialLogEntry ( uint16_t  byteNum)

An expansion to the getReadableLogEntry function for systems that have an FPU. It will provide a floating point value for any parameter that this is appropriate for, otherwise will return the result of getReadableLogEntry. See logger.h for the field names and order

Parameters
logIndex- The log index required. Note that this is NOT the byte number, but the index in the log
Returns
float value of the requested log entry.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReadableLogEntry()

int16_t getReadableLogEntry ( uint16_t  logIndex)

Similar to the getTSLogEntry function, however this returns a full, unadjusted (ie human readable) log entry value. See logger.h for the field names and order

Parameters
logIndex- The log index required. Note that this is NOT the byte number, but the index in the log
Returns
Raw, unadjusted value of the log entry. No offset or multiply is applied like it is with the TS log
Here is the call graph for this function:

◆ getTSLogEntry()

byte getTSLogEntry ( uint16_t  byteNum)

Returns a numbered byte-field (partial field in case of multi-byte fields) from "current status" structure in the format expected by TunerStudio Notes on fields:

  • Numbered field will be fields from currentStatus, but not at all in the internal order of strct (e.g. field RPM value, number 14 will be 2nd field in struct)
  • The fields stored in multi-byte types will be accessed lowbyte and highbyte separately (e.g. PW1 will be broken into numbered byte-fields 75,76)
  • Values have the value offsets and shifts expected by TunerStudio. They will not all be a 'human readable value'
    Parameters
    byteNum- byte-Field number. This is not the entry number (As some entries have multiple byets), but the byte number that is needed
    Returns
    Field value in 1 byte size struct fields or 1 byte partial value (chunk) on multibyte fields.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is2ByteEntry()

bool is2ByteEntry ( uint8_t  key)

Searches the log 2 byte array to determine whether a given index is a regular single byte or a 2 byte field Uses a boundless binary search for improved performance, but requires the fsIntIndex to remain in order

Parameters
key- Index in the log array to check
Returns
True if the index is a 2 byte log field. False if it is a single byte
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startCompositeLogger()

void startCompositeLogger ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startCompositeLoggerCams()

void startCompositeLoggerCams ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startCompositeLoggerTertiary()

void startCompositeLoggerTertiary ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startToothLogger()

void startToothLogger ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopCompositeLogger()

void stopCompositeLogger ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopCompositeLoggerCams()

void stopCompositeLoggerCams ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopCompositeLoggerTertiary()

void stopCompositeLoggerTertiary ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopToothLogger()

void stopToothLogger ( void  )
Here is the call graph for this function:
Here is the caller graph for this function: