Speeduino
Loading...
Searching...
No Matches
Functions | Variables
auxiliaries.cpp File Reference
#include "auxiliaries.h"
#include "globals.h"
#include "maths.h"
#include "src/PID/integerPID.h"
#include "src/PID/integerPID_ideal.h"
#include "decoders.h"
#include "timers.h"
#include "preprocessor.h"
#include "units.h"
#include "board_definition.h"
#include "atomic.h"
#include "src/pins/fastInputPin.h"
#include "src/pins/fastOutputPin.h"
#include "src/pins/outputPin.h"
#include "scheduler_fuel_controller.h"

Functions

static uint8_t getN2oArmPinPolarity (const config10 &page10)
 
static void initialiseN2oArmPin (const config10 &page10)
 
static uint8_t getAirConRequestPinMode (const config15 &page15)
 
static void initialiseN2oPins (const config10 &page10)
 
static void airConOn (void)
 
static void airConOff (void)
 
static void airConFanOn (void)
 
static void airConFanOff (void)
 
static bool isWmiTankEmpty (void)
 
static void checkAirConCoolantLockout (void)
 
static void checkAirConTPSLockout (void)
 
static void checkAirConRPMLockout (void)
 
void initialiseAirCon (void)
 
static bool READ_AIRCON_REQUEST (void)
 
void airConControl (void)
 
void fanOn (void)
 
void fanOff (void)
 
void initialiseFan (uint8_t fanPin)
 
void fanControl (void)
 
static void initialiseVvtPins (uint8_t pin1, uint8_t pin2)
 
static void setBoostPidTunings (const config2 &page2, const config6 &page6, const config10 &page10)
 
static void setVvtPidTunings (integerPID &pid, const config10 &page10, bool isReverse)
 
static void initialiseVvtPid (integerPID &pid, const config10 &page10, bool isReverse, int16_t currentAngle)
 
void initialiseAuxPWM (void)
 
static void boostByGear (void)
 
void boostControl (void)
 
void vvt1On (void)
 
void vvt1Off (void)
 
void vvt2On (void)
 
void vvt2Off (void)
 
void vvtControl (void)
 
void nitrousControl (void)
 
void wmiControl (void)
 
void boostDisable (void)
 
void boostInterrupt (void)
 
void vvtInterrupt (void)
 

Variables

TESTABLE_STATIC long vvt1_pwm_value
 
TESTABLE_STATIC long vvt2_pwm_value
 
static volatile unsigned int vvt1_pwm_cur_value
 
static volatile unsigned int vvt2_pwm_cur_value
 
TESTABLE_STATIC volatile bool vvt1_pwm_state
 
TESTABLE_STATIC volatile bool vvt2_pwm_state
 
static volatile bool vvt1_max_pwm
 
static volatile bool vvt2_max_pwm
 
static volatile char nextVVT
 
TESTABLE_STATIC byte boostCounter
 
static byte vvtCounter
 
static fastInputPin_t n2o_arming_pin
 
static fastInputPin_t aircon_req_pin
 
static boardOutputPin_t boost_pin
 
static boardOutputPin_t n2o_stage1_pin
 
static boardOutputPin_t n2o_stage2_pin
 
static boardOutputPin_t aircon_comp_pin
 
static boardOutputPin_t aircon_fan_pin
 
TESTABLE_STATIC table2D_u8_u8_4 fanPWMTableconfigPage6
 
static bool acIsEnabled
 
static bool acStandAloneFanIsEnabled
 
static uint8_t acStartDelay
 
static uint8_t acTPSLockoutDelay
 
static uint8_t acRPMLockoutDelay
 
static uint8_t acAfterEngineStartDelay
 
static bool waitedAfterCranking
 
TESTABLE_STATIC long boost_pwm_target_value
 
TESTABLE_STATIC volatile bool boost_pwm_state
 
TESTABLE_STATIC volatile unsigned int boost_pwm_cur_value = 0
 
static uint32_t vvtWarmTime
 
TESTABLE_STATIC bool vvtIsHot
 
TESTABLE_STATIC bool vvtTimeHold
 
TESTABLE_STATIC uint16_t vvt_pwm_max_count
 
static uint16_t boost_pwm_max_count
 
TESTABLE_CONSTEXPR table2D_u8_s16_6 flexBoostTableconfigPage10
 
static integerPID_ideal boostPID
 
static integerPID vvtPID
 
static integerPID vvt2PID
 
static boardOutputPin_t fan_pin
 
static boardOutputPin_t vvt1_pin
 
static boardOutputPin_t vvt2_pin
 

Function Documentation

◆ airConControl()

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

◆ airConFanOff()

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

◆ airConFanOn()

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

◆ airConOff()

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

◆ airConOn()

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

◆ boostByGear()

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

◆ boostControl()

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

◆ boostDisable()

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

◆ boostInterrupt()

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

◆ checkAirConCoolantLockout()

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

◆ checkAirConRPMLockout()

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

