Commit Graph

39 Commits

Author SHA1 Message Date
Beat Küng 93da0416fa frsky_telemetry: add a '-m <mode>' CLI param
Can be used to avoid auto-detection.

Strangely on the Omnibus via UART4, the auto-detection for single-wire
S.Port did not work when connecting via battery (it works via USB) -
S.Port got detected instead.
Might be a board-specific issue.
2018-07-10 19:39:50 +02:00
Beat Küng 58c8c50174 frsky_telemetry: add scanning timeout parameter, and set it to 15s
This frees unused RAM in case frsky telemetry is not connected.
2018-07-08 23:24:17 +02:00
Beat Küng f3292c7741 frsky_telemetry: add S.Port single-wire support
If S.Port is connected via external inverter or an uninverted signal is
used, the UART needs to be put into half-duplex mode.

This can be used to get uninverted S.Port:
https://oscarliang.com/uninverted-sbus-smart-port-frsky-receivers/

It is not needed for the Pixracer FrSky port.
2018-07-08 23:24:17 +02:00
Beat Küng 1feccfcc81 frsky_telemetry: increase stack size by 52 bytes
As indicated in previous logs (268 bytes left).
2018-07-08 23:24:17 +02:00
Beat Küng 898eb95623 frsky_telemetry cleanup: remove err, use px4_getopt 2018-07-08 23:24:17 +02:00
Giovanni Carbone 16d67ed179 frsky_telemetry improved com port init (fix #9783), minor refactor (#9798)
* frsky_telemetry added support for hw flow control com port and minor improvements

* DTYPE tested OK. Return 0 for unix compatibility, whitespace removed. Full test start - status- stop - start -status OK
2018-06-29 21:41:53 +00:00
acfloria 8825bbed29 Increase the stack size for the IridiumSBD driver 2018-06-29 16:49:30 +00:00
Daniel Agar d73d20bcce systemlib delete unused systemlib.h 2018-06-12 09:06:30 +02:00
Beat Küng dc7db9d793 iridiumsbd: add argc check 2018-06-04 16:33:55 +02:00
acfloria ff4d95168e IridiumSBD: Fix for multiple MT messages
If MT messages are waiting on the server immediately restart a new session.
2018-05-28 09:26:11 +02:00
acfloria ab279d5fe9 IridiumSBD: Fixes for receiving data
- Catch the case where the case where the driver gets stuck because nothing is received by +SBDRB
- Add a mutex for the rx buffer
- Stop the standby loop if a mode change is already scheduled
2018-05-27 12:11:35 -04:00
acfloria 57162ff08d Improve high latency switching and acknowledge
- Move publishing the telemetry status from the IridiumSBD driver to the mavlink instance
- In the commander use the iridiumsbd_status message for heartbeat in case of a high latency link
- Move positive acknowledge to the mavlink instance
- Add a failed acknowledge in the commander if no high latency link exists
2018-05-27 12:11:35 -04:00
acfloria d8cf012641 IridiumSBD: Add iridiumsbd_status uorb message 2018-05-27 12:11:35 -04:00
Daniel Agar 222a91c6be mathlib delete Matrix, Quaternion, Vector 2018-05-23 17:27:09 -04:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Daniel Agar d75fd72c02 stop manually defining physical constants 2018-04-19 07:24:58 +02:00
Daniel Agar 3b5b12e1d1 move baro and magnetometer data out of sensor_combined 2018-04-11 23:26:58 -04:00
Daniel Agar 5dc23def2a move pressure altitude from baros to sensors module 2018-04-11 23:26:58 -04:00
acfloria 0caa4dc171 Mavlink: Don't use a packed struct as input for the convert_limit_safe function
- Addional small cleanup of the iridium driver and the include guards of mavlink module header files
2018-04-11 15:15:28 +02:00
acfloria 975d7ddcb2 IridiumSBD: Clean up MavLink message parsing 2018-04-11 15:15:28 +02:00
acfloria f1a6aecb4d IridiumSBD: Log tx buffer reset in the telemetry_status instead of a status text 2018-04-11 15:15:28 +02:00
acfloria 53fdbb6c04 Remove unnecessary newlines 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 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 ebb5ec7c46 Fix bug when ISBD parameters were too large 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 fa1586249a Fixes IridiumSBD driver bug when transmitting data 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 00f6ef1d2f Style fix and iridium signal check rate fix 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
Daniel Agar 912cb7119e IridiumSBD driver state string constexpr 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
Daniel Agar c459a04b9b organize all telemetry drivers in subdirectory 2018-02-09 22:40:34 +01:00