feat(manifest): emit variant field from .px4board filename stem

Add an explicit "variant" field to the per-build manifest, sourced from
CMake's ${LABEL} variable which is already derived from the .px4board
filename stem (e.g. multicopter.px4board → "multicopter"). This is the
authoritative source of the variant name: CMake uses it everywhere else
in the tree for board selection.

Previously the variant was implicit in "target" (last underscore-
separated segment), forcing consumers to string-split and assume the
target always follows <board>_<variant>. Now it's a stable, machine-
readable field alongside target and label_pretty.

detect_firmware_category() now takes the variant as its first argument
instead of re-deriving it from target, removing a duplicated parse.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche
2026-04-08 22:53:51 -07:00
parent 0be3f937bd
commit 170b7b4102
2 changed files with 14 additions and 10 deletions
+1
View File
@@ -436,6 +436,7 @@ if (TARGET parameters_xml AND TARGET airframes_xml)
--target "${PX4_CONFIG}"
--arch "${CONFIG_ARCH}"
--name "${PX4_BOARD_NAME}"
--variant "${LABEL}"
--chip "${CONFIG_ARCH_CHIP}"
--vid "${CONFIG_CDCACM_VENDORID}"
--pid "${CONFIG_CDCACM_PRODUCTID}"