mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
LGTM fixes (#1480)
This commit is contained in:
@@ -64,11 +64,7 @@ def steer_thread():
|
||||
#print "enable", enabled, "steer", actuators.steer, "accel", actuators.gas - actuators.brake
|
||||
|
||||
hud_alert = 0
|
||||
audible_alert = 0
|
||||
if joystick.testJoystick.buttons[2]:
|
||||
audible_alert = "beepSingle"
|
||||
if joystick.testJoystick.buttons[3]:
|
||||
audible_alert = "chimeRepeated"
|
||||
hud_alert = "steerRequired"
|
||||
|
||||
CC.actuators.gas = actuators.gas
|
||||
|
||||
@@ -111,7 +111,6 @@ def ui_thread(addr, frame_address):
|
||||
|
||||
draw_plots = init_plots(plot_arr, name_to_arr_idx, plot_xlims, plot_ylims, plot_names, plot_colors, plot_styles, bigplots=True)
|
||||
|
||||
counter = 0
|
||||
while 1:
|
||||
list(pygame.event.get())
|
||||
|
||||
|
||||
@@ -438,6 +438,7 @@ def main(argv):
|
||||
except TimeoutError:
|
||||
p.terminate()
|
||||
continue
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import cereal.messaging as messaging
|
||||
from opendbc.can.parser import CANParser
|
||||
#from opendbc.can.parser import CANParser
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.boardd.boardd_api_impl import can_list_to_can_capnp
|
||||
from selfdrive.car.honda.values import FINGERPRINTS, CAR
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import numpy as np
|
||||
|
||||
class FakeSteeringWheel():
|
||||
def __init__(self, dt=0.01):
|
||||
# physical params
|
||||
@@ -13,7 +11,7 @@ class FakeSteeringWheel():
|
||||
|
||||
self.angle = 0. # start centered
|
||||
# self.omega = 0.
|
||||
|
||||
|
||||
def response(self, torque, vego=0):
|
||||
exerted_torque = torque * self.DAC
|
||||
# centering_torque = np.clip(-(self.centering_k * self.angle), -1.1, 1.1)
|
||||
|
||||
Reference in New Issue
Block a user