diff --git a/src/modules/mavlink/mavlink.c b/src/modules/mavlink/mavlink.c index 796d5cbf28..30c2d2b956 100644 --- a/src/modules/mavlink/mavlink.c +++ b/src/modules/mavlink/mavlink.c @@ -50,18 +50,25 @@ /** * MAVLink system ID * @group MAVLink + * @min 1 + * @max 250 */ PARAM_DEFINE_INT32(MAV_SYS_ID, 1); + /** * MAVLink component ID * @group MAVLink + * @min 1 + * @max 50 */ PARAM_DEFINE_INT32(MAV_COMP_ID, 50); + /** * MAVLink type * @group MAVLink */ PARAM_DEFINE_INT32(MAV_TYPE, MAV_TYPE_FIXED_WING); + /** * Use/Accept HIL GPS message (even if not in HIL mode) * @@ -70,6 +77,7 @@ PARAM_DEFINE_INT32(MAV_TYPE, MAV_TYPE_FIXED_WING); * @group MAVLink */ PARAM_DEFINE_INT32(MAV_USEHILGPS, 0); + /** * Forward external setpoint messages * @@ -80,6 +88,18 @@ PARAM_DEFINE_INT32(MAV_USEHILGPS, 0); */ PARAM_DEFINE_INT32(MAV_FWDEXTSP, 1); +/** + * Test parameter + * + * This parameter is not actively used by the system. Its purpose is to allow + * testing the parameter interface on the communication level. + * + * @group MAVLink + * @min -1000 + * @max 1000 + */ +PARAM_DEFINE_INT32(MAV_TEST_PAR, 1); + mavlink_system_t mavlink_system = { 100, 50 diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index a8f07f3e21..326b0b5ab4 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -487,6 +487,9 @@ void Mavlink::mavlink_update_system(void) _param_system_type = param_find("MAV_TYPE"); _param_use_hil_gps = param_find("MAV_USEHILGPS"); _param_forward_externalsp = param_find("MAV_FWDEXTSP"); + + /* test param - needs to be referenced, but is unused */ + (void)param_find("MAV_TEST_PAR"); } /* update system and component id */