bluerobotics / ping-viewer

Ping Viewer is an open-source application to view and record data from the Blue Robotics Ping Echosounder and Ping360 Scanning Sonar.
https://docs.bluerobotics.com/ping-viewer/
GNU General Public License v3.0
40 stars 38 forks source link

Ping1 firmware update options showing for a Ping2 device #1079

Closed patrickelectric closed 3 weeks ago

patrickelectric commented 1 month ago

We should support Ping2 firmware update

ES-Alexander commented 1 month ago

As a couple of notes:

  1. The distinguishing factor is expected to be device_information.device_revision, which is 1 for original Ping Sonar devices, and 2 for Ping2 Sonar devices
  2. We need to make sure we're actually fetching this, since at the moment it's (usually?) showing up as 0
    • The common.device_information request may be not happening, or failing / timing out the first time, in which case it could be using the default 0 value
    • It's possible we're requesting the old ping1d.firmware_version message (either instead of device_information, or as a fallback), which has device_revision = 0 hardcoded in Ping Viewer
      • We can't meaningfully improve the handling of that message with current firmwares, because the message spec has firmware_version.device_model defined as 1 for all Ping1D devices, not just for the original Ping Sonar, so both firmwares report it as 1
      • One option would be to change to consider firmware_version.device_model as the device_revision value, but then we would need to update the message specification to reflect that, and update its value in the Ping2 firmware to 2, and it would only apply for Ping2 devices with an updated firmware, so it wouldn't be helpful for people trying to update existing Ping2 devices
        • This doesn't seem worth it, since the message is intended to get deprecated anyway (because common.device_information provides more detail, and is consistent across device types)