From 9f816bb3befa163524cab5f7f13cce34b5f1e9f4 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 8 Sep 2021 07:25:11 -0700 Subject: [PATCH] Disable DFU support on windows The DFU device appears to behave differently (returns unexpected packets/stati, fails on control transfers, etc) on Windows compared to Linux for unknown obscure reasons. Thus we have to disable DFU support on Windows. --- tools/odrivetool | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/odrivetool b/tools/odrivetool index de54b461..50fe7db9 100755 --- a/tools/odrivetool +++ b/tools/odrivetool @@ -139,6 +139,12 @@ try: elif args.command == 'dfu': print_version() + import platform + if platform.system() == "Windows": + print("This tool does not support firmware update on Windows. Please refer to " + "https://docs.odriverobotics.com/odrivetool#upgrading-firmware-with-a-different-dfu-tool " + "for other options.") + sys.exit(1) import odrive.dfu odrive.dfu.launch_dfu(args, logger, app_shutdown_token)