Commit Graph

113 Commits

Author SHA1 Message Date
Peter Barker 6eae090fc8 AP_Frsky_Telem: allow FRSky to be compiled out 2022-11-15 18:44:45 +11:00
yaapu 6b26a64f77 AP_Frsky_Telem: added support for passthrough telemetry over crossfire 2021-01-20 18:06:24 +11:00
yaapu e044cdfde7 AP_Frsky_Telem: fix for conditional compilation of bidir support 2020-12-09 19:19:06 +11:00
yaapu 988af83fce AP_Frsky_Telem: added support for frsky sport/fport bidirectional telemetry 2020-10-27 10:17:53 +11:00
Peter Barker 0bb7a31850 AP_Frsky_Telem: move all method implementations into correct files 2020-09-30 23:14:40 +10:00
Peter Barker 05d7950261 AP_Frsky_Telem: frontend/backend split 2020-09-30 23:14:40 +10:00
yaapu 683df64d86 AP_Frsky_Telem: fix frsky serial 10 parameters
param rotation now is frame_type, battery_1, battery_2 (only if present)
2020-07-20 20:36:34 +10:00
yaapu 13592cef91 AP_Frsky_Telem: removed time constraint to allow SITL regression testing 2020-05-26 10:02:12 +10:00
yaapu 6303c700d4 AP_Frsky_Telem: prevent SPort frame fragmentation by writing whole 8byte frames vs writing single bytes
general scheduler delays could introduce small delays when writing SPort frames to the uart one byte
at the time potentially leading to rx desyncs on the SPort bus.
This fix replaces single byte writes with full frame writes.

The library has around 10ms to repond to polling so to guarantee frame integrity responses taking
longer than 7500us are discarded
2020-05-26 10:02:12 +10:00
Andy Piper 44e5171f2b AP_Frsky_Telem: refactor common code into AP_RCTelemetry
refactor naming
when using external data AP_Frsky_Telem::init() has to call AP_RCTelemetry::init() and exit.
No need to initialize serial ports
2020-05-05 09:23:15 +10:00
yaapu fed8ecc3b0 AP_Frsky_Telem: fix for protocol=4 GAlt=0 and GSPd=0
This fixes protocol 4 GPS altitude and speed error, both were reported as constant 0
for cal_gps_position() was never called
2020-03-31 13:09:35 +11:00
yaapu 0c5618c9e7 AP_Frsky_Telem: add semaphores to ahrs access and fix potential array out of bounds access
use a semaphore for non atomic ahrs calls and fix a potential array out of bounds
access for faster than sport telemetry links.
2020-02-21 07:54:59 +11:00
yaapu b606c0df64 AP_Frsky_Telem: added VSpd to telemetry protocol 4
The Frsky vario "virtual" sensor was reporting altitude but not vertical speed.
This patch adds VSpd as a new sensor when protocol 4 is selected.
GPS frsky sensor is migrated to 2 byte sensor ID and needs rediscovery if using the previous 1 byte version
2020-02-09 20:52:58 +11:00
yaapu e9e02542f1 AP_Frsky_Telem: fix for missing WFQ scheduler initialization
this fixes a missing WFQ scheduler initialization and sets a rate limiter on
status text messages to prevent text corruption
2020-01-11 07:52:09 +11:00
Andrew Tridgell 3556f33051 AP_Frsky_Telem: fixed a race condition with statustext handling
this fixes an issue that can cause a hardfault. See this bug report:

https://discuss.ardupilot.org/t/hexa-crash-after-watchdog-reset/50917

ObjectArray is not thread safe
2020-01-10 19:43:36 +11:00
Andrew Tridgell 9579e64a03 AP_Frsky_Telem: make get_telem_data() static
auto-create the object when it is needed for FPort
2020-01-02 09:52:57 +11:00
Andrew Tridgell 49f81fbd18 AP_FrSky_Telem: allow for external library to send SPort data
this provides the API needed for AP_RCProtocol_FPort to send
passthrough data over FPORT
2020-01-02 09:52:57 +11:00
yaapu dddfaa256f Ap_Frsky_Telem: replaced the passthrough scheduler with a WFQ one.
This replaces the default scheduler with a WFQ one
2019-10-29 10:27:17 +11:00
Andrew Tridgell 7afd51d03e AP_Frsky_Telem: move FrSky handling to it's own thread
we are getting timing issues sharing with the other users of the IO
thread. The FrSky protocols are quite timing sensitive, so this should
help
2019-09-05 10:50:17 +10:00
Michael du Breuil ea82d6ea4c AP_FrSkyTelem: Refactor battery current interface 2019-07-14 00:28:00 -07:00
Michael du Breuil 67898d7320 AP_FrSky_Telem: Don't statically allocate the statustext_queue
This saves 280 bytes of RAM
2019-06-26 11:59:41 +10:00
Michael du Breuil 59e62ca2fc AP_FrSky_Telem: Make init return false if we failed to init 2019-06-26 11:59:41 +10:00
Michael du Breuil 889d9b7348 AP_Frsky: Fix AP_GPS.h include 2019-06-18 10:02:05 +10:00
Pierre Kancir 1abe8c04f2 AP_Frsky_Telem: move get_bearing_cd to Location and rename to get_bearing_to 2019-04-06 09:10:28 +11:00
Michael du Breuil 64c9705679 AP_Frsky_Telem: Improve includes 2019-04-05 20:12:53 +11:00
yaapu efdad1fca7 AP_Frsky_Telem: fix for passthrough telemetry stall while sending message chunks
This prevents the library from giving message chunks a too high priority leading to
all telemetry packets but 0x5006(attitude) to starve.
2019-03-26 13:01:59 +11:00
yaapu aca1651488 AP_Frsky_Telem: fix ap_status_timer handling
method should return only after ap_status_timer has elapsed and vehicle is initialized
otherwise we waste a chance to send a packet
2019-03-24 09:56:37 +11:00
Peter Barker 1efc08b54e AP_FrSky_Telem: eliminate use of Copter's _ap data 2019-03-19 14:39:14 +11:00
Peter Barker 0194cd69a1 AP_Frsky_Telem: take is_flying from AP_Notify 2019-03-19 14:39:14 +11:00
Peter Barker 680008ba4f AP_Frsky_Telem: use gcs() to get frame string 2019-03-19 14:39:14 +11:00
Peter Barker e5818308b9 AP_Frsky_Telem: move FRsky telemetry up into common GCS telemetry class 2019-03-19 14:39:14 +11:00
Michael du Breuil fcb54c2d68 AP_Frsky_Telem: Enforce the use of 0 when velocity_NED is not available 2019-03-19 11:42:54 +11:00
Dr.-Ing. Amilcar do Carmo Lucas f61523b378 AP_Frsky_Telem: replace location_offset() and get_distance() function calls with Location object member function calls
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Peter Barker 9023e6eb7d AP_Frsky_Telem: use rangefinder singleton 2019-02-12 17:53:23 +00:00
Peter Barker 4776183554 AP_Frsky_Telem: use battery singleton 2019-02-12 17:53:23 +00:00
Peter Barker 53111129f2 AP_Frsky_Telem: use AHRS singleton 2019-02-12 17:53:23 +00:00
Peter Barker db4b1aa7aa AP_Frsky_Telem: use serialmanager singleton 2019-02-12 17:53:23 +00:00
Peter Barker 38a649033f AP_Frsky_Telem: adjust for location flags being moved out of union 2019-01-16 11:45:29 +11:00
Peter Barker 902bd7dda6 AP_Frsky_Telem: use mavlink definition to get statustext size
Also, add one for null-termination
2018-10-16 10:11:28 +11:00
Jochen Anglett 1c60417d03 AP_Frsky_Telem: add IMU temperature reporting 2018-10-02 12:02:04 +01:00
Peter Barker 4168bd709c AP_Frsky_Telem: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Michael du Breuil 3f581d0479 AP_Frsky_Telem: Remove unneeded battery failsafe parameters 2018-03-27 22:12:21 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 7d8aeefee4 AP_Frsky_Telem: NFC adapt to new AP_Battery method name 2018-03-03 17:18:54 +00:00
night-ghost 739c873991 AP_Frsky_Telem: fixed build warnings 2018-02-10 09:14:41 +11:00
Peter Barker aea460df2c AP_FrSky: use GPS singleton 2017-12-27 00:58:02 +00:00
Florent Martel fee79afb8e AP_Frsky_Telem: add second battery info 2017-10-27 02:00:29 -07:00
Florent Martel 5d9299d72f AP_Frsky_Telem: add second battery capacity parameter 2017-10-27 02:00:29 -07:00
Florent Martel 949aa4d9ca AP_Frsky_Telem: replace VDOP with extra GPS status bits
This removes VDOP (not really that useful) and replaces two of those
bits with GPS status info that now allows to differentiate between 3D
fix, DGPS, RTK Float, and RTK Fixed. This is written to maximize
backwards compatibility (by not shifting any other bits of the
gps_status variable)
2017-04-19 17:43:17 +01:00
Francisco Ferreira c0238be345
AP_FrSky_Telem: fix sending messages 3 times
Initialize variable
Also some small style changes
2017-03-22 01:23:26 +00:00
Florent Martel 02c0885cfd AP_Frsky_Telem: fixes #5862
MAVLink strings of exactly 50 characters are not NULL terminated, so
instead we must check that the 50th character has been reached.
2017-03-22 01:22:14 +00:00