Commit Graph

144 Commits

Author SHA1 Message Date
yaapu afa6e30b94 AP_Frsky_Telem: added airspeed flag to frame 0x5005 enabled by a new parameter 2021-07-07 11:53:12 +10:00
yaapu c615706971 AP_Frsky_Telem: added a parameter to set the default FRSky sensor ID for passthrough telemetry 2021-06-03 13:58:55 +10:00
yaapu 870c280946 AP_Frsky_Telem: upgraded SERIAL_PROTOCOL 4 telemetry to 2 bytes data IDs
This upgrades standard SPort telemetry from older 1byte IDs to newer 2bytes IDs.

Older 1 byte data IDs are not supported by the FRSky ETHOS ecosystem so this
migration is required to allow ArduPilot to seamlessly work with ETHOS.
This migration requires users to do a new sensor discovery in OpenTX.
2021-06-02 17:33:15 +10:00
yaapu a5e1a45e7a AP_Frsky_Telem: added hud throttle [-100,100] to frame 0x5001 scaled to [-63,63] on 7bits 2021-06-02 17:30:09 +10:00
yaapu c32676adf5 AP_Frsky_Telem: added (generic) failsafe status bit to frame 0x5001 2021-05-17 13:39:58 +10:00
yaapu dcf85bcf3b AP_Frsky_Telem: added healthy status bit to terrain frame 0x500A 2021-05-17 13:39:08 +10:00
yaapu e1f97becab AP_Frsky_Telem: added fence status data to frame 0x5001 2021-05-12 17:46:00 +10:00
Andrew Tridgell d3e3e58466 AP_Frsky_Telem: change for AP::terrain as a pointer 2021-04-07 20:56:01 +10:00
yaapu b62c2d9518 AP_Frsky_Telem: added new capabilities param to frame 0x5007 2021-03-19 22:35:16 +11:00
yaapu 592fba7416 AP_Frsky_Telem: frame 0x5007 refactoring 2021-03-19 22:35:16 +11:00
yaapu 45f7cb0c82 AP_Frsky_Telem: added passthrough frame 0x500B for height above terrain 2021-03-18 21:43:48 +11:00
Peter Barker 4d2cf8c95b AP_Frsky_SPort: correct handling of RPM sensor data
Nails support down to just two RPM sensors for the time being.

Simplifies things (there was an issue here when I corrected RPM-in-SITL)
2021-03-02 15:41:44 +11:00
Peter Barker c059338386 AP_Frsky_Telem: use location from AHRS not GPS
The AHRS may be able to supply information even in the absense of an
actual GPS unit.
2021-03-02 15:41:44 +11:00
Patrick José Pereira aa55578008 AP_Frsky_Telem: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
yaapu d5868e3c7d AP_Frsky_Telem: added telemetry support for RPM sensors 1 and 2 for SPort, FPort/FPort2 and passthrough over crossfire 2021-02-03 12:49:38 +11:00
yaapu 24382e25fc AP_Frsky_Telem: added support for sending frsky telemetry data from scripting 2021-01-29 09:55:22 +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
Andrew Tridgell 12acc0724e AP_Frsky_Telem: implement BRD_OPTIONS bit for setting of internal parameters 2020-12-08 13:22:17 +11:00
Peter Barker ee43663c7a AP_Frsky_Telem: get airspeed sensor from singleton not AHRS object 2020-12-07 15:57:28 -08:00
Peter Barker 9aec1e48af AP_Frsky_Telem: tidy mavlite message handling
Including calling into reboot-vehicle rather than the hal reboot method.
2020-10-27 10:17:53 +11:00
Peter Barker e0f8e003ec AP_Frsky_Telem: move mavlite message handling to own object 2020-10-27 10:17:53 +11:00
Peter Barker b4e12da2c8 AP_Frsky_Telem: rework SPort-to-MAVlite conversion
Breaks the single object into three distinct parts objects, and hidesas
much information from the other parts as possible.
2020-10-27 10:17:53 +11:00
yaapu 988af83fce AP_Frsky_Telem: added support for frsky sport/fport bidirectional telemetry 2020-10-27 10:17:53 +11:00
yaapu a4297bcdd7 AP_Frsky_SPort: reduce acceptable response delay to 6500us 2020-10-27 10:17:53 +11:00
yaapu 33f19eec27 AP_Frsky_Telem: tidy parsers and splitting of statustexts 2020-10-27 10:17:53 +11:00
yaapu 6abf4ec2b5 AP_Frsky_Telem: tidy creation of frsky data 2020-10-27 10:17:53 +11:00
Peter Barker 6cbb553adc AP_Frsky_Telem: reformat new filed using astyle.sh; no history to lose 2020-09-30 23:14:40 +10:00
Peter Barker 9c211d9847 AP_Frsky_Telem: move #defines to be static const members of AP_Frsky_Backend 2020-09-30 23:14:40 +10: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