Commit Graph
79 Commits
Author SHA1 Message Date
Raphael CoefficandGitHub bf23791fdf fix: Various issues related to IMU sensor (#3171)
* fix(imu): reset error counter on successful IMU query

Please note that the HAL already handles busy I2C bus, so that we should not run into the case where the bus is used and another query is started. However, if that happens, HAL_BUSY will be returned, which leads to -1 being returned in our functions, thus increasing the error count until the sensor stops working.

* fix(imu): move imu init into mixer task

Fixes a race condition between init and use.
2023-02-15 16:05:39 +10:00
Raphael CoefficandGitHub 72193eda82 chore: New module/serial API (#3055)
* WiP: new module interface

* WiP: softserial timer DMA

* WiP: setup() and send() in one step

and remove methods specific to internal or external module

* fixes and extra port config

* horus targets

* module ports have moved

* T8 support (only internal module)

* fix nv14

* stupid GCC....

* disable BT

* remove nv14 telem driver

* remove old aux serial driver

* Move module buffers out of pulses.h

* Soft serial fixes and PXX1 support

* Fixed PPM module output

* Fixed CLI

* compilation fixes

* Ported bluetooth and flysky gimbal to new serial driver

* Re-enable soft-serial RX

* fixes and cleanup

* nv14 fixes

* Fix flysky gimbals

* Ghost module

* 16 bytes of RAM

* Remove getByte from module API

* Ghost cleanup

* fix: _half_duplex_input() must be called after usart init

* WiP

* more cleanup

* Remove board specific settings from PXX1 / PXX2 drivers

* A bit of PXX2 header cleanup

* Add support for OVER8 and ONEBIT

* Add some support for inverters (NV14 / EL18)

* Support NV14 power fixes in generic board

* Fix polarity handling

* Fix RX DMA

* Fix mixer not running

* Add soft-serial polarity control

* Quick fix for telemetry polling while module port is changed

* Fix bootloader DEBUG

* Fix MPM telemetry

* Fix pulse start

* DSM2 soft-serial fallback

* DSMP async module restart

* Fix CRSF LUA upstream

* Remove global variable telemetryProtocol

* Use HAL/LL constants

* Fix various issue with AFHDS3 and NV14/EL18 internal module

* Fixed S.PORT unit tests

* fix: update widx after writing at current index

* fix: init error condition

* Fix: possible infinite loop in _find_port()

* Add support for bidir S.PORT init

* Add support for "getLastByte" in HW serial driver

* PXX1: Add support for S.PORT based on IDLE callback

* Fix rebase error

* Fix softserial _rx_fifo_push()

* Add softserial support for waitForTxCompleted()

* Fix MPM flashing (internal / external)

* Fixed external MPM

* Activate RX DMA on internal module

Seems to work with serial passthrough without issues, at least on the L3R PRO.

* Fix softserial DMA on stdlcd F4 targets

* Add softserial support for 32bit timers (mostly TIM2)

* More precise soft-serial

* Fix MPM update using inverters & HW uart

* Raise S.PORT DMA/USART IRQ prio to achieve faster switching to input

* Remove useless delays

* Fix flashing external ELRS module

* Added a retry mechanism for FrSky S.PORT update

* Remove useless enableRx()

* External FrSky modules are all flashed via S.PORT

* Remove power management unit update

This was only used on the first batch of X-lite.
2023-02-09 19:44:32 +10:00
MichaelandGitHub 34ea422e39 chore: freeRTOS task stack diagnostics (#2976)
* migrated stack diagnostics (available, free) to using built in FreeRTOS builtin function

Note: main stack must be and is treated differently as it is not under FreeRTOS control. main stack is painted by the STM32 startup routine. free main stack is calculated checking the remaining painted stack area.

* corrected my merge error

* missed a blank
2023-01-15 11:48:04 +10:00
Raphael CoefficandGitHub 48be7c263b chore(cmake): CMake cleanup and simplifications (#2620)
* CMake cleanup and simplifications

* Position Independent Code is need for radiolib_native

* Some more cleanup & repair

* Fix SIMU_SRC scope issue

* fix: avoid warnings due to assembler statements from StdPeriph on arm64 native
2022-12-12 13:58:27 +10:00
MichaelandGitHub 513578643c fix(cpn): Calculated telemetery sensors in simulator not updating (#2369) 2022-09-27 19:10:58 +10:00
Raphael CoefficandRaphael Coeffic 0b8d93ca88 WiP: support for LSM6DSxx 2022-06-25 16:09:04 +02:00
Raphael CoefficandRaphael Coeffic 86152da85d Remove scratch buffer 2022-06-11 15:38:08 +02:00
Raphael Coeffic 59191f37c3 Use software timers to trigger telemetry processing 2022-03-25 16:50:00 +01:00
Raphael CoefficandRaphael Coeffic 9d5cd1876c Added support for Lemon-Rx DSMP 2022-03-24 10:40:17 +01:00
Raphael Coeffic 937e92ede7 Moved PPM driver to synchronous mode (horus only)
TODO: trainer output and taranis driver
2022-03-20 16:22:13 +01:00
Raphael Coeffic e5c852ab37 Fixed some compilation issues 2022-03-20 16:22:12 +01:00
rotormanandRisto fc2142ec78 Changed uniformly to EdgeTX boiler plate (also added boiler for files that were missing it). 2021-10-02 14:22:01 +02:00
Raphael CoefficandRaphael Coeffic 004989ea57 [color] Move touch panel init to UI task
This allows for the timeout checks in I2C code to work properly as they are based on SysTick IRQ, which is started by FreeRTOS when the scheduler is started.

Resolves #803
2021-09-26 10:29:39 +02:00
Raphael Coeffic c389000713 Enable pulses for AFHDS2A (avoids WDG reset) 2021-09-19 16:17:47 +02:00
Raphael Coeffic 6a202015e0 Fix flashing firmware over S.Port (modules / receiver).
Resolves #541
2021-08-02 17:28:01 +02:00
Raphael Coeffic 21280c4102 Some cleanup 2021-07-31 17:31:51 +02:00
Raphael Coeffic 56542bf7e8 Some fixes for simu 2021-07-31 17:31:50 +02:00
Raphael Coeffic 40609f5d67 Moved drawSplash() into UI task and fixed task prios 2021-07-31 17:31:50 +02:00
Raphael Coeffic d4edb7713e WiP: FreeRTOS integration 2021-07-31 17:31:49 +02:00
Raphael Coeffic 6bf0fe2889 Cleanup useless code 2021-07-21 16:06:16 +02:00
Raphael Coeffic b3747e0523 Moved telemetry check to execMixerFrequentActions() to avoid colliding with frames sent by the mixer 2021-07-20 16:44:18 +02:00
Raphael CoefficandRaphael Coeffic c8482dfa6f Raised maximum mixer scheduler period to 50ms (20Hz)
Resolves #7
2021-06-04 07:04:45 +02:00
Raphael Coeffic 2f5b522413 Merge branch '2.3' into 2.4 2021-05-16 12:55:21 +02:00
Raphael Coeffic 1452d9548e Merge branch 'otx-2.3' into 2.3 2021-05-16 12:35:28 +02:00
3djc 266ec075d8 Cosmetics 2021-05-12 17:55:45 +02:00
3djc d695719262 Cosmetics 2021-05-12 17:52:03 +02:00
3djc 1703ffc061 latency improve 2021-05-12 17:48:31 +02:00
Raphael CoefficandRaphael Coeffic afef06374a Fix mixer scheduler 33Hz only issue
introduced by opentx/opentx#8474
2021-05-12 07:00:03 +02:00
3djc cfc7c0ea86 Improved sync 2021-05-11 18:15:25 +02:00
3djc 466cd4889c run some task more frequently 2021-04-27 13:04:11 +02:00
3djc 0a5c3d5969 Merge branch '2.3' into 2.4 2021-04-15 10:48:46 +02:00
3djc b1812ce90c Fix T8 2021-04-15 09:42:41 +02:00
Raphael Coeffic f39a4eed95 create mutexes before starting tasks 2021-04-08 19:51:22 +02:00
3djc 9ba3914ec4 Cosmetics 2021-04-05 17:51:13 +02:00
3djc 84387e7e0f Cosmetics 2021-04-05 11:16:17 +02:00
3djc 78dd516069 Allow PCBSKY9X compilation 2021-04-04 19:00:01 +02:00
3djc 41459f180c Merge branch '2.3' into 3djc/2.3-synced 2021-02-16 18:12:56 +01:00
olliw42 514d7cd9d2 TaskIndex enum is not used, and had a superfluous bluetooth entry also 2021-01-26 07:59:56 +01:00
3djc 31c20fc8eb Fix synced 2021-01-08 17:53:38 +01:00
3djc d712a17f62 Handle more module combination 2020-12-22 10:07:37 +01:00
Raphael Coeffic e2fb0522cd fixed pxx1 driver 2020-12-09 07:24:28 +01:00
Raphael Coeffic 92f27a853a moved sync pulse sending to *before* periodic mixer processing
This should enable a more stable pulse sending to the module.
2020-12-09 07:24:27 +01:00
Raphael Coeffic 02660c763a mixer scheduler 2020-12-09 07:24:27 +01:00
3djcandGitHub 205ac7a21d Ghost support (#7900) 2020-08-28 15:54:51 +02:00
3djcandGitHub 2bca354029 Please Travis (#7802) 2020-07-07 17:04:43 +02:00
3djcandGitHub 0eb203e827 Tx16s sbus in (#7787)
Enable SBUS trainer input
2020-07-07 15:56:18 +02:00
Bertrand SongisandGitHub 8c3f226a6e Bsongis/modules sync issue 7288 (#7294)
Fixes #7288
2020-01-13 23:43:13 +01:00
Bertrand SongisandGitHub 4cdd17f0d7 MAGIC value for powerReason should be stored in RTC backup on Horus (#7096)
- Allows the radio main application to start correctly when coming from an app in RAM
- Refactoring of the `UNEXPECTED_SHUTDOWN()` process
- Saves the RTC battery as BACKUP RAM is not needed on normal shutdown
- On PWR OFF on an ALERT, the radio won't show the next alert before shutting down
- Bootloader flashable through the SD Manager
2019-11-21 11:50:33 +01:00
Bertrand Songis e8c7229ff2 Fixes #6727 2019-09-09 14:18:50 +02:00
Bertrand SongisandGitHub 13dee00eed Bsongis/rssi from 2 different modules (#6711)
RSSI from 2 different modules
2019-09-05 17:24:48 +02:00