Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brake light flickers when brake is at zero #165

Closed
smit-happens opened this issue Apr 29, 2018 · 0 comments
Closed

Brake light flickers when brake is at zero #165

smit-happens opened this issue Apr 29, 2018 · 0 comments
Labels
pedals priority-normal normal stuff size-small A day or 2 to complete

Comments

@smit-happens
Copy link
Owner

smit-happens commented Apr 29, 2018

End goal

stop the flickering

Relevant Info/Links

most likely due to no averaging function performed on the brake pedal

Your Code

void PedalController::CheckBrakeLight(void)
{
    //checks if the brake pedal has been pressed far enough to turn on the brake light
    if(getPercentageBrake() > BRAKE_LIGHT_PERCENT)
        LightController::getInstance()->turnOn(LightController::LIGHT_BRAKE);
    else
        LightController::getInstance()->turnOff(LightController::LIGHT_BRAKE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pedals priority-normal normal stuff size-small A day or 2 to complete
Projects
None yet
Development

No branches or pull requests

1 participant