joystickd: remove WEB (#30612)

Remove WEB option from joystickd
old-commit-hash: 6c62a31466
pull/32199/head
Kacper Rączy 2 years ago committed by GitHub
parent fa45813b3d
commit 6c9a87556d
  1. 5
      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()

Loading…
Cancel
Save