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
There are two issues with DroneCAN AP_Periph update with MissionPlanner
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:
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