cel_flash.c - aalesv/2boost GitHub Wiki

cel_flash.c

All functions related to CEL flashing located here.

void celTrigger_hooked(void)

This function replaces the original CEL flash outer function in order to implement a flash hack. The function first checks if the vehicle is in overtake mode or if the FBKC conditions are met, and if so, it sets the initial parameters for flashing. Then, the function calls the main CEL flash function celFlash, which is responsible for CEL status setting. Finally, the original CEL flash function is called to perform the actual flashing.

void startFlash(uint8 celFlashOnCount, uint8 celFlashOffCount, uint8 celFlashCyclesCount)

This function is used to set the initial parameters for flashing, such as how long the CEL should be on and off and how many cycles of flashing should occur. These parameters are only set if flashing is globally enabled and if it is not currently flashing.

void celFlash(void)

This is main CEL flash function. It checks if flashing is enabled and then proceeds with the flashing process. It first checks if it needs to start a new flashing stage (when CEL light must be on or off), stores status and then decrements the counter for that stage. Once all cycles have been completed, flashing is stopped.

This page was created with help of ChatGPT

⚠️ **GitHub.com Fallback** ⚠️