Speeduino
Loading...
Searching...
No Matches
Public Attributes | List of all members
statuses Struct Reference

#include <globals.h>

Public Attributes

volatile bool hasSync: 1
 
bool initialisationComplete: 1
 
bool clutchTrigger: 1
 
bool previousClutchTrigger: 1
 
volatile bool fpPrimed: 1
 
volatile bool injPrimed: 1
 
volatile bool tachoSweepEnabled: 1
 
volatile bool tachoAlt: 1
 
uint16_t RPM
 RPM - Current Revs per minute.
 
byte RPMdiv100
 RPM value scaled (divided by 100) to fit a byte (0-255, e.g. 12000 => 120)
 
long longRPM
 RPM as long int (gets assigned to / maintained in statuses.RPM as well)
 
uint16_t mapADC
 
int baroADC
 
long MAP
 Manifold absolute pressure. Has to be a long for PID calcs (Boost control)
 
int16_t EMAP
 EMAP ... (See config6::useEMAP for EMAP enablement)
 
uint16_t EMAPADC
 
byte baro
 Barometric pressure is simply the initial MAP reading, taken before the engine is running. Alternatively, can be taken from an external sensor.
 
byte TPS
 
byte tpsADC
 
int16_t tpsDOT
 
byte TPSlast
 
int16_t mapDOT
 
volatile int rpmDOT
 
byte VE
 
byte VE1
 
byte VE2
 
byte O2
 
byte O2_2
 
int coolant
 
int cltADC
 
int IAT
 
int iatADC
 
int batADC
 
int O2ADC
 
int O2_2ADC
 
uint16_t dwell
 dwell (coil primary winding/circuit on) time (in ms * 10 ? See correctionsDwell)
 
volatile uint16_t actualDwell
 actual dwell time if new ignition mode is used (in uS)
 
byte dwellCorrection
 
byte battery10
 
int8_t advance
 
int8_t advance1
 
int8_t advance2
 
uint16_t corrections
 
uint16_t AEamount
 
byte egoCorrection
 
byte wueCorrection
 
byte batCorrection
 
byte iatCorrection
 
byte baroCorrection
 
byte launchCorrection
 
byte flexCorrection
 
byte fuelTempCorrection
 
int8_t flexIgnCorrection
 
byte afrTarget
 
byte CLIdleTarget
 
bool idleUpActive
 
bool CTPSActive
 
volatile byte ethanolPct
 
volatile int8_t fuelTemp
 
unsigned long AEEndTime
 
volatile byte status1
 Status bits (See BIT_STATUS1_* defines on top of this file)
 
volatile byte status2
 status 2/control indicator bits (launch control, boost cut, spark errors, See BIT_STATUS2_* defines)
 
volatile byte status3
 Status bits (See BIT_STATUS3_* defines on top of this file)
 
volatile byte status4
 Status bits (See BIT_STATUS4_* defines on top of this file)
 
volatile byte status5
 Status 5 ... (See also config10 Status 5* members and BIT_STATU5_* defines)
 
uint8_t engine
 Engine status bits (See BIT_ENGINE_* defines on top of this file)
 
unsigned int PW1
 In uS.
 
unsigned int PW2
 In uS.
 
unsigned int PW3
 In uS.
 
unsigned int PW4
 In uS.
 
unsigned int PW5
 In uS.
 
unsigned int PW6
 In uS.
 
unsigned int PW7
 In uS.
 
unsigned int PW8
 In uS.
 
volatile byte runSecs
 
volatile byte secl
 
volatile uint32_t loopsPerSecond
 
bool launchingSoft
 
bool launchingHard
 
uint16_t freeRAM
 
unsigned int clutchEngagedRPM
 
bool flatShiftingHard
 
volatile uint32_t startRevolutions
 
uint16_t boostTarget
 
byte testOutputs
 Test Output bits (only first bit used/tested ?)
 
bool testActive
 
uint16_t boostDuty
 Boost Duty percentage value * 100 to give 2 points of precision.
 
byte idleLoad
 Either the current steps or current duty cycle for the idle control.
 
uint16_t canin [16]
 16bit raw value of selected canin data for channels 0-15
 
uint8_t current_caninchannel = 0
 
uint16_t crankRPM = 400
 
int16_t flexBoostCorrection
 
byte nitrous_status
 
