Skip to content

Commit

Permalink
Revert "Display set speed in km/h in ACC HUD if metric"
Browse files Browse the repository at this point in the history
This reverts commit ca5fcb4.
  • Loading branch information
NeonGalaxy75 committed Jan 6, 2019
1 parent ca5fcb4 commit 518920b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions selfdrive/car/honda/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from selfdrive.car.honda import hondacan
from selfdrive.car.honda.values import AH, CruiseButtons, CAR
from selfdrive.can.packer import CANPacker
from common.params import Params

def actuator_hystereses(brake, braking, brake_steady, v_ego, car_fingerprint):
# hyst params
Expand Down Expand Up @@ -72,7 +71,7 @@ def process_hud_alert(hud_alert):

HUDData = namedtuple("HUDData",
["pcm_accel", "v_cruise", "mini_car", "car", "X4",
"lanes", "beep", "chime", "fcw", "acc_alert", "steer_required", "dist_lines", "dashed_lanes", "speed_units"])
"lanes", "beep", "chime", "fcw", "acc_alert", "steer_required", "dist_lines", "dashed_lanes"])


class CarController(object):
Expand All @@ -85,14 +84,6 @@ def __init__(self, dbc_name, enable_camera=True):
self.enable_camera = enable_camera
self.packer = CANPacker(dbc_name)
self.new_radar_config = False
#self.params = Params()
self.is_metric = Params().get("IsMetric") == "1"
if self.is_metric:
self.speed_units = 2
else:
self.speed_units = 3



def update(self, sendcan, enabled, CS, frame, actuators, \
pcm_speed, pcm_override, pcm_cancel_cmd, pcm_accel, \
Expand Down Expand Up @@ -141,7 +132,7 @@ def update(self, sendcan, enabled, CS, frame, actuators, \
fcw_display, steer_required, acc_alert = process_hud_alert(hud_alert)

hud = HUDData(int(pcm_accel), int(round(hud_v_cruise)), 1, hud_car,
0xc1, hud_lanes, int(snd_beep), snd_chime, fcw_display, acc_alert, steer_required, CS.read_distance_lines, CS.lkMode, self.speed_units)
0xc1, hud_lanes, int(snd_beep), snd_chime, fcw_display, acc_alert, steer_required, CS.read_distance_lines, CS.lkMode)

# **** process the car messages ****

Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/honda/hondacan.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def create_ui_commands(packer, pcm_speed, hud, car_fingerprint, idx):
'ENABLE_MINI_CAR': hud.mini_car,
'HUD_LEAD': hud.car,
'SET_ME_X03': hud.dist_lines,
'SET_ME_X03_2': hud.speed_units,
'SET_ME_X03_2': 0x03,
'SET_ME_X01': 0x01,
'HUD_DISTANCE_3': 1,
}
Expand Down

0 comments on commit 518920b

Please sign in to comment.