Commit Graph

25838 Commits

Author SHA1 Message Date
acfloria 6f0d3ffe9b Mavlink: Add acknowledge for VEHICLE_CMD_CONTROL_HIGH_LATENCY 2018-04-11 15:15:28 +02:00
acfloria 2a5c7efd8d Mavlink: Use filtered update rate for HIGH_LATENCY2 stream instead of main loop delay 2018-04-11 15:15:28 +02:00
acfloria e9dde721f7 Commander: Remove Mavlink from CMakeFile 2018-04-11 15:15:28 +02:00
acfloria 8c0450b483 revert v2 cmake changes 2018-04-11 15:15:28 +02:00
acfloria b95d65df53 Commander: Fix bug when changing to high latency telemetry
Due to the old heartbeat of the high latency telemetry when activating it after flying sufficiently long in normal telemetry it is first detected as lost until the first message is sent.
By updating the heartbeat to the current time on switching this issue is avoided.

Also includes a small style fix for the HIGH_LATENCY2 stream
2018-04-11 15:15:28 +02:00
acfloria 1124a397f2 Commander: Move telemetry logic to separate functions 2018-04-11 15:15:28 +02:00
acfloria 443a4016af Commander: Improve handling and generating of VEHICLE_CMD_CONTROL_HIGH_LATENCY 2018-04-11 15:15:28 +02:00
acfloria da57dbbce0 Increase the MavLink module stack size 2018-04-11 15:15:28 +02:00
acfloria b66b997c66 IridiumSBD: Robustify state machine and fix format
- Check if changing to a non standby state if the current state is the standy state and no change is already scheduled.
- Add prefix _ to all class variables
2018-04-11 15:15:28 +02:00
acfloria 63cb895a1d MavlinkStream: Ensure that not multiple messages are sent after some time sending nothing 2018-04-11 15:15:28 +02:00
acfloria 0e89a6b8bd IridiumSBD: Do not allow stopping the driver when the device is used to prevent hardfault 2018-04-11 15:15:28 +02:00
acfloria d4f703bde8 IridiumSBD: Improve TX buffer handling
- Allow using the full buffer size (340 bytes)
- Add tx mutex for sbd session to avoid dropping message which are written during an sbd session
2018-04-11 15:15:28 +02:00
acfloria 28da1492d3 IridiumSBD: Only write to modem if new data arrived 2018-04-11 15:15:28 +02:00
acfloria 44937c3a99 Iridiumsbd driver: Publish log message when TX buffer is deleted 2018-04-11 15:15:28 +02:00
acfloria 47567c5c24 Improve IridiumSBD TX buffer handling
- Every time data is written to the iridium module all previous untransmitted data is overwritten
- The buffer is reset only on the following conditions
    - A sbd session is successfully completed
    - An incoming mavlink message would result in less than SATCOM_MIN_TX_BUF_SPACE free bytes after it is written
    - Any other incomming data would result in less than SATCOM_MIN_TX_BUF_SPACE free bytes after it is written to the buffer.
2018-04-11 15:15:28 +02:00
acfloria 6c3857a147 Remove exception for command acknowledge in mavlink transmitting 2018-04-11 15:15:28 +02:00
acfloria f5a66782e5 Reduce required stack for HIGH_LATENCY2 2018-04-11 15:15:28 +02:00
acfloria ebb5ec7c46 Fix bug when ISBD parameters were too large 2018-04-11 15:15:28 +02:00
acfloria edd337880d Improve message handling in mavlink IRIDIUM mode
- Do not send any mission updates as they are handled within HIGH_LATENCY2
- Always send a command acknowledge even if transmitting is not enabled
2018-04-11 15:15:28 +02:00
acfloria 32815dc1d3 Only generate the HIGH_LATENCY2 message if transmitting is allowed 2018-04-11 15:15:28 +02:00
acfloria 22e234724f Update timestamp for last sent message im mavlink stream only if the message was sent 2018-04-11 15:15:28 +02:00
acfloria 1fd8b681a0 Transmit one message over high latency telemetry on boot 2018-04-11 15:15:28 +02:00
acfloria 392af4fbb6 Small improvements for the IridiumSBD driver 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 e01763a7c7 Set the HIGH_LATENCY2 stream to a constant rate 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 fa1586249a Fixes IridiumSBD driver bug when transmitting data 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 78950f2b39 Fix format and remove ets driver from fmu-v2 build 2018-04-11 15:15:28 +02:00
acfloria cbe75188e9 Add the HighLatency2 mavlink stream 2018-04-11 15:15:28 +02:00
acfloria 75ed9b002b Add the SimpleAnalyzer to generate messages for MAVLink streams 2018-04-11 15:15:28 +02:00
acfloria a026575e37 commander: Fix for qurt and improve high latency switch logic 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 00f6ef1d2f Style fix and iridium signal check rate fix 2018-04-11 15:15:28 +02:00
acfloria 1223a9abd5 Commander: High latency telem fallback only in non-manual mode 2018-04-11 15:15:28 +02:00
acfloria b613ca051a Refactor Iridiumsbd driver
- Reorder functions so that they have the same order in the .h and .cpp file
- Update documentation for functions
- Make variables and some functions private
2018-04-11 15:15:28 +02:00
acfloria 634697946a Add switch logic for high latency telemetry in commander
Switch to the high latency telemetry, if available, if every low latency link is lost. Switch back if any low latency link is regained. Only indicate that all links are lost if all high and low latency links are lost. Allow different timeouts for high and low latency links.
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
Roman 8f9e8a6282 FixedWingAttitudeControl: use trim airspeed if airspeed is disabled
- prior to this fix the fw attiude controller used airspeed to scale control
surfaces even though airspeed was disabled

Signed-off-by: Roman <bapstroman@gmail.com>
2018-04-11 15:03:45 +02:00
Matthias Grob 711b21cc5b mc_att_control: improve a quaternion control comment 2018-04-11 11:14:47 +02:00
Beat Küng b52a8de5ff nuttx_px4fmu-v2_test.cmake: enable modules required to build mc_pos_control
due to param dependencies
2018-04-11 07:47:06 +02:00
Beat Küng 90513e719e ASSERT: remove some inappropriate asserts
Since assertions lead to crashes, we need better failure handling. In all
the cases in this patch, the assert is not required.

All the ones with the task id should be replaced with the module base
class.

Ah yes, and this reduces flash space, since the ASSERT macro will expand to
a printf that contains the source file name.
2018-04-11 07:47:06 +02:00
Beat Küng a8645b51d5 voted_sensors_update: reduce flash usage by allowing compiler to dedup equal strings
reduces roughly 130 bytes. Almost enough to pass CI.
2018-04-11 07:47:06 +02:00
Beat Küng b97d432844 px4_param.h: add override to _DEFINE_PARAMETER_UPDATE_METHOD_CUSTOM_PARENT 2018-04-11 07:47:06 +02:00
Beat Küng 5eb7d8ec5f flight tasks smoothing: refactor param_find -> Param
Plus some style fixes
2018-04-11 07:47:06 +02:00
Beat Küng 398d511fd9 flight tasks smoothing: fix style issues 2018-04-11 07:47:06 +02:00
Beat Küng 0eaa6222a2 flight tasks: refactor BlockParam -> Param and handle param updates 2018-04-11 07:47:06 +02:00
Beat Küng 2e620cf1d4 mc_pos_control: refactor BlockParam -> Param 2018-04-11 07:47:06 +02:00
nanthony21 0c2b9dc0b8 Fix formatting 2018-04-10 14:03:06 +02:00