ArduPilot / ArduPilot/MissionPlanner

AP_Periph firmware update with apj file

Open
#3,161 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
2.9k
Avg merge
19h 16m
Merged PRs (30d)
4

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at MissionPlanner's DroneCAN firmware-update flow and trace how local APJ files and internet firmware from the manifest are selected and sent. Check the GetNodeInfo name and hardware_version major/minor fields used for ArduPilot peripherals. Done means APJ files are unpacked correctly and compatible stable, beta, or latest firmware can be selected without affecting other vendors' boards.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.