global_vars.c - aalesv/2boost GitHub Wiki

global_vars.c

Global variables, constants, ROM functions etc.

volatile const char VERSION[]

Version string. Has format 2Boost CALID 0000.00.00". CALID is taken from target header file. Not used by program code, so attribute used specified to prevent optimizing out.

volatile const uint8 CFG_GLOBAL_MAP_SWITCH_SOURCE

Map switch source option, an 8-bit unsigned integer. Can take values defined by enum MAP_SWITCH_SOURCE. Can be modified by tuner. Default value is MAP_SWITCH_SOURCE_NONE, which means that map switching is disabled.

volatile const uint8 CFG_MAF_SD_BLENDING

Mass airlow / Speed Density blending mode, an 8-bit unsigned integer. Can take values defined by enum MAF_SD_BLENDING. Can be modified by tuner. Default value is MAF_SD_BLENDING_OFF, which means that blending is disabled. When enabled, blending coefficients are taken from tblMafSdBlend table, defined in speed_density.c. Has effect only when Speed Density enabled.

volatile const uint8 CFG_OVERTAKE_BUTTON_SWITCH_SOURCE

Overtake button source, an 8-bit unsigned integer. Can take values defined by enum OVERTAKE_BUTTON_SOURCE. Can be modified by tuner. Default value is OVERTAKE_BUTTON_SOURCE_NONE, which means that Overtake Button is disabled.

volatile const float CFG_ENGINE_DISPLACEMENT

Engine displacement, a float number. Default value is 2.457 liters

volatile const float CFG_OVERTAKE_BUTTON_MIN_ACCELERATOR_PEDAL_VALUE

Minimum accelerator pedal value to activate Overtake mode, precents, a float number. Default value is 25%

volatile const uint8 CFG_CEL_FLASH_ENABLED

Global CEL flash enable flag. Can take values defined by enum CEL_FLASH. Default value is CEL_FLASH_DISABLED, which means that CEL flashing is disabled.

volatile const uint8 CFG_CEL_FLASH_OVERTAKE_ON

How long CEL flash must stay on when in Overtake mode.

volatile const uint8 CFG_CEL_FLASH_OVERTAKE_OFF

How long CEL flash must stay off when in Overtake mode.

volatile const uint8 CFG_CEL_FLASH_OVERTAKE_CYCLES

How much on-off cycles CEL should blink when in Overtake mode. It should be as low as posible to CEL stopped flashing quickly when Overtake mode is over.

volatile const uint8 CFG_CEL_FLASH_FBKC_ON

How long CEL flash must stay on when knock is detected.

volatile const uint8 CFG_CEL_FLASH_FBKC_OFF

How long CEL flash must stay off when knock is detected.

volatile const uint8 CFG_CEL_FLASH_FBKC_CYCLES

How much on-off cycles CEL should blink when knock is detected.

volatile const float CFG_CEL_FLASH_FBKC_LIMIT

Flash when Feedback Knock Correction is lower than this value and load is higher than CFG_CEL_FLASH_FBKC_LOAD_LIMIT.

volatile const float CFG_CEL_FLASH_FBKC_LOAD_LIMIT

Flash when Feedback Knock Correction is lower than CFG_CEL_FLASH_FBKC_LIMIT value and load is higher than this value.

ram_variables_t *RAM_VARIABLES

2Boost RAM variables. Pointer to ram_variables_t structure. Placed in RAM at RAM_HOLE address.

calc_3d_uint_to_float_t calc_3d_uint_to_float

ROM function for calculating the value of a 3D table of type table_3d_uint_t. Returns float.

calc_2d_uint_to_float_t calc_2d_uint_to_float

ROM function for calculating the value of a 2D table of type table_2d_uint_t. Returns float.

calc_2d_float_to_float_t calc_2d_float_to_float

ROM function for calculating the value of a 2D table of type table_2d_noconv_t. Returns float.

void_fn_ptr celTrigger

ROM CEL trigger outer function.