types.h - aalesv/2boost GitHub Wiki

Contains all data types definitions used in 2Boost code except for uint16 and uint8 which are defined in macros.h as macros.

Macros

generic_lut_t

Macro used to type casting when calling getPointerFromLut function. Its primary goal is to eliminate compile time warning.

Enums

CEL_FLASH

Describes if CEL Flash is globally enabled or disabled.

Name Descripton
CEL_FLASH_DISABLED CEL flash disabled
CEL_FLASH_ENABLED CEL flash enbled

MAF_SD_BLENDING

Describes whether the values of the mass airflow calculated by MAF sensor and Speed Density are blended or not.

Name Descripton
MAF_SD_BLENDING_OFF Blending is disabled.Airflow calculated by SD is used.
MAF_SD_BLENDING_ON MAF/SD blending enabled.Air flow is calcutaled by formulaairFlowFromSD=MAF*(1-Blend_Value) + SD*Blend_Value

MAP_SWITCH_SOURCE

Describes how map sets are switched. Currently Cruise on/off button and Si-Drive switch are suppported.

Name Descripton
MAP_SWITCH_SOURCE_NONE No switching is done
MAP_SWITCH_SOURCE_CRUISE Cruise on/off switch is used for switching
MAP_SWITCH_SOURCE_SI_DRIVE Si-Drive switch is used for switching

OVERTAKE_BUTTON_SOURCE

Describes overtake button. Currently Cruise Cancel button is supported.

Name Descripton
OVERTAKE_BUTTON_SOURCE_NONE Overtake button disabled
OVERTAKE_BUTTON_SOURCE_CRUISE_CANCEL Cruise cancel switch is Overtake button

SI_DRIVE_STATE

Si-Drive state - none (in case of Si-Drive error), Intelligent, Sport, Sport Sharp.

Name Descripton
SI_DRIVE_STATE_NONE Error
SI_DRIVE_STATE_INTELLIGENT Si-Drive Intelligent
SI_DRIVE_STATE_SPORT Si-Drive Sport
SI_DRIVE_STATE_SPORT_SHARP Si-Drive Sport Sharp

Structs

debug_variables_t

Used to define a debug variable.

table_2d_noconv_t

Struct that defines pointer structure to 2D table. Data will be returned as is by calling calc_2d_float_to_float, calc_2d_uint8_to_uint8 (not implemented) or calc_2d_uint16_to_uint16 (not implemented) functions.

Struct field Descripton
uint16 x_len X axis elements count
uint16 data_type Data type.Must equals to 0
const void *x_axis_ptr Pointer to X axis array of float
const void *data_ptr Pointer to data array of float, uint8 or uint16

table_2d_uint_t

Struct that defines pointer structure to 2D table. Data will be converted to float at runtime by calling calc_2d_uint_to_float function.

Struct field Descripton
uint16 x_len X axis elements count
uint16 data_type Data type.0x800 for uint16, 0x400 for uint8
const void *x_axis_ptr Pointer to X axis array of float
const void *data_ptr Pointer to data array.Array type must correspond to the value of data_type field
float multiplier Data cell is multiplied by this number and then ...
float offset ... added with this number

table_3d_uint_t

Struct that defines pointer structure to 3D table. Data will be converted to float at runtime by calling calc_3d_uint_to_float function.

Struct field Descripton
uint16 x_len X axis elements count
uint16 y_len Y axis elements count
uint16 data_type Data type.0x8000000 for uint16, 0x4000000 for uint8
const void *x_axis_ptr Pointer to X axis array of float
const void *y_axis_ptr Pointer to Y axis array of float
const void *data_ptr Pointer to data array.Array type must correspond to the value of data_type field
float multiplier Data cell is multiplied by this number and then ...
float offset ... added with this number

ram_variables_t

Struct that defines RAM variables.

Struct field Descripton
uint8 globalMapSwitch What map to use
uint8 mapSelected Actually selected map number
uint8 mafSdBlendMode MAF/SD blending mode
uint8 celLightIsOn Current dashboard CEL light statusSubstitutes ROM CEL light status if CEL Flash Hack #2 is enabled
float airFlowFromMaf Mass airflow from MAF sensor - only if Speed Density enabled
float volumetricEfficiency Volumetric efficiency table value - only if Speed Density enabled
float volumetricEfficiencyTipIn Volumetric efficiency tip-in table value - only if Speed Density enabled
float mafSdBlendValue MAF/SD blending table value - only if Speed Density enabled
float airFlowFromSdNotBlended SD calculated mass airflow without blending
float airFlowFromSD Final SD calculated mass airflow with all corrections applied
uint8 OvertakeMode Overtake mode state
uint8 celFlashEnabled CEL flash enabled/disabled flag - do it needs to flash now
uint8 celLightSavedOemState ROM CEL saved state
int celFlashCounter Counter variable
int celFlashOnCount How long keep CEL light on
int celFlashOffCount How long keep CEL light off
int celFlashCyclesCounter Counter variable for number of on-off cycles