Speeduino
Loading...
Searching...
No Matches
Functions | Variables
sensors.cpp File Reference
#include "sensors.h"
#include "crankMaths.h"
#include "globals.h"
#include "maths.h"
#include "storage.h"
#include "comms.h"
#include "idle.h"
#include "errors.h"
#include "corrections.h"
#include "pages.h"
#include "decoders.h"
#include "auxiliaries.h"
#include "utilities.h"
#include <BOARD_H>

Functions

static void validateMAP (void)
 
void initialiseADC (void)
 
void instanteneousMAPReading (void)
 
void readMAP (void)
 
void readTPS (bool useFilter)
 
void readCLT (bool useFilter)
 
void readIAT (void)
 
void readBaro (void)
 
void readO2 (void)
 
void readO2_2 (void)
 
void readBat (void)
 
uint32_t vssGetPulseGap (byte historyIndex)
 Returns the VSS pulse gap for a given history point.
 
uint16_t getSpeed (void)
 
byte getGear (void)
 
byte getFuelPressure (void)
 
byte getOilPressure (void)
 
uint8_t getAnalogKnock (void)
 
void flexPulse (void)
 
void knockPulse (void)
 
void vssPulse (void)
 The ISR function for VSS pulses.
 
uint16_t readAuxanalog (uint8_t analogPin)
 
uint16_t readAuxdigital (uint8_t digitalPin)
 

Variables

uint32_t MAPcurRev
 
unsigned int MAPcount
 
unsigned long MAPrunningValue
 
unsigned long EMAPrunningValue
 
bool auxIsEnabled
 
uint16_t MAPlast
 
unsigned long MAP_time
 
unsigned long MAPlast_time
 
volatile unsigned long vssTimes [VSS_SAMPLES] = {0}
 
volatile byte vssIndex
 
volatile byte flexCounter = 0
 
volatile unsigned long flexStartTime
 
volatile unsigned long flexPulseWidth
 
byte mapErrorCount = 0
 

Detailed Description

Read sensors with appropriate timing / scheduling.

Function Documentation

◆ flexPulse()

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

◆ getAnalogKnock()

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

◆ getFuelPressure()

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

◆ getGear()

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

◆ getOilPressure()

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

◆ getSpeed()

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

◆ initialiseADC()

void initialiseADC ( void  )

Init all ADC conversions by setting resolutions, etc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ instanteneousMAPReading()

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

◆ knockPulse()

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

◆ readAuxanalog()

uint16_t readAuxanalog ( uint8_t  analogPin)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readAuxdigital()

uint16_t readAuxdigital ( uint8_t  digitalPin)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readBaro()

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

◆ readBat()

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

◆ readCLT()

void readCLT ( bool  useFilter)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readIAT()

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

◆ readMAP()

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

◆ readO2()

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

◆ readO2_2()

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

◆ readTPS()

void readTPS ( bool  useFilter)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateMAP()

static void validateMAP ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vssGetPulseGap()

uint32_t vssGetPulseGap ( byte  historyIndex)

Returns the VSS pulse gap for a given history point.

Parameters
historyIndexThe gap number that is wanted. EG: historyIndex = 0 = Latest entry historyIndex = 1 = 2nd entry entry
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vssPulse()

void vssPulse ( void  )

The ISR function for VSS pulses.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ auxIsEnabled

bool auxIsEnabled

◆ EMAPrunningValue

unsigned long EMAPrunningValue

◆ flexCounter

volatile byte flexCounter = 0

◆ flexPulseWidth

volatile unsigned long flexPulseWidth

◆ flexStartTime

volatile unsigned long flexStartTime

◆ MAP_time

unsigned long MAP_time

◆ MAPcount

unsigned int MAPcount

◆ MAPcurRev

uint32_t MAPcurRev

◆ mapErrorCount

byte mapErrorCount = 0

◆ MAPlast

uint16_t MAPlast

The previous MAP reading

◆ MAPlast_time

unsigned long MAPlast_time

◆ MAPrunningValue

unsigned long MAPrunningValue

◆ vssIndex

volatile byte vssIndex

◆ vssTimes

volatile unsigned long vssTimes[VSS_SAMPLES] = {0}