◆ checkAirConTPSLockout()

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

◆ fanControl()

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

◆ fanOff()

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

◆ fanOn()

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

◆ getAirConRequestPinMode()

static uint8_t getAirConRequestPinMode ( const config15 page15)
static
Here is the caller graph for this function:

◆ getN2oArmPinPolarity()

static uint8_t getN2oArmPinPolarity ( const config10 page10)
static
Here is the caller graph for this function:

◆ initialiseAirCon()

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

◆ initialiseAuxPWM()

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

◆ initialiseFan()

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

◆ initialiseN2oArmPin()

static void initialiseN2oArmPin ( const config10 page10)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseN2oPins()

static void initialiseN2oPins ( const config10 page10)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseVvtPid()

static void initialiseVvtPid ( integerPID pid,
const config10 page10,
bool  isReverse,
int16_t  currentAngle 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseVvtPins()

static void initialiseVvtPins ( uint8_t  pin1,
uint8_t  pin2 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isWmiTankEmpty()

static bool isWmiTankEmpty ( void  )
static
Here is the caller graph for this function:

◆ nitrousControl()

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

◆ READ_AIRCON_REQUEST()

static bool READ_AIRCON_REQUEST ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBoostPidTunings()

static void setBoostPidTunings ( const config2 page2,
const config6 page6,
const config10 page10 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVvtPidTunings()

static void setVvtPidTunings ( integerPID pid,
const config10 page10,
bool  isReverse 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vvt1Off()

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

◆ vvt1On()

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

◆ vvt2Off()

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

◆ vvt2On()

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

◆ vvtControl()

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

◆ vvtInterrupt()

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

◆ wmiControl()

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

Variable Documentation

◆ acAfterEngineStartDelay

uint8_t acAfterEngineStartDelay
static

◆ acIsEnabled

bool acIsEnabled
static

◆ acRPMLockoutDelay

uint8_t acRPMLockoutDelay
static

◆ acStandAloneFanIsEnabled

bool acStandAloneFanIsEnabled
static

◆ acStartDelay

uint8_t acStartDelay
static

◆ acTPSLockoutDelay

uint8_t acTPSLockoutDelay
static

◆ aircon_comp_pin

boardOutputPin_t aircon_comp_pin
static

◆ aircon_fan_pin

boardOutputPin_t aircon_fan_pin
static

◆ aircon_req_pin

fastInputPin_t aircon_req_pin
static

◆ boost_pin

boardOutputPin_t boost_pin
static

◆ boost_pwm_cur_value

TESTABLE_STATIC volatile unsigned int boost_pwm_cur_value = 0

◆ boost_pwm_max_count

uint16_t boost_pwm_max_count
static

◆ boost_pwm_state

TESTABLE_STATIC volatile bool boost_pwm_state

◆ boost_pwm_target_value

TESTABLE_STATIC long boost_pwm_target_value

◆ boostCounter

TESTABLE_STATIC byte boostCounter

◆ boostPID

integerPID_ideal boostPID
static

◆ configPage10

◆ configPage6

constexpr table2D_u8_u8_4 iacCrankDutyTable & configPage6
constexpr

◆ fan_pin

boardOutputPin_t fan_pin
static

◆ n2o_arming_pin

fastInputPin_t n2o_arming_pin
static

◆ n2o_stage1_pin

boardOutputPin_t n2o_stage1_pin
static

◆ n2o_stage2_pin

boardOutputPin_t n2o_stage2_pin
static

◆ nextVVT

volatile char nextVVT
static

◆ vvt1_max_pwm

volatile bool vvt1_max_pwm
static

◆ vvt1_pin

boardOutputPin_t vvt1_pin
static

◆ vvt1_pwm_cur_value

volatile unsigned int vvt1_pwm_cur_value
static

◆ vvt1_pwm_state

TESTABLE_STATIC volatile bool vvt1_pwm_state

◆ vvt1_pwm_value

TESTABLE_STATIC long vvt1_pwm_value

◆ vvt2_max_pwm

volatile bool vvt2_max_pwm
static

◆ vvt2_pin

boardOutputPin_t vvt2_pin
static

◆ vvt2_pwm_cur_value

volatile unsigned int vvt2_pwm_cur_value
static

◆ vvt2_pwm_state

TESTABLE_STATIC volatile bool vvt2_pwm_state

◆ vvt2_pwm_value

TESTABLE_STATIC long vvt2_pwm_value

◆ vvt2PID

integerPID vvt2PID
static

◆ vvt_pwm_max_count

TESTABLE_STATIC uint16_t vvt_pwm_max_count

◆ vvtCounter

byte vvtCounter
static

◆ vvtIsHot

◆ vvtPID

integerPID vvtPID
static

◆ vvtTimeHold

TESTABLE_STATIC bool vvtTimeHold

◆ vvtWarmTime

uint32_t vvtWarmTime
static

◆ waitedAfterCranking

bool waitedAfterCranking
static