wip
This commit is contained in:
@@ -10,6 +10,8 @@ from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, Buttons, CarCon
|
||||
from openpilot.selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX
|
||||
from openpilot.common.params import Params
|
||||
|
||||
from openpilot.common.watcher import Watcher
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
LongCtrlState = car.CarControl.Actuators.LongControlState
|
||||
|
||||
@@ -208,6 +210,10 @@ class CarController:
|
||||
new_actuators.steerOutputCan = apply_steer
|
||||
new_actuators.accel = accel
|
||||
|
||||
Watcher.log_watch("hyundai_carcontroller_update_CC", CC)
|
||||
Watcher.log_watch("hyundai_carcontroller_update_CS", CS)
|
||||
Watcher.log_watch("hyundai_carcontroller_update_self", self)
|
||||
|
||||
self.frame += 1
|
||||
return new_actuators, can_sends
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, CAR, DBC, CAN_G
|
||||
from openpilot.selfdrive.car.interfaces import CarStateBase
|
||||
from openpilot.selfdrive.frogpilot.functions.speed_limit_controller import SpeedLimitController
|
||||
|
||||
from openpilot.common.watcher import Watcher
|
||||
|
||||
PREV_BUTTON_SAMPLES = 8
|
||||
CLUSTER_SAMPLE_RATE = 20 # frames
|
||||
STANDSTILL_THRESHOLD = 12 * 0.03125 * CV.KPH_TO_MS
|
||||
@@ -54,6 +56,9 @@ class CarState(CarStateBase):
|
||||
self.params = CarControllerParams(CP)
|
||||
|
||||
def update(self, cp, cp_cam):
|
||||
Watcher.log_watch("hyundai_carstate_update_cp", cp)
|
||||
Watcher.log_watch("hyundai_carstate_update_cp_cam", cp_cam)
|
||||
|
||||
if self.CP.carFingerprint in CANFD_CAR:
|
||||
return self.update_canfd(cp, cp_cam)
|
||||
|
||||
@@ -214,9 +219,13 @@ class CarState(CarStateBase):
|
||||
# put_bool_nonblocking("ExperimentalMode", not experimental_mode)
|
||||
# self.lkas_previously_pressed = lkas_pressed
|
||||
|
||||
Watcher.log_watch("hyundai_carstate_update_self", self)
|
||||
return ret
|
||||
|
||||
def update_canfd(self, cp, cp_cam):
|
||||
Watcher.log_watch("hyundai_carstate_update_canfd_cp", cp)
|
||||
Watcher.log_watch("hyundai_carstate_update_canfd_cp_cam", cp_cam)
|
||||
|
||||
ret = car.CarState.new_message()
|
||||
|
||||
self.is_metric = cp.vl["CRUISE_BUTTONS_ALT"]["DISTANCE_UNIT"] != 1
|
||||
@@ -354,6 +363,8 @@ class CarState(CarStateBase):
|
||||
# put_bool_nonblocking("ExperimentalMode", not experimental_mode)
|
||||
# self.lkas_previously_pressed = lkas_pressed
|
||||
|
||||
Watcher.log_watch("hyundai_carstate_update_canfd_self", self)
|
||||
|
||||
return ret
|
||||
|
||||
# BBOT does not work
|
||||
|
||||
Reference in New Issue
Block a user