mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-15 20:41:35 +08:00
mavlink: add MAV_SIK_RADIO_ID param back in
However, this is now without the functionality to reset to factory default. Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
@@ -2299,6 +2299,15 @@ Mavlink::task_main(int argc, char *argv[])
|
|||||||
mavlink_update_parameters();
|
mavlink_update_parameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_param_sik_radio_id.get() != 0) {
|
||||||
|
const uint8_t ret = configure_sik_radio((uint16_t)_param_sik_radio_id.get());
|
||||||
|
|
||||||
|
if (ret == vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED) {
|
||||||
|
_param_sik_radio_id.set(0);
|
||||||
|
_param_sik_radio_id.commit_no_notification();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_vehicle_status_sub.updated()) {
|
if (_vehicle_status_sub.updated()) {
|
||||||
vehicle_status_s vehicle_status;
|
vehicle_status_s vehicle_status;
|
||||||
|
|
||||||
|
|||||||
@@ -668,6 +668,7 @@ private:
|
|||||||
(ParamInt<px4::params::MAV_SYS_ID>) _param_mav_sys_id,
|
(ParamInt<px4::params::MAV_SYS_ID>) _param_mav_sys_id,
|
||||||
(ParamInt<px4::params::MAV_COMP_ID>) _param_mav_comp_id,
|
(ParamInt<px4::params::MAV_COMP_ID>) _param_mav_comp_id,
|
||||||
(ParamInt<px4::params::MAV_PROTO_VER>) _param_mav_proto_ver,
|
(ParamInt<px4::params::MAV_PROTO_VER>) _param_mav_proto_ver,
|
||||||
|
(ParamInt<px4::params::MAV_SIK_RADIO_ID>) _param_sik_radio_id,
|
||||||
(ParamInt<px4::params::MAV_TYPE>) _param_mav_type,
|
(ParamInt<px4::params::MAV_TYPE>) _param_mav_type,
|
||||||
(ParamBool<px4::params::MAV_USEHILGPS>) _param_mav_usehilgps,
|
(ParamBool<px4::params::MAV_USEHILGPS>) _param_mav_usehilgps,
|
||||||
(ParamBool<px4::params::MAV_FWDEXTSP>) _param_mav_fwdextsp,
|
(ParamBool<px4::params::MAV_FWDEXTSP>) _param_mav_fwdextsp,
|
||||||
|
|||||||
@@ -58,6 +58,18 @@ PARAM_DEFINE_INT32(MAV_COMP_ID, 1);
|
|||||||
*/
|
*/
|
||||||
PARAM_DEFINE_INT32(MAV_PROTO_VER, 0);
|
PARAM_DEFINE_INT32(MAV_PROTO_VER, 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MAVLink SiK Radio ID
|
||||||
|
*
|
||||||
|
* When non-zero the MAVLink app will attempt to configure the
|
||||||
|
* SiK radio to this ID and re-set the parameter to 0. Only applies if this mavlink instance is going through a SiK radio
|
||||||
|
*
|
||||||
|
* @group MAVLink
|
||||||
|
* @min 0
|
||||||
|
* @max 240
|
||||||
|
*/
|
||||||
|
PARAM_DEFINE_INT32(MAV_SIK_RADIO_ID, 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MAVLink airframe type
|
* MAVLink airframe type
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user