enable flake8 E231: missing whitespace after comma

This commit is contained in:
Adeeb Shihadeh
2020-05-31 12:37:52 -07:00
parent ddcc78d2d5
commit efd5dffb1e
60 changed files with 228 additions and 228 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ def dmonitoringd_thread(sm=None, pm=None):
sm['carState'].steeringPressed = False
sm['carState'].standstill = True
cal_rpy = [0,0,0]
cal_rpy = [0, 0, 0]
v_cruise_last = 0
driver_engaged = False
+5 -5
View File
@@ -10,11 +10,11 @@ class LatControlLQR():
self.scale = CP.lateralTuning.lqr.scale
self.ki = CP.lateralTuning.lqr.ki
self.A = np.array(CP.lateralTuning.lqr.a).reshape((2,2))
self.B = np.array(CP.lateralTuning.lqr.b).reshape((2,1))
self.C = np.array(CP.lateralTuning.lqr.c).reshape((1,2))
self.K = np.array(CP.lateralTuning.lqr.k).reshape((1,2))
self.L = np.array(CP.lateralTuning.lqr.l).reshape((2,1))
self.A = np.array(CP.lateralTuning.lqr.a).reshape((2, 2))
self.B = np.array(CP.lateralTuning.lqr.b).reshape((2, 1))
self.C = np.array(CP.lateralTuning.lqr.c).reshape((1, 2))
self.K = np.array(CP.lateralTuning.lqr.k).reshape((1, 2))
self.L = np.array(CP.lateralTuning.lqr.l).reshape((2, 1))
self.dc_gain = CP.lateralTuning.lqr.dcGain
self.x_hat = np.array([[0], [0]])
+6 -6
View File
@@ -20,15 +20,15 @@ _UNCERTAIN_SECONDS_TO_GREEN = _HI_STD_TIMEOUT + 0.5
class fake_DM_msg():
def __init__(self, is_face_detected, is_distracted=False, is_model_uncertain=False):
self.faceOrientation = [0.,0.,0.]
self.facePosition = [0.,0.]
self.faceOrientation = [0., 0., 0.]
self.facePosition = [0., 0.]
self.faceProb = 1. * is_face_detected
self.leftEyeProb = 1.
self.rightEyeProb = 1.
self.leftBlinkProb = 1. * is_distracted
self.rightBlinkProb = 1. * is_distracted
self.faceOrientationStd = [1.*is_model_uncertain,1.*is_model_uncertain,1.*is_model_uncertain]
self.facePositionStd = [1.*is_model_uncertain,1.*is_model_uncertain]
self.faceOrientationStd = [1.*is_model_uncertain, 1.*is_model_uncertain, 1.*is_model_uncertain]
self.facePositionStd = [1.*is_model_uncertain, 1.*is_model_uncertain]
# driver state from neural net, 10Hz
@@ -64,7 +64,7 @@ def run_DState_seq(driver_state_msgs, driver_car_interaction, openpilot_status,
events_from_DM = []
for idx in range(len(driver_state_msgs)):
e = Events()
DS.get_pose(driver_state_msgs[idx], [0,0,0], 0, openpilot_status[idx])
DS.get_pose(driver_state_msgs[idx], [0, 0, 0], 0, openpilot_status[idx])
# cal_rpy and car_speed don't matter here
# evaluate events at 10Hz for tests
@@ -138,7 +138,7 @@ class TestMonitoring(unittest.TestCase):
# 5. op engaged, invisible driver, down to orange, driver touches wheel; then down to orange again, driver appears
# - both actions should clear the alert, but momentary appearence should not
def test_sometimes_transparent_commuter(self):
_visible_time = np.random.choice([1,10]) # seconds
_visible_time = np.random.choice([1, 10]) # seconds
# print _visible_time
ds_vector = always_no_face[:]*2
interaction_vector = always_false[:]*2