byte nSquirts
 Number of injector squirts per cycle (per injector)
 
byte nChannels
 
int16_t fuelLoad
 
int16_t fuelLoad2
 
int16_t ignLoad
 
int16_t ignLoad2
 
bool fuelPumpOn
 
volatile byte syncLossCounter
 
byte knockRetard
 
volatile byte knockCount
 
bool toothLogEnabled
 
byte compositeTriggerUsed
 
int16_t vvt1Angle
 
byte vvt1TargetAngle
 
long vvt1Duty
 
uint16_t injAngle
 
byte ASEValue
 
uint16_t vss
 
bool idleUpOutputActive
 
byte gear
 
byte fuelPressure
 
byte oilPressure
 
byte engineProtectStatus
 
byte fanDuty
 
byte wmiPW
 
int16_t vvt2Angle
 
byte vvt2TargetAngle
 
long vvt2Duty
 
byte outputsStatus
 
byte TS_SD_Status
 
byte airConStatus
 

Detailed Description

The status struct with current values for all 'live' variables. In current version this is 64 bytes. Instantiated as global currentStatus. int *ADC (Analog-to-digital value / count) values contain the "raw" value from AD conversion, which get converted to unit based values in similar variable(s) without ADC part in name (see sensors.ino for reading of sensors).

Member Data Documentation

◆ actualDwell

volatile uint16_t statuses::actualDwell

actual dwell time if new ignition mode is used (in uS)

◆ advance

int8_t statuses::advance

The current advance value being used in the spark calculation. Can be the same as advance1 or advance2, or a calculated value of both

◆ advance1

int8_t statuses::advance1

The advance value from ignition table 1

◆ advance2

int8_t statuses::advance2

The advance value from ignition table 2

◆ AEamount

uint16_t statuses::AEamount

The amount of acceleration enrichment currently being applied. 100=No change. Varies above 255

◆ AEEndTime

unsigned long statuses::AEEndTime

The target end time used whenever AE (acceleration enrichment) is turned on

◆ afrTarget

byte statuses::afrTarget

Current AFR Target looked up from AFR target table (x10 ? See afrTable)

◆ airConStatus

byte statuses::airConStatus

◆ ASEValue

byte statuses::ASEValue

◆ baro

byte statuses::baro

Barometric pressure is simply the initial MAP reading, taken before the engine is running. Alternatively, can be taken from an external sensor.

◆ baroADC

int statuses::baroADC

◆ baroCorrection

byte statuses::baroCorrection

The amount of correction being applied for the current baro reading

◆ batADC

int statuses::batADC

◆ batCorrection

byte statuses::batCorrection

The amount of battery voltage enrichment currently being applied

◆ battery10

byte statuses::battery10

The current BRV in volts (multiplied by 10. Eg 12.5V = 125)

◆ boostDuty

uint16_t statuses::boostDuty

Boost Duty percentage value * 100 to give 2 points of precision.

◆ boostTarget

uint16_t statuses::boostTarget

◆ canin

uint16_t statuses::canin[16]

16bit raw value of selected canin data for channels 0-15

◆ CLIdleTarget

byte statuses::CLIdleTarget

The target idle RPM (when closed loop idle control is active)

◆ cltADC

int statuses::cltADC

◆ clutchEngagedRPM

unsigned int statuses::clutchEngagedRPM

The RPM at which the clutch was last depressed. Used for distinguishing between launch control and flat shift

◆ clutchTrigger

bool statuses::clutchTrigger

◆ compositeTriggerUsed

byte statuses::compositeTriggerUsed

◆ coolant

int statuses::coolant

Coolant temperature reading

◆ corrections

uint16_t statuses::corrections

The total current corrections % amount

◆ crankRPM

uint16_t statuses::crankRPM = 400

The actual cranking RPM limit. This is derived from the value in the config page, but saves us multiplying it every time it's used (Config page value is stored divided by 10)

◆ CTPSActive

bool statuses::CTPSActive

Whether the externally controlled closed throttle position sensor is currently active

◆ current_caninchannel

uint8_t statuses::current_caninchannel = 0

Current CAN channel, defaults to 0

◆ dwell

uint16_t statuses::dwell

dwell (coil primary winding/circuit on) time (in ms * 10 ? See correctionsDwell)

◆ dwellCorrection

byte statuses::dwellCorrection

The amount of correction being applied to the dwell time (in unit ...).

