Speeduino
Loading...
Searching...
No Matches
Macros | Functions | Variables
globals.cpp File Reference
#include "globals.h"

Macros

#define pinIsSensor(pin)   ( ((pin) == pinNumbers.pinCLT) || ((pin) == pinNumbers.pinIAT) || ((pin) == pinNumbers.pinMAP) || ((pin) == pinNumbers.pinTPS) || ((pin) == pinNumbers.pinO2) || ((pin) == pinNumbers.pinBat) || (((pin) == pinNumbers.pinFlex) && (configPage2.flexEnabled != 0)) )
 

Functions

bool pinIsOutput (byte pin)
 
bool pinIsUsed (byte pin)
 

Variables

struct table3d16RpmLoad fuelTable
 16x16 fuel map
 
struct table3d16RpmLoad fuelTable2
 16x16 fuel map
 
struct table3d16RpmLoad ignitionTable
 16x16 ignition map
 
struct table3d16RpmLoad ignitionTable2
 16x16 ignition map
 
struct table3d16RpmLoad afrTable
 16x16 afr target map
 
struct table3d8RpmLoad stagingTable
 8x8 fuel staging table
 
struct table3d8RpmLoad boostTable
 8x8 boost map
 
struct table3d8RpmLoad boostTableLookupDuty
 8x8 boost map lookup table
 
struct table3d8RpmLoad vvtTable
 8x8 vvt map
 
struct table3d8RpmLoad vvt2Table
 8x8 vvt2 map
 
struct table3d8RpmLoad wmiTable
 8x8 wmi map
 
struct table3d6RpmLoad trimTables [INJ_CHANNELS]
 
struct table3d4RpmLoad dwellTable
 4x4 Dwell map
 
uint8_t softLimitTime = 0
 
volatile uint16_t mainLoopCount
 
volatile unsigned long ms_counter = 0
 
uint16_t fixedCrankingOverride = 0
 
volatile uint32_t toothHistory [TOOTH_LOG_SIZE]
 Tooth trigger history - delta time (in uS) from last tooth (Indexed by toothHistoryIndex)
 
volatile uint8_t compositeLogHistory [TOOTH_LOG_SIZE]
 
volatile unsigned int toothHistoryIndex = 0
 Current index to toothHistory array.
 
unsigned long currentLoopTime
 
volatile uint16_t ignitionCount
 
int16_t CRANK_ANGLE_MAX_IGN = 360
 
int16_t CRANK_ANGLE_MAX_INJ = 360
 The number of crank degrees that the system track over. Typically 720 divided by the number of squirts per cycle (Eg 360 for wasted 2 squirt and 720 for sequential single squirt)
 
volatile uint32_t runSecsX10
 
volatile uint32_t seclx10
 
pinNumbers_t pinNumbers
 
struct statuses currentStatus
 
struct config2 configPage2
 
struct config4 configPage4
 
struct config6 configPage6
 
struct config9 configPage9
 
struct config10 configPage10
 
struct config13 configPage13
 
struct config15 configPage15
 Immediately below max RPM, there is a range within which we can apply a rolling cut.
 

Detailed Description

Instantiation of various (table2D, table3D) tables, volatile (interrupt modified) variables, Injector (1...8) enablement flags, etc.

Macro Definition Documentation

◆ pinIsSensor

#define pinIsSensor (   pin)    ( ((pin) == pinNumbers.pinCLT) || ((pin) == pinNumbers.pinIAT) || ((pin) == pinNumbers.pinMAP) || ((pin) == pinNumbers.pinTPS) || ((pin) == pinNumbers.pinO2) || ((pin) == pinNumbers.pinBat) || (((pin) == pinNumbers.pinFlex) && (configPage2.flexEnabled != 0)) )

Function Documentation

◆ pinIsOutput()

bool pinIsOutput ( byte  pin)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pinIsUsed()

bool pinIsUsed ( byte  pin)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ afrTable

16x16 afr target map

◆ boostTable

struct table3d8RpmLoad boostTable

8x8 boost map

◆ boostTableLookupDuty

struct table3d8RpmLoad boostTableLookupDuty

8x8 boost map lookup table

◆ compositeLogHistory

volatile uint8_t compositeLogHistory[TOOTH_LOG_SIZE]

◆ configPage10

struct config10 configPage10

◆ configPage13

struct config13 configPage13

◆ configPage15

struct config15 configPage15

Immediately below max RPM, there is a range within which we can apply a rolling cut.

The rolling cut table defines a series of relative negative RPM offsets that define the window and percent cut for each offset. I.e. RPM 0---------------------—|++++++++++++++++++++|<- max RPM | rolling cut window |

◆ configPage2

struct config2 configPage2

◆ configPage4

struct config4 configPage4

◆ configPage6

struct config6 configPage6
constexpr

◆ configPage9

struct config9 configPage9

◆ CRANK_ANGLE_MAX_IGN

int16_t CRANK_ANGLE_MAX_IGN = 360

◆ CRANK_ANGLE_MAX_INJ

int16_t CRANK_ANGLE_MAX_INJ = 360

The number of crank degrees that the system track over. Typically 720 divided by the number of squirts per cycle (Eg 360 for wasted 2 squirt and 720 for sequential single squirt)

The number of crank degrees that the system track over. 360 for wasted / timed batch and 720 for sequential.

◆ currentLoopTime

unsigned long currentLoopTime

The time (in uS) that the current mainloop started

◆ currentStatus

struct statuses currentStatus

The master global "live" status struct. Contains all values that are updated frequently and used across modules

◆ dwellTable

struct table3d4RpmLoad dwellTable

4x4 Dwell map

◆ fixedCrankingOverride

uint16_t fixedCrankingOverride = 0

◆ fuelTable

16x16 fuel map

◆ fuelTable2

16x16 fuel map

◆ ignitionCount

volatile uint16_t ignitionCount

The count of ignition events that have taken place since the engine started

◆ ignitionTable

struct table3d16RpmLoad ignitionTable

16x16 ignition map

◆ ignitionTable2

struct table3d16RpmLoad ignitionTable2

16x16 ignition map

◆ mainLoopCount

volatile uint16_t mainLoopCount

◆ ms_counter

volatile unsigned long ms_counter = 0

◆ pinNumbers

pinNumbers_t pinNumbers

◆ runSecsX10

volatile uint32_t runSecsX10

Counter of seconds since cranking commenced (similar to runSecs) but in increments of 0.1 seconds

◆ seclx10

volatile uint32_t seclx10

Counter of seconds since powered commenced (similar to secl) but in increments of 0.1 seconds

◆ softLimitTime

uint8_t softLimitTime = 0

◆ stagingTable

struct table3d8RpmLoad stagingTable

8x8 fuel staging table

◆ toothHistory

Tooth trigger history - delta time (in uS) from last tooth (Indexed by toothHistoryIndex)

◆ toothHistoryIndex

volatile unsigned int toothHistoryIndex = 0

Current index to toothHistory array.

◆ trimTables

◆ vvt2Table

8x8 vvt2 map

◆ vvtTable

8x8 vvt map

◆ wmiTable

8x8 wmi map