mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-21 16:13:47 +08:00
enable flake8 E231: missing whitespace after comma
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user