◆ egoCorrection

byte statuses::egoCorrection

The amount of closed loop AFR enrichment currently being applied

◆ EMAP

int16_t statuses::EMAP

EMAP ... (See config6::useEMAP for EMAP enablement)

◆ EMAPADC

uint16_t statuses::EMAPADC

◆ engine

uint8_t statuses::engine

Engine status bits (See BIT_ENGINE_* defines on top of this file)

◆ engineProtectStatus

byte statuses::engineProtectStatus

◆ ethanolPct

volatile byte statuses::ethanolPct

Ethanol reading (if enabled). 0 = No ethanol, 100 = pure ethanol. Eg E85 = 85.

◆ fanDuty

byte statuses::fanDuty

◆ flatShiftingHard

bool statuses::flatShiftingHard

◆ flexBoostCorrection

int16_t statuses::flexBoostCorrection

Amount of boost added based on flex

◆ flexCorrection

byte statuses::flexCorrection

Amount of correction being applied to compensate for ethanol content

◆ flexIgnCorrection

int8_t statuses::flexIgnCorrection

Amount of additional advance being applied based on flex. Note the type as this allows for negative values

◆ fpPrimed

volatile bool statuses::fpPrimed

◆ freeRAM

uint16_t statuses::freeRAM

◆ fuelLoad

int16_t statuses::fuelLoad

◆ fuelLoad2

int16_t statuses::fuelLoad2

◆ fuelPressure

byte statuses::fuelPressure

Fuel pressure in PSI

◆ fuelPumpOn

bool statuses::fuelPumpOn

Indicator showing the current status of the fuel pump

◆ fuelTemp

volatile int8_t statuses::fuelTemp

◆ fuelTempCorrection

byte statuses::fuelTempCorrection

Amount of correction being applied to compensate for fuel temperature

◆ gear

byte statuses::gear

Current gear (Calculated from vss)

◆ hasSync

volatile bool statuses::hasSync

Flag for crank/cam position being known by decoders (See decoders.ino). This is used for sanity checking e.g. before logging tooth history or reading some sensors and computing readings.

◆ IAT

int statuses::IAT

Inlet air temperature reading

◆ iatADC

int statuses::iatADC

◆ iatCorrection

byte statuses::iatCorrection

The amount of inlet air temperature adjustment currently being applied

◆ idleLoad

byte statuses::idleLoad

Either the current steps or current duty cycle for the idle control.

◆ idleUpActive

bool statuses::idleUpActive

Whether the externally controlled idle up is currently active

◆ idleUpOutputActive

bool statuses::idleUpOutputActive

Whether the idle up output is currently active

◆ ignLoad

int16_t statuses::ignLoad

◆ ignLoad2

int16_t statuses::ignLoad2

◆ initialisationComplete

bool statuses::initialisationComplete

◆ injAngle

uint16_t statuses::injAngle

◆ injPrimed

volatile bool statuses::injPrimed

◆ knockCount

volatile byte statuses::knockCount

◆ knockRetard

byte statuses::knockRetard

◆ launchCorrection

byte statuses::launchCorrection

The amount of correction being applied if launch control is active

◆ launchingHard

bool statuses::launchingHard

Indicator showing whether hard launch control adjustments are active

◆ launchingSoft

bool statuses::launchingSoft

Indicator showing whether soft launch control adjustments are active

◆ longRPM

long statuses::longRPM

RPM as long int (gets assigned to / maintained in statuses.RPM as well)

◆ loopsPerSecond

volatile uint32_t statuses::loopsPerSecond

A performance indicator showing the number of main loops that are being executed each second

◆ MAP

long statuses::MAP

Manifold absolute pressure. Has to be a long for PID calcs (Boost control)

◆ mapADC

uint16_t statuses::mapADC

◆ mapDOT

int16_t statuses::mapDOT

MAP delta over time. Measures the kpa per second that the MAP is changing. Note that is signed value, because MAPdot can be also negative

◆ nChannels

byte statuses::nChannels

Number of fuel and ignition channels.

◆ nitrous_status

byte statuses::nitrous_status

◆ nSquirts

byte statuses::nSquirts

Number of injector squirts per cycle (per injector)

◆ O2

byte statuses::O2

Primary O2 sensor reading

◆ O2_2

byte statuses::O2_2

Secondary O2 sensor reading

