Speeduino
Loading...
Searching...
No Matches
Functions | Variables
engineProtection.cpp File Reference
#include "globals.h"
#include "engineProtection.h"
#include "maths.h"
#include "units.h"
#include "unit_testing.h"

Functions

TESTABLE_INLINE_STATIC bool checkOilPressureLimit (const statuses &current, const config6 &page6, const config10 &page10, uint32_t currMillis)
 
TESTABLE_INLINE_STATIC bool checkBoostLimit (const statuses &current, const config6 &page6)
 
static uint8_t getAfrO2Limit (const statuses &current, const config9 &page9)
 
static bool afrLimitAfrCondition (const statuses &current, const config9 &page9)
 
TESTABLE_INLINE_STATIC bool checkAFRLimit (const statuses &current, const config6 &page6, const config9 &page9, uint32_t currMillis)
 
TESTABLE_INLINE_STATIC bool checkEngineProtect (statuses &current, const config4 &page4, const config6 &page6, const config9 &page9, const config10 &page10, uint32_t currMillis)
 
bool checkEngineProtect (statuses &current, const config4 &page4, const config6 &page6, const config9 &page9, const config10 &page10)
 
uint8_t checkRevLimit (statuses &current, const config4 &page4, const config6 &page6, const config9 &page9)
 

Variables

TESTABLE_STATIC uint8_t oilProtStartTime = 0
 
TESTABLE_STATIC table2D_u8_u8_4 oilPressureProtectTableconfigPage10
 
TESTABLE_STATIC table2D_u8_u8_6 coolantProtectTableconfigPage9
 
TESTABLE_STATIC bool checkAFRLimitActive = false
 
TESTABLE_STATIC bool afrProtectCountEnabled = false
 
TESTABLE_STATIC unsigned long afrProtectCount = 0
 

Function Documentation

◆ afrLimitAfrCondition()

static bool afrLimitAfrCondition ( const statuses current,
const config9 page9 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkAFRLimit()

TESTABLE_INLINE_STATIC bool checkAFRLimit ( const statuses current,
const config6 page6,
const config9 page9,
uint32_t  currMillis 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkBoostLimit()

TESTABLE_INLINE_STATIC bool checkBoostLimit ( const statuses current,
const config6 page6 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkEngineProtect() [1/2]

bool checkEngineProtect ( statuses current,
const config4 page4,
const config6 page6,
const config9 page9,
const config10 page10 
)
Here is the call graph for this function:

◆ checkEngineProtect() [2/2]

TESTABLE_INLINE_STATIC bool checkEngineProtect ( statuses current,
const config4 page4,
const config6 page6,
const config9 page9,
const config10 page10,
uint32_t  currMillis 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkOilPressureLimit()

TESTABLE_INLINE_STATIC bool checkOilPressureLimit ( const statuses current,
const config6 page6,
const config10 page10,
uint32_t  currMillis 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkRevLimit()

uint8_t checkRevLimit ( statuses current,
const config4 page4,
const config6 page6,
const config9 page9 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAfrO2Limit()

static uint8_t getAfrO2Limit ( const statuses current,
const config9 page9 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ afrProtectCount

TESTABLE_STATIC unsigned long afrProtectCount = 0

◆ afrProtectCountEnabled

TESTABLE_STATIC bool afrProtectCountEnabled = false

◆ checkAFRLimitActive

TESTABLE_STATIC bool checkAFRLimitActive = false

◆ configPage10

◆ configPage9

◆ oilProtStartTime

TESTABLE_STATIC uint8_t oilProtStartTime = 0