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

Improve brake and reverse light trigger logic #7

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Fernando-A-Rocha
Copy link

@Fernando-A-Rocha Fernando-A-Rocha commented May 16, 2024

Brake lights will now only trigger when:

  • vehicle is in a forwards gear (not reverse) and the brake key is pressed
  • vehicle is in reverse gear and the accelarate key is pressed

Reverse light now only triggers when the vehicle is in reverse gear as per getVehicleCurrentGear. Reverse light shows even if the vehicle is unoccupied.

Both lights now only work if the engine is on.

I think this logic makes more sense. Before, the brake lights would turn on even after you released the brake pedal, which doesn't happen on any vehicle IRL or in default SA.

Tested with cvl_admiral.zip by @rifleh700

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant