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

Added enum type for hudlane code in honda carcontroller #215

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions selfdrive/car/honda/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
from . import hondacan
from .values import AH
from common.fingerprints import HONDA as CAR
from enum import Enum

class HudLanes:
ENABLED = 0x0
DISABLED = 0x4

def actuator_hystereses(brake, braking, brake_steady, v_ego, car_fingerprint):
# hyst params... TODO: move these to VehicleParams
Expand Down Expand Up @@ -87,9 +91,9 @@ def update(self, sendcan, enabled, CS, frame, actuators, \
# vehicle hud display, wait for one update from 10Hz 0x304 msg
#TODO: use enum!!
if hud_show_lanes:
hud_lanes = 0x04
hud_lanes = HudLanes.ENABLED
else:
hud_lanes = 0x00
hud_lanes = HudLanes.DISABLED

# TODO: factor this out better
if enabled:
Expand Down