From 818bd8a591193b891cee44726203de327c5dd7fb Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 5 Nov 2020 14:11:41 -0800 Subject: [PATCH] trim trailing whitespace --- .github/workflows/test.yaml | 2 +- CONTRIBUTING.md | 2 +- selfdrive/car/toyota/interface.py | 2 +- selfdrive/common/clutil.c | 4 ++-- selfdrive/monitoring/test_monitoring.py | 2 +- tools/nui/nui | 2 +- tools/sim/README.md | 4 ++-- tools/sim/bridge.py | 4 ++-- tools/sim/start_carla.sh | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8747b937f..d79ef849c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -97,7 +97,7 @@ jobs: docker login -u wmelching -p ${{ secrets.COMMA_DOCKERHUB_TOKEN}} docker tag tmppilotwebcam docker.io/commaai/openpilotwebcamci:latest docker push docker.io/commaai/openpilotwebcamci:latest - + docker_push: name: docker push runs-on: ubuntu-20.04 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f54cdf07..6a9f715b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ Code is automatically checked for style by Github Actions as part of the automat We've released a [Model Port guide](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) for porting to Toyota/Lexus models. -If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84). You might also be eligible for a bounty. +If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84). You might also be eligible for a bounty. ## Pull Requests diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 711c65a58..1fa84f915 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -252,7 +252,7 @@ class CarInterface(CarInterfaceBase): ret.mass = 4070 * CV.LB_TO_KG + STD_CARGO_KG ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] ret.lateralTuning.pid.kf = 0.00006 - + elif candidate == CAR.PRIUS_TSS2: stop_and_go = True ret.safetyParam = 73 diff --git a/selfdrive/common/clutil.c b/selfdrive/common/clutil.c index 00d63cdca..dbfc55453 100644 --- a/selfdrive/common/clutil.c +++ b/selfdrive/common/clutil.c @@ -39,7 +39,7 @@ void clu_init(void) { cl_device_id cl_get_device_id(cl_device_type device_type) { bool opencl_platform_found = false; cl_device_id device_id = NULL; - + cl_uint num_platforms = 0; int err = clGetPlatformIDs(0, NULL, &num_platforms); assert(err == 0); @@ -66,7 +66,7 @@ cl_device_id cl_get_device_id(cl_device_type device_type) { break; } free(platform_ids); - + if (!opencl_platform_found) { printf("No valid openCL platform found\n"); assert(opencl_platform_found); diff --git a/selfdrive/monitoring/test_monitoring.py b/selfdrive/monitoring/test_monitoring.py index dd644ca41..6944b5df7 100644 --- a/selfdrive/monitoring/test_monitoring.py +++ b/selfdrive/monitoring/test_monitoring.py @@ -196,7 +196,7 @@ class TestMonitoring(unittest.TestCase): self.assertEqual(events_output[int((_redlight_time+0.5)/DT_DMON)].names[0], EventName.promptDriverDistracted) # 9. op engaged, model is extremely uncertain. driver first attentive, then distracted - # - should pop a uncertain message first, then slowly into active green/orange, finally back to wheel touch but timer locked by orange + # - should pop a uncertain message first, then slowly into active green/orange, finally back to wheel touch but timer locked by orange def test_one_indecisive_model(self): ds_vector = [msg_ATTENTIVE_UNCERTAIN] * int(_UNCERTAIN_SECONDS_TO_GREEN/DT_DMON) + \ [msg_ATTENTIVE] * int(_DISTRACTED_SECONDS_TO_ORANGE/DT_DMON) + \ diff --git a/tools/nui/nui b/tools/nui/nui index 7c77df955..e784247b4 100755 --- a/tools/nui/nui +++ b/tools/nui/nui @@ -4,7 +4,7 @@ if [ $# -gt 0 ]; then if [ "$INTERNAL" = 1 ]; then ./_nui "$1" else - ./get_files_comma_api.py $1 + ./get_files_comma_api.py $1 if [ -f ./_nui ]; then ./_nui use_api elif [ -f _nui.app/Contents/MacOS/_nui ]; then diff --git a/tools/sim/README.md b/tools/sim/README.md index 9f0077570..190ef3447 100644 --- a/tools/sim/README.md +++ b/tools/sim/README.md @@ -11,9 +11,9 @@ First, start the CARLA server. Then start bridge and openpilot. ``` ./start_openpilot_docker.sh -``` +``` -To engage openpilot press 1 a few times while focused on bridge.py to increase the cruise speed. +To engage openpilot press 1 a few times while focused on bridge.py to increase the cruise speed. ## Controls You can control openpilot driving in the simulation with the following keys diff --git a/tools/sim/bridge.py b/tools/sim/bridge.py index 9149ba3b0..92542cf03 100755 --- a/tools/sim/bridge.py +++ b/tools/sim/bridge.py @@ -17,7 +17,7 @@ from selfdrive.test.helpers import set_params_enabled parser = argparse.ArgumentParser(description='Bridge between CARLA and openpilot.') parser.add_argument('--joystick', action='store_true') parser.add_argument('--town', type=str, default='Town04') -parser.add_argument('--spawn_point', dest='num_selected_spawn_point', +parser.add_argument('--spawn_point', dest='num_selected_spawn_point', type=int, default=16) parser.add_argument('--cloudyness', default=0.1, type=float) parser.add_argument('--precipitation', default=0.0, type=float) @@ -145,7 +145,7 @@ def go(q): vehicle_bp = blueprint_library.filter('vehicle.tesla.*')[0] spawn_points = world_map.get_spawn_points() assert len(spawn_points) > args.num_selected_spawn_point, \ - f'''No spawn point {args.num_selected_spawn_point}, try a value between 0 and + f'''No spawn point {args.num_selected_spawn_point}, try a value between 0 and {len(spawn_points)} for this town.''' spawn_point = spawn_points[args.num_selected_spawn_point] vehicle = world.spawn_actor(vehicle_bp, spawn_point) diff --git a/tools/sim/start_carla.sh b/tools/sim/start_carla.sh index 0f911cfda..2be3d0cc3 100755 --- a/tools/sim/start_carla.sh +++ b/tools/sim/start_carla.sh @@ -16,4 +16,4 @@ if ! $(apt list --installed | grep -q nvidia-container-toolkit); then fi docker pull carlasim/carla:0.9.7 -docker run -it --net=host --gpus all carlasim/carla:0.9.7 +docker run -it --net=host --gpus all carlasim/carla:0.9.7