Browse Source

Tools: uploader.py: break out a modemmanager_check

master
Peter Barker 6 years ago committed by Peter Barker
parent
commit
e8b18a46a4
  1. 13
      Tools/scripts/uploader.py

13
Tools/scripts/uploader.py

@ -642,6 +642,14 @@ def ports_to_try(args):
return portlist return portlist
def modemmanager_check():
if os.path.exists("/usr/sbin/ModemManager"):
print("""
==========================================================================================================
WARNING: You should uninstall ModemManager as it conflicts with any non-modem serial device (like Pixhawk)
==========================================================================================================
""")
def main(): def main():
# Parse commandline arguments # Parse commandline arguments
@ -657,10 +665,7 @@ def main():
args = parser.parse_args() args = parser.parse_args()
# warn people about ModemManager which interferes badly with Pixhawk # warn people about ModemManager which interferes badly with Pixhawk
if os.path.exists("/usr/sbin/ModemManager"): modemmanager_check()
print("==========================================================================================================")
print("WARNING: You should uninstall ModemManager as it conflicts with any non-modem serial device (like Pixhawk)")
print("==========================================================================================================")
# Load the firmware file # Load the firmware file
fw = firmware(args.firmware) fw = firmware(args.firmware)

Loading…
Cancel
Save