mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 22:31:04 +08:00
* feat(commander): only report safety button as available when it is available and configured to be used via COM_PREARM_MODE * feat(commander): add a new option to COM_PREARM_MODE to explicitly and exclusively allow prearming via VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE * feat(commander): explicit dedicated safety-button-only and mavlink-only prearm modes * fix(commander): also accept VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE on Always and Disarmed pre-arm profiles to match documentation * docs(prearm): update docs with new prearm mode behaviour * fix(commander): fix syntax for bool * docs(prearm): revert last param table, as COM_FORCE_SAFETY is already mentioned in a table above. * docs(prearm): fix MAVLink spelling, grammar and parameter table Make the pre-arm docs consistent with the COM_PREARM_MODE parameter and the docs style guide: MAVLink is spelled consistently (page and option labels), selectable option names are shown in code style, the parameter table lists all five COM_PREARM_MODE options with the correct default, and sentences are fixed and put one per line. Question for the author: the COM_PREARM_MODE option labels say "Safety button", while the docs say "safety switch". Are these synonyms? If so, which term should we use in both places? If not, what is the difference? Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Hamish Willee <hamishwillee@gmail.com> * fix(commander): clean up _button_disabled logic: button still needs to be enabled in Disabled and Always prearmed modes to switch safety off. * docs(prearm): adjust COM_PREARM_MODE description and clarify/fix/improve prearm docs * chore(VehicleCommand.msg): improved comments * chore(msg): v0->v1 translation for VehicleCommand.msg * Revert "chore(msg): v0->v1 translation for VehicleCommand.msg" This reverts commit 50ea14fc76310ba7b53ebcd1c6ee8cf4e1c0776b. * feat(commander): deny VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE when not accepted * feat(commander): COM_SAFETY_MODE replaces CBRK_IO_SAFETY * docs(prearm): update docs with new COM_SAFETY_MODE behaviour * docs(prearm): minor cleanup * fix(commander): migrate CBRK_IO_SAFETY and correct safety ACKs A stored CBRK_IO_SAFETY=0 was dropped on import, so upgraded vehicles booted with COM_SAFETY_MODE=0 and safety off. The CAN GPS nodes have no commander, so setting COM_SAFETY_MODE there only logged an error at boot. A SAFETY_SAFE command in mode 0 and ESC calibration with safety on were ACKed ACCEPTED while doing nothing. Assisted-by: Claude:claude-opus-5-5 --------- Signed-off-by: Hamish Willee <hamishwillee@gmail.com> Co-authored-by: Hamish Willee <hamishwillee@gmail.com> Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>