◆ O2_2ADC

int statuses::O2_2ADC

◆ O2ADC

int statuses::O2ADC

◆ oilPressure

byte statuses::oilPressure

Oil pressure in PSI

◆ outputsStatus

byte statuses::outputsStatus

◆ previousClutchTrigger

bool statuses::previousClutchTrigger

◆ PW1

unsigned int statuses::PW1

In uS.

◆ PW2

unsigned int statuses::PW2

In uS.

◆ PW3

unsigned int statuses::PW3

In uS.

◆ PW4

unsigned int statuses::PW4

In uS.

◆ PW5

unsigned int statuses::PW5

In uS.

◆ PW6

unsigned int statuses::PW6

In uS.

◆ PW7

unsigned int statuses::PW7

In uS.

◆ PW8

unsigned int statuses::PW8

In uS.

◆ RPM

uint16_t statuses::RPM

RPM - Current Revs per minute.

◆ RPMdiv100

byte statuses::RPMdiv100

RPM value scaled (divided by 100) to fit a byte (0-255, e.g. 12000 => 120)

◆ rpmDOT

volatile int statuses::rpmDOT

RPM delta over time (RPM increase / s ?)

◆ runSecs

volatile byte statuses::runSecs

Counter of seconds since cranking commenced (Maxes out at 255 to prevent overflow)

◆ secl

volatile byte statuses::secl

Counter incrementing once per second. Will overflow after 255 and begin again. This is used by TunerStudio to maintain comms sync

◆ startRevolutions

volatile uint32_t statuses::startRevolutions

A counter for how many revolutions have been completed since sync was achieved.

◆ status1

volatile byte statuses::status1

Status bits (See BIT_STATUS1_* defines on top of this file)

◆ status2

volatile byte statuses::status2

status 2/control indicator bits (launch control, boost cut, spark errors, See BIT_STATUS2_* defines)

◆ status3

volatile byte statuses::status3

Status bits (See BIT_STATUS3_* defines on top of this file)

◆ status4

volatile byte statuses::status4

Status bits (See BIT_STATUS4_* defines on top of this file)

◆ status5

volatile byte statuses::status5

Status 5 ... (See also config10 Status 5* members and BIT_STATU5_* defines)

◆ syncLossCounter

volatile byte statuses::syncLossCounter

◆ tachoAlt

volatile bool statuses::tachoAlt

◆ tachoSweepEnabled

volatile bool statuses::tachoSweepEnabled

◆ testActive

bool statuses::testActive

◆ testOutputs

byte statuses::testOutputs

Test Output bits (only first bit used/tested ?)

◆ toothLogEnabled

bool statuses::toothLogEnabled

◆ TPS

byte statuses::TPS

The current TPS reading (0% - 100%). Is the tpsADC value after the calibration is applied

◆ tpsADC

byte statuses::tpsADC

byte (valued: 0-255) representation of the TPS. Downsampled from the original 10-bit (0-1023) reading, but before any calibration is applied

◆ tpsDOT

int16_t statuses::tpsDOT

TPS delta over time. Measures the % per second that the TPS is changing. Note that is signed value, because TPSdot can be also negative

◆ TPSlast

byte statuses::TPSlast

The previous TPS reading

◆ TS_SD_Status

byte statuses::TS_SD_Status

◆ VE

byte statuses::VE

The current VE value being used in the fuel calculation. Can be the same as VE1 or VE2, or a calculated value of both.

◆ VE1

byte statuses::VE1

The VE value from fuel table 1

◆ VE2

byte statuses::VE2

The VE value from fuel table 2, if in use (and required conditions are met)

◆ vss

uint16_t statuses::vss

Current speed reading. Natively stored in kph and converted to mph in TS if required

◆ vvt1Angle

int16_t statuses::vvt1Angle

◆ vvt1Duty

long statuses::vvt1Duty

◆ vvt1TargetAngle

byte statuses::vvt1TargetAngle

◆ vvt2Angle

int16_t statuses::vvt2Angle

◆ vvt2Duty

long statuses::vvt2Duty

◆ vvt2TargetAngle

byte statuses::vvt2TargetAngle

◆ wmiPW

byte statuses::wmiPW

◆ wueCorrection

byte statuses::wueCorrection

The amount of warmup enrichment currently being applied


The documentation for this struct was generated from the following file: