mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
vmount initialize params
- fixes CID 199479
This commit is contained in:
committed by
Lorenz Meier
parent
ce78f254c2
commit
0931efb3f0
@@ -178,19 +178,13 @@ InputMavlinkCmdMount::InputMavlinkCmdMount(bool stabilize)
|
|||||||
{
|
{
|
||||||
param_t handle = param_find("MAV_SYS_ID");
|
param_t handle = param_find("MAV_SYS_ID");
|
||||||
|
|
||||||
if (handle == PARAM_INVALID) {
|
if (handle != PARAM_INVALID) {
|
||||||
_mav_sys_id = 1;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
param_get(handle, &_mav_sys_id);
|
param_get(handle, &_mav_sys_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = param_find("MAV_COMP_ID");
|
handle = param_find("MAV_COMP_ID");
|
||||||
|
|
||||||
if (handle == PARAM_INVALID) {
|
if (handle != PARAM_INVALID) {
|
||||||
_mav_comp_id = 1;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
param_get(handle, &_mav_comp_id);
|
param_get(handle, &_mav_comp_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ private:
|
|||||||
orb_advert_t _vehicle_command_ack_pub = nullptr;
|
orb_advert_t _vehicle_command_ack_pub = nullptr;
|
||||||
bool _stabilize[3] = { false, false, false };
|
bool _stabilize[3] = { false, false, false };
|
||||||
|
|
||||||
int32_t _mav_sys_id; ///< our mavlink system id
|
int32_t _mav_sys_id{1}; ///< our mavlink system id
|
||||||
int32_t _mav_comp_id; ///< our mavlink component id
|
int32_t _mav_comp_id{1}; ///< our mavlink component id
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user