From 6c9a87556d6a37410fd9bdca5419ae3e86251e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Tue, 5 Dec 2023 14:42:44 -0800 Subject: [PATCH] joystickd: remove WEB (#30612) Remove WEB option from joystickd old-commit-hash: 6c62a3146607e87c1c4f796eb5a7c988f733d6c1 --- tools/joystick/joystickd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/joystick/joystickd.py b/tools/joystick/joystickd.py index 82847e3fa1..c6024bf5e4 100755 --- a/tools/joystick/joystickd.py +++ b/tools/joystick/joystickd.py @@ -82,9 +82,6 @@ def send_thread(joystick): dat.testJoystick.buttons = [joystick.cancel] joystick_sock.send(dat.to_bytes()) print('\n' + ', '.join(f'{name}: {round(v, 3)}' for name, v in joystick.axes_values.items())) - if "WEB" in os.environ: - import requests - requests.get("http://"+os.environ["WEB"]+":5000/control/%f/%f" % tuple([joystick.axes_values[a] for a in joystick.axes_order][::-1]), timeout=None) rk.keep_time() def joystick_thread(joystick): @@ -101,7 +98,7 @@ if __name__ == '__main__': parser.add_argument('--gamepad', action='store_true', help='Use gamepad configuration instead of joystick') args = parser.parse_args() - if not Params().get_bool("IsOffroad") and "ZMQ" not in os.environ and "WEB" not in os.environ: + if not Params().get_bool("IsOffroad") and "ZMQ" not in os.environ: print("The car must be off before running joystickd.") exit()