FW: Abort cube fw that is not compatible

This commit is contained in:
Matt Lawrence 2019-12-30 12:42:11 -05:00 committed by Matt
parent b1ee2c960f
commit ee96f9a0c4
2 changed files with 4 additions and 1 deletions

View File

@ -431,6 +431,8 @@ def load(firmware_path):
else: else:
os.system("rm -f /firmware/*.apj") os.system("rm -f /firmware/*.apj")
os.system("rm -f /firmware/*.px4") os.system("rm -f /firmware/*.px4")
os.system("rm -f /firmware/resetParams")
rebootPixhawk
time.sleep(5) time.sleep(5)
return loaded return loaded

View File

@ -916,10 +916,11 @@ def main():
except RuntimeError as ex: except RuntimeError as ex:
# print the error # print the error
print("\nERROR: %s" % ex.args) print("\nERROR: %s" % ex.args)
sys.exit(1)
except IOError: except IOError:
up.close() up.close()
continue sys.exit(1)
finally: finally:
# always close the port # always close the port