forked from Archive/PX4-Autopilot
Merge branch 'master' into mavlink_stack
This commit is contained in:
commit
e076b5a636
|
@ -17,6 +17,8 @@ mavlink stream -d /dev/ttyACM0 -s ATTITUDE_CONTROLS -r 30
|
||||||
usleep 100000
|
usleep 100000
|
||||||
mavlink stream -d /dev/ttyACM0 -s SERVO_OUTPUT_RAW_0 -r 20
|
mavlink stream -d /dev/ttyACM0 -s SERVO_OUTPUT_RAW_0 -r 20
|
||||||
usleep 100000
|
usleep 100000
|
||||||
|
mavlink stream -d /dev/ttyACM0 -s GLOBAL_POSITION_SETPOINT_INT -r 20
|
||||||
|
usleep 100000
|
||||||
|
|
||||||
# Exit shell to make it available to MAVLink
|
# Exit shell to make it available to MAVLink
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -1049,13 +1049,8 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MavlinkOrbSubscription *pos_sp_triplet_sub;
|
MavlinkOrbSubscription *pos_sp_triplet_sub;
|
||||||
uint64_t pos_sp_triplet_time;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit MavlinkStreamGlobalPositionSetpointInt() : MavlinkStream(),
|
|
||||||
pos_sp_triplet_time(0)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void subscribe(Mavlink *mavlink)
|
void subscribe(Mavlink *mavlink)
|
||||||
{
|
{
|
||||||
pos_sp_triplet_sub = mavlink->add_orb_subscription(ORB_ID(position_setpoint_triplet));
|
pos_sp_triplet_sub = mavlink->add_orb_subscription(ORB_ID(position_setpoint_triplet));
|
||||||
|
@ -1065,7 +1060,7 @@ protected:
|
||||||
{
|
{
|
||||||
struct position_setpoint_triplet_s pos_sp_triplet;
|
struct position_setpoint_triplet_s pos_sp_triplet;
|
||||||
|
|
||||||
if (pos_sp_triplet_sub->update(&pos_sp_triplet_time, &pos_sp_triplet)) {
|
if (pos_sp_triplet_sub->update(&pos_sp_triplet)) {
|
||||||
mavlink_msg_global_position_setpoint_int_send(_channel,
|
mavlink_msg_global_position_setpoint_int_send(_channel,
|
||||||
MAV_FRAME_GLOBAL,
|
MAV_FRAME_GLOBAL,
|
||||||
(int32_t)(pos_sp_triplet.current.lat * 1e7),
|
(int32_t)(pos_sp_triplet.current.lat * 1e7),
|
||||||
|
|
Loading…
Reference in New Issue