forked from Archive/PX4-Autopilot
Revert "Merge pull request #816 from PX4/mavlink_commandlongstream"
This reverts commit00ef10f307
, reversing changes made tod55e64d1e5
.
This commit is contained in:
parent
00ef10f307
commit
27884e49be
|
@ -1271,51 +1271,6 @@ protected:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MavlinkStreamCommandLong : public MavlinkStream
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const char *get_name()
|
|
||||||
{
|
|
||||||
return "COMMAND_LONG";
|
|
||||||
}
|
|
||||||
|
|
||||||
MavlinkStream *new_instance()
|
|
||||||
{
|
|
||||||
return new MavlinkStreamCommandLong();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
MavlinkOrbSubscription *vehicle_command_sub;
|
|
||||||
struct vehicle_command_s *vehicle_command;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void subscribe(Mavlink *mavlink)
|
|
||||||
{
|
|
||||||
vehicle_command_sub = mavlink->add_orb_subscription(ORB_ID(vehicle_command));
|
|
||||||
vehicle_command = (struct vehicle_command_s *)vehicle_command_sub->get_data();
|
|
||||||
}
|
|
||||||
|
|
||||||
void send(const hrt_abstime t)
|
|
||||||
{
|
|
||||||
if (vehicle_command_sub->update(t)) {
|
|
||||||
if (!((vehicle_command->target_system == mavlink_system.sysid) && (vehicle_command->target_component == mavlink_system.compid))) {
|
|
||||||
mavlink_msg_command_long_send(_channel,
|
|
||||||
vehicle_command->target_system,
|
|
||||||
vehicle_command->target_component,
|
|
||||||
vehicle_command->command,
|
|
||||||
vehicle_command->confirmation,
|
|
||||||
vehicle_command->param1,
|
|
||||||
vehicle_command->param2,
|
|
||||||
vehicle_command->param3,
|
|
||||||
vehicle_command->param4,
|
|
||||||
vehicle_command->param5,
|
|
||||||
vehicle_command->param6,
|
|
||||||
vehicle_command->param7);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
MavlinkStream *streams_list[] = {
|
MavlinkStream *streams_list[] = {
|
||||||
new MavlinkStreamHeartbeat(),
|
new MavlinkStreamHeartbeat(),
|
||||||
new MavlinkStreamSysStatus(),
|
new MavlinkStreamSysStatus(),
|
||||||
|
@ -1342,6 +1297,5 @@ MavlinkStream *streams_list[] = {
|
||||||
new MavlinkStreamAttitudeControls(),
|
new MavlinkStreamAttitudeControls(),
|
||||||
new MavlinkStreamNamedValueFloat(),
|
new MavlinkStreamNamedValueFloat(),
|
||||||
new MavlinkStreamCameraCapture(),
|
new MavlinkStreamCameraCapture(),
|
||||||
new MavlinkStreamCommandLong(),
|
|
||||||
nullptr
|
nullptr
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue