Commit Graph
288 Commits
Author SHA1 Message Date
3d25c2a0f8 feat: H7 support (#5738)
Co-authored-by: Richard Li <richard.li@ces.hk>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
2025-01-18 10:08:13 +01:00
raphaelcoefficandRaphael Coeffic 0c5b15121f fix: use saturated sample addition 2025-01-17 13:30:49 +01:00
raphaelcoefficandRaphael Coeffic c8ee302ffe refactor(xlites): moved share DSC / audio jack code into own files 2025-01-17 13:30:49 +01:00
raphaelcoefficandRaphael Coeffic 6d6c449c12 chore: audio drivers cleanup 2025-01-17 13:30:49 +01:00
philmozandGitHub b6d46325f7 chore: cleanup compiler warnings, disable "unaligned pointer value" warning (#5743) 2025-01-01 11:33:32 +10:00
Nigel WilliamsandGitHub 9109d4f46f feat(simu): cross-platform connection of host serial ports to simu radio (#5584) 2024-12-16 20:00:42 +10:00
philmozandGitHub fcc75bd6b7 fix(bw): unshifted trims on XLite radios should always adjust elevator and aileron (#5580) 2024-10-08 10:43:14 +10:00
Peter FeerickandGitHub 839cfbd53c chore: more OTX to ETX housekeeping (#5396) 2024-08-14 21:02:29 +10:00
philmozandGitHub d84a78cc1d fix(radio): issues with rotary encoder (#5194)
- detection of initial direction of encoder after startup
- change of direction issue on radios with incorrectly wired encoder
- handle all wiring variations (without needing special #defines)
- handle the case when the radio is started with the encoder not on a detent position
2024-06-21 12:00:44 +10:00
philmozandGitHub 65e05085a4 feat(bw128): add option to invert LCD/OLED display (#4933) 2024-06-06 07:52:45 +10:00
6579905088 chore(hal): remove StdPeriph (#5023)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: Malte Langermann <malte@langermann.net>
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: Richard Li <richard.li@ces.hk>
2024-06-01 11:45:40 +10:00
David PHAM-VANandGitHub 4b8f80af3a feat: add U-BLOX GPS support (#4689) 2024-04-08 08:36:45 +10: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
philmozandGitHub 7190f00374 chore(radio): Cleanup startup code, fix throttle warning led color, startup haptic option (#4027) 2023-11-05 18:53:26 +10:00
c93695eeaa perf: Process CRSF telemetry by frame (#4038)
Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-10-19 13:31:30 +10:00
f40fa1a64b feat(el18): Use trim hats as keys for navigation (#3894)
Co-authored-by: elecpower <neilh713@tpg.com.au>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-09-29 20:12:54 +10:00
Malte LangermannandGitHub b377a8b5d4 chore: SDIO conversion to HAL (#3182) 2023-08-13 18:56:39 +02:00
Raphael CoefficandGitHub 574369aca4 fix: Use keysGetMaxTrims() instead of MAX_TRIMS (#3860)
* fix: use keysGetMaxTrims() instead of MAX_TRIMS

* feat: add support for virtual trims

This is necessary for radios like X-lite where half of the trims are simulated
2023-07-30 14:18:58 +10:00
2f253d9139 fix(cpn): Pot and slider post ADC refactor fixes (#3731)
* Semantic version housekeeping

* Fix pots and sliders center beep and warnings yaml for adc refactor

* Fix sliders and pots mapping

* Fix 6POS libsimu

* Fix trims

* Updated 6POS calculation thanks to philmoz

* Fix version adc implemented

---------

Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
2023-07-27 14:23:15 +10: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
Malte LangermannandGitHub 8d91c0ae95 chore: Convert simu/simulator/companion to SDL2 (#3085)
* chore(pc): convert simu/simulator/companion to use SDL2

* switch companion builds to SDL2 - OSX is not converted
the linux change is done a bit hacky, it should be done by updating the EdgeTX docker container

* update build system setup scripts

* add compatibility for old and new SDL2 cmake integration

* fix windows installer

* fix simulator audio on windows by using DirectSound vie SDL2

* fix windows audio with SDL2
enable simu for windows builds

* remove workflow changes for linux builds, this needs to be fixed in the build environment

* fix OSX build, thx @pafleraf

* fix windows audio for companion and simulator with SDL2

* select SDL2 branch of the build-docker environment

* Revert "select SDL2 branch of the build-docker environment"

This reverts commit da801609d78e1aed513ad7d9d8ab3ebded2900b9.

* fix tests with SDL2
2023-02-22 20:32:51 +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
Malte LangermannandGitHub a1eabf11a5 chore: convert RTC to HAL (#2866)
* chore: switch RTC to HAL

* chore: remove unneeded files

* fix simu/simulator
2022-12-23 15:38:37 +10:00
Raphael CoefficandGitHub 06c359f096 feat(ACCESS): Configure AUX serial port as "External module" (#2562)
* Enable RX DMA on external module USART

* feat(ACCESS): configure AUX serial port as "External module" (#2562)

This allows configuring the external access mod on runtime rather than by compilation option.

* fix: fetch external module driver
2022-12-14 18:41:32 +10:00
Raphael CoefficandGitHub ba713b6b8d feat: Further improve rotary encoder acceleration (#2584)
* Improve rotary encoder acceleration

Fixes #2417

* Further improvement

* Fix simu compilation
2022-10-19 20:36:29 +10:00
Raphael CoefficandRaphael Coeffic b439f24a10 Simu fixes 2022-06-25 16:09:04 +02:00
Raphael CoefficandRaphael Coeffic ae94dcd12a Radio hardware: make more compact 2022-06-14 22:57:59 +02:00
Raphael CoefficandGitHub a00975d3e5 fix(simulator): fixed LCD flush sync with QT simulator (#2030) 2022-06-12 11:28:05 +02:00
Raphael CoefficandRaphael Coeffic 209b253064 small fixes and size adjustments 2022-06-11 15:38:08 +02:00
gagarinlgandRaphael Coeffic dec89b56c2 fiy simu and firmware compilation issues for different radios 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic db684893e2 Refresh screen via call back set by lcdSetFlushCb 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic df7db43940 Prevent simu lockup on exit 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
RistoandGitHub cdef0d6baf improvement: Change VCP to USB-VCP in the UI (#1849) 2022-04-19 14:20:30 +10:00
Raphael Coeffic 0613a29122 Cleanup 2022-03-25 18:23:19 +01:00
Raphael Coeffic 074a141d81 UI improvements 2022-03-20 16:30:58 +01:00
Raphael Coeffic b5779f2a6a More generic serial port config 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 70e7a0b4ae Fix simu 2022-03-20 16:22:14 +01:00
Raphael Coeffic bbcb33f901 Fixed simu 2022-03-20 16:22:14 +01:00
Raphael Coeffic 3439a94aa4 Some cleanup 2022-03-20 16:22:12 +01:00
Raphael Coeffic d4f75d43c6 Fix simu heartbeat 2022-03-20 16:22:12 +01:00
Raphael CoefficandPeter Feerick a052ba63c2 Remove COPROCESSOR 2022-01-29 14:40:17 +10:00
Raphael CoefficandPeter Feerick 09c49e24ee Remove SKY9X target 2022-01-29 14:40:17 +10:00
1d7b04d679 [nv14] Make Ghost menu work with joystick trims (#1416)
* Update radio_ghost_module_config.cpp

* Update board.h

* Update keys_driver.cpp

* Auto-formatting

* Add functions simply so gtests compiles

* Update board.h

define TRIMS_EMULATE_BUTTONS to avoid HW dependent defines in other code

* Update radio_ghost_module_config.cpp

Use TRIMS_EMULATE_BUTTONS rather than PCBNV14

* `simu` code behind build flag also

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-01-21 14:42:13 +10:00
Malte LangermannandGitHub 9e285b3cb2 [touch] Fix hardware touch diagnostics regression (#1314)
* fix touch screen test in analog input test screen

* remove #if SIMU check for touch test

* remove unneeded trace
2021-12-30 11:46:10 +10:00
Malte LangermannandPeter Feerick 849cc5d5b3 fix simu and simulator touch slide 2021-11-18 10:55:41 +10:00
gagarinlgandPeter Feerick 8360434516 touch on/off with backlight on/off is now working for TX16s, untested, but implemented for NV14
simulator for tX16s and NV14 works
2021-11-16 11:21:04 +10:00