mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Tools: add USBID to generated apj file
This commit is contained in:
parent
43c8efd820
commit
0888dd9087
@ -155,7 +155,8 @@ class generate_apj(Task.Task):
|
||||
"version": "0.1",
|
||||
"image_size": len(img),
|
||||
"git_identity": self.generator.bld.git_head_hash(short=True),
|
||||
"board_revision": 0
|
||||
"board_revision": 0,
|
||||
"USBID": self.env.USBID
|
||||
}
|
||||
if self.env.build_dates:
|
||||
# we omit build_time when we don't have build_dates so that apj
|
||||
|
@ -186,7 +186,10 @@ class ManifestGenerator():
|
||||
'VRCore-v10': ['0x27AC/0x1910'],
|
||||
'VRUBrain-v51': ['0x27AC/0x1351']
|
||||
}
|
||||
if platform in USBID_MAP:
|
||||
if 'USBID' in apj_json:
|
||||
# newer APJ files have USBID in the json data
|
||||
firmware['USBID'] = apj_json['USBID']
|
||||
elif platform in USBID_MAP:
|
||||
firmware['USBID'] = USBID_MAP[platform]
|
||||
else:
|
||||
# all others use a single USB VID/PID
|
||||
|
Loading…
Reference in New Issue
Block a user