Commit Graph

536 Commits

Author SHA1 Message Date
acfloria
1fd8b681a0 Transmit one message over high latency telemetry on boot 2018-04-11 15:15:28 +02:00
acfloria
e061b1a3a5 Do not enable hil for high latency mavlink 2018-04-11 15:15:28 +02:00
acfloria
17a157b9da Adopt high latency switching to new MAV_CMD design 2018-04-11 15:15:28 +02:00
acfloria
ce1b908714 Adopt mavlink stream to new HIGH_LATENCY2 definition 2018-04-11 15:15:28 +02:00
acfloria
1cc84ad8c9 Remove magic numbers from commander.cpp and style fixes 2018-04-11 15:15:28 +02:00
acfloria
4f256cca20 Improvements for the iridiumsbd driver
- Update heartbeat after successful sbd session and fill it in the telemetry_status message
- Add parameter for session timeout, read interval, and stacking time
- Add sbd session timeout
- Fix updating the rssi at a constant rate when no sbd session is scheduled
- Add variable timout to read_at function
- Check if test command is valid to avoid being stuck in the test state
2018-04-11 15:15:28 +02:00
acfloria
631f314e89 En-/disable transmitting from a mavlink instance using a uORB message
Allow enabling/disabling transmitting data from all mavlink instances
with a specific mode/type. When disabled the instance can still receive
data. The uORB message used is the vehicle_command and uses the following
parameter:
param1: Specifies the mode/type of the instances to enable/disable transmitting
param2: Boolean to indicate if transmitting should be enabled or disabled
2018-04-11 15:15:28 +02:00
Daniel Agar
f145b65cbb mavlink static streams_list array 2018-04-03 18:37:51 -04:00
Daniel Agar
29b3950747 move geo and geo_lookup to PX4/ecl 2018-03-26 23:16:55 -04:00
Vasily Evseenko
ebe74ccb2e Add 'forced on' flow control mode to mavlink UART (#8776) 2018-03-10 14:54:57 -05:00
Daniel Agar
5ef27c5425 mavlink add minimal mode (#8947) 2018-03-04 17:50:28 -05:00
Daniel Agar
2d27b1eb52 delete unused MAV_TEST_PAR 2018-02-10 20:37:47 -05:00
Beat Küng
a644ed90dd mavlink: use orb_unsubscribe() instead of close() for orb subscription 2018-01-31 15:18:51 +01:00
Jonas Vautherin
38c949731f mavlink_main: fix broadcast computation
The way the broadcast IP is currently fetched is by sending an ioctl()
request. The limitation of this is that the broadcast address may not
be set on the network interface (more specifically, it is usually not
set in docker containers). In those cases, it results in the broadcast
address becoming 0.0.0.0, which is not valid [1].

This fix uses the network IP and the netmask to compute the directed
broadcast address. This should be more reliable, as both of those are
always set on the network interface.

[1]: https://tools.ietf.org/html/rfc1122, section 3.2.1.3 (a)
2018-01-21 14:58:04 +01:00
Lorenz Meier
6227139df1 MAVLink app: Make debug messages a compile time check
The debug messages are too verbose to be run in a production vehicle and inherently were something that should only be run in SITL / debug sessions on hardware. Switching the flag to the PX4_DEBUG() macro does not only make this more explicit, but also saves a lot of flash space that otherwise was consumed by the strings.
2018-01-13 22:02:57 -05:00
Lorenz Meier
2170e7eba0 MAVLink main: Only update internal parameters
All param handling happens in the param manager.
2018-01-08 09:27:22 +01:00
Lorenz Meier
fba592b5fc MAVLink app: Send newest param hash for every param change to notify GCS about change
This should help keeping the GCS up to date about asynchronous changes on the autopilot.
2018-01-08 09:27:22 +01:00
Matthias Grob
70de169f15 Cygwin: Enable build of SITL jMAVsim under Windows using the Cygwin Unix-like environment
Most of the incompatitbilities are luckily similar to the darwin build.
- New target OS __PX4_CYGWIN added because in other build environments on Windows defines will very likely be completely different
- added all necessary exeptions to the defines
- disabled priorities completely because on Windows they are defined 1-32 and with all the arbitrary +40 -40 priority settings there were a lot of problems
  not only did some threads/"virtual tasks" not start because of out of bound priorities but also the resulting scheduling was totally random and inadequate
  with default priorities it ran toally fine during my first tests, should be rethought when windows is used onboard in the future
2018-01-05 14:47:33 -05:00
Daniel Agar
627788c93c mavlink remove unnecessary param set notification 2018-01-04 09:21:17 +01:00
Lorenz Meier
dd7b72dfb0 MAVLink app: Fix boot-time race between receive thread and instantiation. 2017-10-07 13:56:30 +02: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
Beat Küng
dd4be8aecf mavlink: only enable FTP if -x flag is provided 2017-08-24 19:03:58 +02:00
Beat Küng
12f1c342d0 mavlink_main: do not use message_buffer if _ftp_on
if _ftp_on is true, message_buffer was created and read, but it was
actually never written to, so this is not needed. It can only ever be
written to if _forwarding_on is true.
2017-08-24 19:03:58 +02:00
José Roberto de Souza
4462869432 Add support to new fields in command_ack 2017-08-19 09:04:52 +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
José Roberto de Souza
89a428fbfe commander: Keep vehicle_command_ack_s local
No need to keep this struct as global or alive while looping.
2017-08-08 21:46:30 +02:00
Beat Küng
45e185f8e3 mavlink: document verbose command 2017-08-04 18:08:51 +02:00
Beat Küng
cf3b068179 mavlink: add 'verbose [on|off]' command 2017-08-04 18:08:51 +02:00
Beat Küng
371586be2c MAVLink: Add verbose command 2017-08-04 18:08:51 +02:00
Beat Küng
a987886ca3 mavlink: add fence & rally to protocol capabilities 2017-08-04 18:08:51 +02:00
Lorenz Meier
68d70cc8c0 MAVLink: Use modern PX4 output format to enable system logging for errors. 2017-07-29 16:12:41 +02:00
Lorenz Meier
09f1373a08 MAVLink: Adjust stream rates to match real usage 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
dc8caeaedf MAVLink: Default to standard stream config 2017-07-27 10:15:53 +02:00
sanderux
1eda66c9ba Code format 2017-07-27 10:15:53 +02:00
sanderux
7612b94c72 Allow relaying from same system ID or with target component 0 2017-07-27 10:15:53 +02:00
Lorenz Meier
c44322ca15 MAVLink app: Use more advanced forwarding logic 2017-07-27 10:15:53 +02:00
Lorenz Meier
6e97aec8ce MAVLink app: Do not warn about required reboot but rely on param meta. Fixes #7642 2017-07-18 22:51:42 +02:00
Beat Küng
8d7481f9ac load_mon: use ModuleBase & add documentation 2017-07-14 11:57:11 +02:00
Beat Küng
6778be2c6e mavlink: remove 'p' from px4_getopt()
It is not handled and not documented.
2017-07-14 11:57:11 +02:00
Beat Küng
053eb12329 Module documentation: switch to Markdown 2017-07-14 11:57:11 +02:00
Beat Küng
f691ae2a4f mavlink: update usage & module description 2017-07-14 11:57:11 +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
Lorenz Meier
e60fbccbee MAVLink app: Add ability to output packets for training and inspection 2017-06-05 22:44:21 +02:00
Lorenz Meier
8c3b90007c MAVLink app: Enable protocol version handshaking
This allows the ground control station or any other communication partner to query the supported versions. The key aspect is to send the response in MAVLink 2 framing to test the link with a MAVLink 2 framed message.
2017-06-04 16:14:00 +08: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
Beat Küng
3d77102653 mavlink_main: remove MISSION_ITEM from streams configuration 2017-05-18 09:48:14 +02:00
Beat Küng
78c1f51f11 mavlink main: remove mission_manager, param manager, ftp & log handler
Will be moved to the receiver thread
2017-05-18 09:48:14 +02:00