Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

fixed missing imports #237

Merged
merged 1 commit into from
Aug 12, 2023
Merged
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
11 changes: 6 additions & 5 deletions selfdrive/car/gm/carcontroller.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import math

import cereal.messaging as messaging
import numpy as np
from cereal import car
from common.conversions import Conversions as CV
from common.numpy_fast import interp, clip
Expand All @@ -9,7 +10,7 @@
from selfdrive.car.gm import gmcan
from selfdrive.car.gm.values import DBC, CanBus, CarControllerParams, CruiseButtons, CC_ONLY_CAR
from collections import deque
import cereal.messaging as messaging


VisualAlert = car.CarControl.HUDControl.VisualAlert
NetworkLocation = car.CarParams.NetworkLocation
Expand Down Expand Up @@ -90,12 +91,12 @@ def update(self, CC, CS, now_nanos):
self.sm.update(0)


if sm.updated['liveCalibration']:
if self.sm.updated['liveCalibration']:
# self.current_pitch_debug = self.sm['liveCalibration'].liveCalibration.liveMpcDebug.currentPitch
if self.default_pitch == -100.0:
self.default_pitch = np.asarray(sm['liveCalibration'].rpyCalib)[1]
self.default_pitch = np.asarray(self.sm['liveCalibration'].rpyCalib)[1]
else :
self.current_pitch = np.asarray(sm['liveCalibration'].rpyCalib)[1]
self.current_pitch = np.asarray(self.sm['liveCalibration'].rpyCalib)[1]

actuators = CC.actuators
hud_control = CC.hudControl
Expand Down
Loading