Commit Graph
158 Commits
Author SHA1 Message Date
ThomasKuehneandGitHub 8225fb21c5 chore(radio): cleanup -Wzero-as-null-pointer-constant warnings (#4851) 2024-04-15 09:31:46 +10:00
raphaelcoefficandPeter Feerick 2d4c1acbfb fix(usb): use usbPlugged() to detect disconnect
`cdcConnected` is updated from the UI task and cannot be used here.

Fixes #4740
2024-03-30 10:16:40 +11:00
c9334ebda3 refactor: USB HAL conversion + USB lib update (#4207)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: Richard Li <richard.li@ces.hk>
2023-12-24 11:01:48 +10:00
cc17046e7a feat: Flysky PL18 Support (#4105)
Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
Co-authored-by: rotorman <risto.koiva@web.de>
Co-authored-by: Xy201207 <yaoxu@flysky.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-12-06 09:00:44 +10:00
Raphael CoefficandGitHub 5153aaeea0 refactor: IWDG driver and EM trigger (#3846) 2023-12-04 07:14:25 +10:00
3djcandGitHub 4485df77bb chore: Cleanup obsolete ioMutex debug lines (#4184) 2023-10-09 19:27:18 +10:00
3djcandGitHub d684930cc9 fix: Allow compile with DEBUG=Y (#4182) 2023-10-09 14:30:24 +10:00
Raphael CoefficandGitHub 3cbcc6b7bf feat: Automatic soft-serial fallback for module ports (#3823) 2023-10-07 12:23:51 +10:00
Raphael CoefficandGitHub 87df8a4f2c refactor: SD card SPI HAL (#3957)
* refactor: SD card SPI driver

* Removed SPI and DMA StdPeriph drivers

* Allow for disabling SPI DMA support

* Disable SPI sdcard CRC support

* Fix 2MHz timer on NV14

* Shared VS1053b driver

* Fix: SPI2 uses PCLK1

* feat: new generic diskio API

* More generic SD_CARD_PRESENT()

* Fixes

* Flush incoming block on token mismatch

* Scratch buffer test

* Incredible hack to re-sync sd card

* fix: SDIO driver
2023-09-23 19:31:56 +10:00
Malte LangermannandGitHub b377a8b5d4 chore: SDIO conversion to HAL (#3182) 2023-08-13 18:56:39 +02:00
Raphael CoefficandMalte Langermann 2b100e0eb5 refact: ADC, switches and keys
Add "hardware_defs" target to dump hardware defines from hal.h per target

Fixed hal.h definitions for switches & ADC inputs

Tools to generate hardware definitions from current hal.h

generator: add support for EXTx and analog switches

WiP

Add generated header to hardware_defs target

Add support for ADC input direction and index per GPIO port

Incredible: it compiles

Removed StdPeriph ADC driver

Works on QX7

Works on TX16S (VBat missing)

Switch driver using generated switches for stm32 targets

Switch driver with generated switches for simu

Use switch names from switch driver

Fixed single conversion handling

Fixed horus VBat reading

Added switch name

Fix warnings about bitfield offsets and GCC 4.4

This is caused by bitfields that cross type boundaries. In this particular case, it happens as the bitfield is not defined the same in `rtc_backup.cpp`.

Switches has already been moved to generic driver

Jitter measurement for each sample, not just for oversampled values

Moved periph clock init to the ADC driver

ADC & GPIOs.

Add switchInit() to init pins

Fix NV14 CMake

Fix taranis target

Fix NV14 (again)

Model audio files: use new interface for switch index

Fix X9-lite

Fix simu headers

Fix getSwitchName()

Add support for ADC switches

Fix switch warning YAML

Test only switches which are defined

Conversions tests for QX7 only on QX7

Fix X12S

Fix function switch names

Enable ADC periph clock before initialising channels

NV14: offset inputs for the sticks & fix switches

WiP: get rid of VSRCRAW and some more

Simu shall use normal ADC driver

fix x7

fix nv14

Fix 9x nav

fix 212x64

fix xlite

fix x9e

fix simu lib

fix unit tests

fix x7 tests

PWM stick values should be written directly into adcValues

... just like FlySky sticks.

fix x12s

fix nv14

Add some support for SPI ADC (only unit tests)

Remove `jq` usage

fix generate_yaml.py for newer libclang

fix pot config

fix stick names

Some YAML generator improvements

Max 16 Pots on COLORLCD

Fix some source names

Use 10 bits for switches to prevent overflow

Removed horus constants for switches & ADC inputs

Fix unit tests

Fix curve edit

Fix libsimulator

Fix function switches (tpro)

Refine ADC & analog API

Moved hardware definitions scripts and templates into own dir

cleanup API refine

Fix unit tests

Mixer: apply calibration only on required inputs

Place ADC switches after all other ADC inputs

Fix X12S

Remove useless TR_POTS_VSRCRAW, TR_SW_VSRCRAW, and TR_VSRCRAW

Cleanup redundant generated YAML parsers

Fixes Boxer rebase

Add boxer to generate-hw-defs.sh

Obsolete LUA exports

Add boxer ADC_DIRECTION

Split generate_hw_defs.py into multiple files

Some cleanup (+ LUA switches)

Fix AXIS definitions

Fixed translation strings declarations

Some rebase fixes

Remove some useless StdPeriph drivers

fix: set pin mode to reset state on usart deinit

fix: use canonical names for calibration data

fix: ADC driver does not care about unconfigured inputs

fix X12S ADC

Add support for ADC conversion chaining

Better X12S ADC implem

Moved X12S ADC driver to HAL/LL

Improve ADC driver separation

Fixed taranis & nv14

Moved PWM gimbals to HAL/LL

Removed useless TR_EXTRA_VSRCRAW

Fixed include guards

Small fixes

Renamed control inputs

Moved internal and external module pulse driver def to boards

Move more things to the generic_stm32 board

Remove STR_VMIXTRIMS

Added analog labels

Generate main control names

Misuse labels / short labels for main controls

Backward compatibility: sliders and legacy names

New keys driver

Let's get rid of StdPeriph headers in simu

Add jinja2 to CI workflows

Use `grep` instead of `sed`

chore: add python jinja2 oto msys setup script

Removed more static definitions and use dynamic ones instead

Fixes X9E

Fix x7 nav too

212 switch display

Fix default sliders

Removed NUM_STICKS

212 switch display working nicely

Surface radio 'stick' replacements

fix: switch, trim & rotary pin init

Remove old key drivers

Removed VKEYS

Removed ETX_FOURCC

Fixed SURFACE_NAME

Removed TR_VSWITCHES & TR_TRIMS_SWITCHES

Fix xpot switches

Store calibrated analogs in physical order

Use getSourceString in drawSource

Implement missing YAML read/write

Fix isSourceAvailableInInputs()

Fix isSourceAvailable()

Some surface fixes

Fix CLI debug

Ported colour UI of analog diagnostics to new ADC API

Small fixes

Better input mapping

Minor tpro fixes

Fix trims available

Remove TX mode choice on surface radio

Rename surface controls

Channel order alignement

Fix throttle warning

Fix checkTrims()

Fix pot config casting issue

Fix IS_SWITCH_FS()

Fixed input mapping

Fix fswitch auto-switch

Fixed storing / reading function switches in YAML

Fix enableVBatBridge() / disableVBatBridge()

Fix interesting mode conversion

Fix sources issues

Fix special funnction list

Proper function switch handling

128 GUI improvements

Fix compilation

Boxer cosmetics

128 hardware screen cosmetic

Fix TX12 switches

More switches fixes

Simplify CPU type handling

Fix flash size

Fixed page-up / page-down in libopenui
2023-06-25 14:32:39 +02:00
3djcandGitHub d383826b3f fix: FrSky BT support on B&W RM radios with BLE port (#3607)
* FrSky BT support on RM radio with BLE port

* Remove hardcoded 'no bt'

* Compilation fix
2023-05-22 19:01:41 +10:00
philmozandGitHub bb83780367 fix(TX16S): Building firmware DEBUG=YES and INTERNAL_MODULE_PXX2=OFF (#3460) 2023-04-15 17:56:54 +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 78e99311c8 feat(GT911): Add CLI command to reset touch panel cfg (#2351)
* GT911: add CLI command to reset config

Related to #2063

* X12S: touch coordinate inversion in GT911 config

Note: config reset with CLI "reset_gt911" required.

* Remove touch sensor software inversion
2022-09-25 20:27:22 +10:00
RistoGitHubNiel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
9dc4065525 feat: Add support for SpaceMouse mod (6D input knob) (#1853)
Use `-DSPACEMOUSE=YES` CMake option to activate on Horus color targets.
Co-authored-by: Niel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
2022-09-18 09:23:48 +02:00
Raphael CoefficandRaphael Coeffic c56b62bd1d Fix passthrough baudrate detection 2022-08-11 12:15:46 +02:00
Raphael CoefficandRaphael Coeffic 4e08e8f6ad Fix UART context in serial passthrough 2022-08-11 12:15:46 +02:00
Raphael CoefficandRaphael Coeffic f952c5f7c7 Internal and external module buffers are now private 2022-08-11 12:15:46 +02:00
Raphael CoefficandRaphael Coeffic 69955e5dd1 some fixes for DEBUG 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic f6565c6826 Horus fixes 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic ee0c37157d Remove legacy fonts and make the bootloader compile with LVGL 2022-06-11 15:38:08 +02:00
Raphael Coeffic c11d7d58ae Moved FreeRTOS to an object library
This also allows for reducing the propagated includes and thus avoid name clashes to FreeRTOS.
2022-04-03 17:50:53 +02:00
Peter FeerickandGitHub dbb9a5e4b2 chore: Introduce FreeRTOS Software timers
Introduce FreeRTOS Software timers
2022-03-31 16:26:38 +10:00
Peter FeerickandGitHub 7b617c1b50 fix: LUA=N compile fixes, radio hardware tab bottom padding (for touch) (#1755)
* Fix `LUA=N` compile breakage and tidyup on NV14

* Alignment and padding
Resolves #1751 but incomplete solution,
as the real cuplrit appears to somehow
be in `InternalModuleWindow`
2022-03-31 11:52:17 +10:00
Raphael Coeffic a994fc708a WiP internal module buffer 2022-03-25 18:15:56 +01:00
Jonathan HudsonandGitHub 3732d7623f implement canonial terminal back delete (#1712) 2022-03-21 12:58:10 +10:00
Raphael Coeffic 4bdd7e7ea7 GPS support at runtime 2022-03-20 16:30:58 +01:00
Raphael Coeffic b39baa2360 Use USB VCP as a normal serial driver as well 2022-03-20 16:22:14 +01:00
Raphael Coeffic 530d395204 WiP 2022-03-20 16:22:14 +01:00
Raphael Coeffic 025659ac36 Add support for RX DMA 2022-03-20 16:22:14 +01:00
Raphael Coeffic f733810c79 WiP: refactor serial ports 2022-03-20 16:22:12 +01:00
Peter Feerick f0077d4f7e fix: cli typo from b2eb299d04 2022-02-02 12:19:50 +10:00
Peter Feerick b2eb299d04 fix: cli rfmod serial output glitch + add err msgs
Thanks to @CapnBry for spotting this ;)
2022-02-02 12:17:26 +10:00
Raphael CoefficandPeter Feerick 09c49e24ee Remove SKY9X target 2022-01-29 14:40:17 +10:00
Raphael CoefficandGitHub 0ee144dd25 Remove useless DEBUG_TASKS (not supported on FreeRTOS) (#1448) 2022-01-21 12:59:45 +10:00
Raphael Coeffic 37dd890714 Reverted BOOTCMD pin 2021-12-17 15:17:49 +01:00
Raphael Coeffic 1fb06a7c3a Do not use DMA based send in passthrough mode
The USB buffer could be located and CCM, which does not work with DMA.
2021-12-17 15:17:49 +01:00
Raphael Coeffic cd4b782cfe Prepare intmodule bootpin 2021-12-17 15:17:49 +01:00
Raphael CoefficandRaphael Coeffic 5bbc055f3e Remove debug pins 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic a2b7f88e41 Added command to start/stop the pulses 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 81da0bf587 Added power and bootpin commands (Thx @pkendall64) 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 85ec133ff3 Auto baudrate on serialpassthrough
baudrate param becomes optional
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic c5c2829c24 Added baud rate changing on the fly to serial pass through 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic f3301e6210 Added control line and bitrate callbacks
And some additional clean-up
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 01059da849 Fixed serial passthrough exit when pulling USB cable 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic aa7b0143bd Add active polling on UART buffer and bigger USB buffers 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 96743a9fc4 PoC: connect USB/serial ISR directly to the respective serial send
This assumes that USB IRQ has a lower logical prio as the UART IRQ so that it can be pre-empted by the USART ISR.
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 3e390bd582 Cleanup debug pin toggle 2021-11-21 11:18:35 +01:00