mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Revert "Merge pull request #816 from PX4/mavlink_commandlongstream"
This reverts commit 00ef10f307d3c4a262a15ab5747d854eb4c568d5, reversing changes made to d55e64d1e54542762510387a22897f504c68a5a6.
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[] = {
|
||||
new MavlinkStreamHeartbeat(),
|
||||
new MavlinkStreamSysStatus(),
|
||||
@ -1342,6 +1297,5 @@ MavlinkStream *streams_list[] = {
|
||||
new MavlinkStreamAttitudeControls(),
|
||||
new MavlinkStreamNamedValueFloat(),
|
||||
new MavlinkStreamCameraCapture(),
|
||||
new MavlinkStreamCommandLong(),
|
||||
nullptr
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user