MissionPlanner icon indicating copy to clipboard operation
MissionPlanner copied to clipboard

AP_Periph firmware update with apj file

Open tridge opened this issue 2 years ago • 1 comments

There are two issues with DroneCAN AP_Periph update with MissionPlanner

  • loading from an apj file doesn't work. Even worse, if you do select file '.' and select the apj file then it loads the apj file as a bin file (so loads json into flash directly). It should unpack the apj file and send the embedded image
  • choosing to upload from the internet should work. It should look for firmware from the manifest

For finding firmware in the manifest it should use the Name field from GetNodeInfo when it is of this form "org.ardupilot.PLATFORM" where PLATFORM is the platform field in the manifest. Then there will be stable, beta, latest as usual. We can also use the board_id from the GetNodeInfo response field hardware_version.major and minor:

    // use hw major/minor for APJ_BOARD_ID so we know what fw is
    // compatible with this hardware
    pkt.hardware_version.major = APJ_BOARD_ID >> 8;
    pkt.hardware_version.minor = APJ_BOARD_ID & 0xFF;

or we could skip the platform check and offer a list of boards with the given board ID from the manifest. The list will be just one for many/most peripherals, but some like MatekL431-GPS, MatekL431-Rangefinder etc will have multiple matching and the user would need to select We would only do this lookup for boards with a GetNodeInfo name starting with "org.ardupilot" so we don't get it wrong for other vendors boards

tridge avatar Aug 12 '23 22:08 tridge

It supposed to fixed by https://github.com/ArduPilot/MissionPlanner/commit/d5a12c5cd50cfb9d8bf7298daba91c29d54fcbc2 and released in 1.3.81

EosBandi avatar Jan 07 '24 17:01 EosBandi