bluerobotics / companion

Companion computer startup scripts and examples
https://www.ardusub.com/operators-manual/companion-web.html
GNU General Public License v3.0
48 stars 54 forks source link

reset firmware paramters is flaky #371

Closed jaxxzer closed 2 years ago

jaxxzer commented 3 years ago

I pushed the button three times here, the first two times failed:

Attempting upload from file /home/pi/companion/fw/standard.params
Stopping mavproxy
Resetting parameters to defaults.  OK
Rebooting.
Traceback (most recent call last):
  File "/home/pi/companion/tools/flashPXParameters.py", line 82, in <module>
    msg = master.recv_match()
  File "/usr/local/lib/python2.7/dist-packages/pymavlink-2.2.4-py2.7-linux-armv7l.egg/pymavlink/mavutil.py", line 347, in recv_match
    m = self.recv_msg()
  File "/usr/local/lib/python2.7/dist-packages/pymavlink-2.2.4-py2.7-linux-armv7l.egg/pymavlink/mavutil.py", line 310, in recv_msg
    s = self.recv(n)
  File "/usr/local/lib/python2.7/dist-packages/pymavlink-2.2.4-py2.7-linux-armv7l.egg/pymavlink/mavutil.py", line 832, in recv
    ret = self.port.read(n)
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 501, in read
    'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Attempting upload from file /home/pi/companion/fw/standard.params
Stopping mavproxy

Traceback (most recent call last):
  File "/home/pi/companion/tools/flashPXParameters.py", line 38, in <module>
    raise Exception("port does not exist: %s" % port)
Exception: port does not exist: /dev/autopilot
Attempting upload from file /home/pi/companion/fw/standard.params
Stopping mavproxy

Resetting parameters to defaults.  OK
Rebooting.  OK
waiting for /dev/autopilot to drop...
waiting for connection to /dev/autopilot...
Waiting for heartbeat.
Uploading parameter file.
Sending BATT_CAPACITY = 18000.0          OK
Sending BATT_MONITOR = 4.0           OK
Sending LEAK1_PIN = 55.0             OK
Sending MNT_RC_IN_TILT = 8.0             OK
Sending MNT_TYPE = 1.0           OK
Sending SERVO7_FUNCTION = 59.0           OK
Sending SERVO8_FUNCTION = 7.0            OK
Sending ATC_ANG_RLL_P = 0.0          OK
Sending AHRS_ORIENTATION = 16.0          OK
Sending SERVO8_REVERSED = 1.0            OK
Sending SR0_EXTRA1 = 20.0            OK
Parameter flash successful!
Waiting to restart mavproxy...
Restarting mavproxy