LGTM fixes (#1480)

This commit is contained in:
Adeeb
2020-05-09 16:40:43 -07:00
committed by GitHub
parent b95f45f072
commit 008700a6b3
10 changed files with 14 additions and 26 deletions
-4
View File
@@ -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
-1
View File
@@ -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())
+1
View File
@@ -438,6 +438,7 @@ def main(argv):
except TimeoutError:
p.terminate()
continue
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
+1 -1
View File
@@ -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 -3
View File
@@ -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)