Commit Graph

328 Commits

Author SHA1 Message Date
Daniel Agar b4755297ec delete control_state and cleanup vehicle_attitude (#7882) 2017-09-21 16:24:53 -04:00
Hancheol Choi 43667b240e mavlink fix incorrect attitude_sp subscription in HIGH_LATENCY (#7928) 2017-09-07 09:32:42 -04:00
Julien Lecoeur b0c57fd65b Return bool in added MavlinkStream*::send() 2017-08-30 14:45:02 +01:00
Julien Lecoeur 12353f4da7 Add support for mavlink message DEBUG_VECT 2017-08-30 14:45:02 +01:00
Julien Lecoeur eeb966d375 Add support for mavlink message DEBUG 2017-08-30 14:45:02 +01:00
José Roberto de Souza 66170d1c01 mavlink: Do not miss a vehicle_command
If 2 or more vehicle_command are queued a call to update() will
return the oldest vehicle_command and set the _cmd_time to the
timestamp of the last vehicle_command queued losing it.
Using update_if_changed() fix this causing all item being consumed
one at each call of send().
2017-08-28 08:28:57 +02:00
Daniel Agar b70b8288b9 px4_includes cleanup incomplete list 2017-08-20 20:42:42 +02:00
José Roberto de Souza 925efe990d Initialize all outgoing vehicle_command_ack_s and vehicle_command_s
This will initialize those structs with zero in all fields not set
and all fields set will only be change once to the final value not
wasting CPU time zeroing it.

This will guarantee that no non-unitialized structs will have
a trash value on from_external causing it to be sent to the
MAVLink channel without need it.
2017-08-08 21:46:30 +02:00
José Roberto de Souza 7c268f4fa1 mavlink: Safely avoid send the same vehicle_command and vehicle_command_ack back
The previous approach was checking system id and component id but it
will not work in 100% of cases as external devices can send MAVLink
message with the right system id but with broadcast component id.
2017-08-08 21:46:30 +02:00
Lorenz Meier dc4faa81de MAVLink: Only initialize where required 2017-07-29 16:12:41 +02:00
Lorenz Meier 6b17db35b0 MAVLink: Fix vibration message timestamp 2017-07-29 16:12:41 +02:00
Lorenz Meier 07ced9895c MAVLink: Improve message handling / tracking
The message handling was not obeying action focused messages and high-rate messages properly before. With this change update rates track the desired rates closely. Critical high-rate messages such as ADS-B are queued additionally to guarantee that all received packets are being correctly forwarded.
2017-07-29 16:12:41 +02:00
Lorenz Meier 286c3d41d3 MAVLink app: Send GPS uncertainty via MAVLink 2
This is needed by some consumers like transponders.
2017-07-23 00:16:00 +02:00
Daniel Agar 2939bd9c96 Partial Revert "MAVLink: Add capture command to command queue"
This reverts commit dde5781142.
2017-07-22 11:36:35 +02:00
Lorenz Meier c1f5feac83 MAVLink: Queue transponder reports and send them at full data rate
This will ensure that no transponder reports are dropped and that all received reports are passed on to the GCS and other devices.
2017-07-20 09:13:53 +02:00
Lorenz Meier dde5781142 MAVLink: Add capture command to command queue 2017-07-18 23:05:43 +02:00
José Roberto de Souza 9a05c5f137 mavlink: Send command long when component id is broadcast
Check for the broadcast systemd id to block forward of broadcast
commands.
2017-07-11 09:52:22 +02:00
Lorenz Meier eb5b153d10 MAVLink app: send status text only if connected to something that can actually handle it.
This increases the chance that the operator gets to see the messages that the vehicle emitted before telemetry was connected.
2017-07-09 14:43:24 +02:00
Lorenz Meier d80be2e4ff MAVLink: better output handling 2017-07-08 19:36:58 +02:00
Julian Oes e6d31f951c mavlink_command_sender: fix logic after first test
- change/add a few printfs so they make more sense
- don't accidentally ignore command_acks
- don't forward commands to the same component id, and don't forward
  commands that are broadcast to all components (target component 0)
2017-07-08 11:52:23 +02:00
Julian Oes af0107ae0a mavlink: add class for command retransmission
This adds a class to allow for retransmission of outgoing commands.
The sent commands are kept in a timestamped list to check if they are
acked as required by the mavlink protocol.
If they are not acked within a timeout, they can be retransmitted.
2017-07-08 11:52:23 +02:00
Beat Küng a5485c97e0 mavlink: remove _log_enabled flag
It's obsolete since we removed the mavlink log file
2017-06-04 04:35:21 +08:00
Lorenz Meier e2fa5c2857 MAVLink: Remove status text output
The MAVLink app was logging the status to a file on the SD card, however, this has been integrated into the ulog format since. Having these in multiple locations is unnecessarily confusing to the user and induces load to the system.
2017-06-04 04:35:21 +08:00
Julian Oes 723a6bf6ac mavlink: new MAV_CMD_IMAGE_START_CAPTURE spec
The spec of the mavlink command MAV_CMD_IMAGE_START_CAPTURE has changed.
2017-06-03 02:53:58 +08:00
Lorenz Meier c84611f0f5 MAVLink: Fix rate handling for camera trigger messages 2017-05-19 10:34:43 +02:00
Mohammed Kabir 192e8b48d1 mavlink : send camera_image_captured message 2017-05-12 22:11:17 +02:00
Lorenz Meier 7af7c86384 mavlink : send camera capture information 2017-05-12 22:11:17 +02:00
Daniel Agar f8e291dab1 mavlink VFR_HUD throttle use first 2 groups (#7106)
- fixes #6974
2017-04-22 16:08:27 -04:00
Daniel Agar 34058cbc21 mavlink EXTENDED_SYS_STATUS add takeoff and landing (#7064) 2017-04-17 09:31:49 -04:00
Daniel Agar 79d15ad2f0 mavlink stream camera trigger broadcast DO_DIGICAM 2017-03-26 14:05:38 +02:00
Jon Watson 8a6b6f9be5 Send MAVLink DO_DIGICAM_CONTROL on camera trigger (#6815) 2017-03-24 13:24:09 -04:00
José Roberto de Souza 6ce5807240 mavlink: Send message to control onboard camera as broadcast
The target was it self.
2017-02-25 19:03:45 +01:00
Beat Küng e4ca10363b mavlink MAV_CMD_IMAGE_START_CAPTURE message: send request for highest resolution 2017-02-17 23:01:25 +01:00
James Goppert 7659402fdb WIP: valgrind runtime analysis and fixes (#6521)
* Fix several valgrind identified mem leaks

* Added callgrind target.

* px4_posix_tasks use nullptr
2017-02-17 12:36:52 -05:00
Lorenz Meier 44c8857354 MAVLink app: Update incorrect comment 2017-02-17 10:00:11 +01:00
Kabir Mohammed ea5caf258f mavlink : fix vision debug stream attitude update 2017-02-16 09:53:15 +01:00
Kabir Mohammed f43ee3a0f5 mavlink : use new vision estimate topic and fix stream name 2017-02-15 21:48:33 +01:00
Beat Küng 507e3b0263 camera_trigger: add TRIG_INTERFACE=3 for Mavlink forwarding 2017-02-07 13:36:16 +01:00
wangxdflight b693e29d64 enable px4 flight for excelsior(legacy) 2017-01-16 08:25:58 -08:00
Daniel Agar c9956e25b4 mavlink fix code style 2017-01-07 01:03:18 -05:00
James Goppert 964dabe179 Add better option handling to integration testing script. 2016-12-27 00:34:13 +01:00
Lorenz Meier 9b97e0358b MAVLink: Send correct home heading 2016-12-25 21:30:31 +01:00
Beat Küng 08dc3decb1 mavlink: avoid sending uninitialized data
_global_pos_sub->update(&_global_pos_time, &global_pos); could return
false and in that case global_pos was not set but still accessed.

This is prevented by checking if timestamp == 0.
2016-12-21 11:35:10 +01:00
David Sidrane 81d00e730a Portable fsync call 2016-12-21 08:34:21 +01:00
Julian Oes f6c573e882 mavlink: don't send uninitialized bytes
Valgrind did not approve uninitialized bytes from either home or
vehicle global position to be sent.
2016-12-14 22:08:26 +01:00
Daniel Agar bce7ecb0f6 Iridium driver and support
Mavlink module implement HIGH_LATENCY (Iridium)
2016-12-14 08:20:01 +01:00
Julian Oes 0109f6f549 update mavlink to master, rename MOUNT_STATUS
The mavlink message MOUNT_STATUS has been renamed to MOUNT_ORIENTATION.

This changes the Firmware code accordingly.
2016-11-28 21:01:22 +01:00
Andreas Antener dd8d178168 MAVLink Streams: added collision stream 2016-11-19 14:46:20 +01:00
Lorenz Meier 1f0e630958 Update use of time stamp field 2016-11-17 09:38:56 +01:00
Julian Oes d1d47c4c27 mavlink: send MOUNT_STATUS msg if subscribed
This adds the message MOUNT_STATUS to report about the attitude of a
gimbal.
2016-11-09 10:23:34 +01:00