Commit Graph
200 Commits
Author SHA1 Message Date
philmozandGitHub 878e3b8951 fix(radio): mix line not working if source is a global variable (#6304) 2025-05-25 12:44:03 +10:00
philmozandGitHub dc156f22b4 fix(radio): value calculation when GV used as source in weight/offset changed from 2.10 (#6250) 2025-05-14 08:41:27 +10:00
raphaelcoefficandRaphael Coeffic 6d6c449c12 chore: audio drivers cleanup 2025-01-17 13:30:49 +01:00
philmozandGitHub b35baecfb9 fix(radio): trim values scaled incorrectly when displayed via Lua (#5674) 2024-11-24 13:22:57 +10:00
philmozandGitHub 7f727cb15c fix(radio): GV calculation and menu navigation in weight/offset/expo fields (#5564) 2024-10-10 11:43:14 +10:00
philmozandGitHub 2be160f1d2 fix(radio): multiplex setting is not valid for 1st line in a mix (#5465) 2024-08-26 20:53:55 +10:00
Peter FeerickandGitHub 839cfbd53c chore: more OTX to ETX housekeeping (#5396) 2024-08-14 21:02:29 +10:00
philmozandGitHub bdfb94ae83 feat: add precision setting for mix delay up & down (#5314) 2024-07-29 20:07:58 +10:00
4b917b762c feat: use any source for expo/weight/offset (#5220)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: elecpower <elecpower@users.noreply.github.com>
2024-07-26 20:51:21 +10:00
280d3af62c feat: customisable switch generated source groups (#5016)
Co-authored-by: elecpower <neilh713@tpg.com.au>
2024-06-08 07:51:46 +10:00
80659c3e3f feat: add inverted sources (#4722)
Co-authored-by: elecpower <neilh713@tpg.com.au>
2024-05-25 09:25:15 +10:00
Raphael CoefficandGitHub 6a59c580ef fix(fw): compilation without AUDIO (#5022) 2024-05-18 14:11:20 +10:00
3djcandGitHub b271d9d5e3 fix: disable override when both GF and SF are off (#4712) 2024-03-10 19:58:55 +10:00
philmozandGitHub 5f32648b21 fix(radio): invalid memory access if SpaceMouse input present but not supported (#4686)
i.e. somehow the input has been specified but not has not been specified as a option in the firmware
2024-03-06 10:31:04 +10:00
philmozandGitHub 84c2d8577e feat(radio): allow prec. for mix slow up/dn to be set to 10 or 100ms (#4612) 2024-02-12 12:01:54 +10:00
dfaad73070 fix: Throttle idle trim handling for surface, enable MT12 tests (#4520)
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
2024-01-21 13:53:25 +10:00
philmozandGitHub 2635a4972b feat: Use trim as a 3POS toggle switch source (#4465) 2024-01-05 19:16:26 +10:00
fa12b27438 feat(radio): Discover SBUS trainer availability (#4266)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2024-01-05 11:48:46 +10:00
philmozandGitHub b53ccfa515 fix(radio): Mix delay not working when mix line has a switch (#4364) 2023-12-21 11:35:18 +10:00
philmozandGitHub 399e55084a fix(color): NV14/EL18 dead zone resetting user choice, improvements to logic (#4064) 2023-11-11 19:35:13 +10:00
Raphael CoefficandGitHub 6eef2540ff refactor(mixer): Improve mixer "delay" option (#4256) 2023-11-07 10:50:41 +10:00
ca5355e0c7 feat: Add support for Radiomaster MT12 (#4277)
Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-11-04 18:18:17 +10:00
b48e07026d feat: More flexible ADC inputs (#3870)
Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
2023-11-02 11:07:53 +10:00
MichaelandGitHub 7400a598a1 feat(lua): Add API for overriding speaker volume (#3784) 2023-10-13 11:37:12 +10:00
philmozandGitHub 776b64c469 feat(radio): Disable Special Functions when feature turned off (#4116) 2023-10-03 10:57:09 +10:00
47ff7284fd fix(radio): Better iteration through mixers on display, sanitize invalid sources (#3999)
* fix: mixer lines with empty source

Fixes #3367

* Fix color mixes display.

---------

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-09-24 15:51:18 +10:00
MichaelandGitHub 2d8d2fcf01 feat: MIN constant as a source option (#3639)
* feature request #1635

- added MIN (-MAX -> -1024) as source

* fix rebase

* fix rebase

* change to use language strings for MIN/MAX instead of instance

updated CN and TX language file for MINuse -RESX for MIN instead of magi numbercode cleanup

* updated test sources

* updated JP language

* JP language: changed translation text

* updated HE language translations
2023-08-28 20:16:00 +10:00
3djcandGitHub 3342d21195 feat: improved OLED brightness handling (#3773) 2023-08-12 11:17:50 +02:00
3djcandGitHub ae8e1fff8a fix: Trainer jack initialisation and driver cleanup (#3811) 2023-08-09 21:08:42 +10:00
Raphael CoefficandGitHub 1912697616 fix: Throttle invert and gimbal dead zone (#3864) 2023-07-30 21:37:21 +10: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
3djcandGitHub d60b544e8c fix: Throttle stick not being detected properly (#3733)
* Fix thottle timer

* More THR source fixes
2023-07-03 11:08:38 +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
philmozandGitHub 5327c890f2 feat: Add options to disable radio and model menu tabs (#3484)
* Add options to disable radio and model menu tabs.
- Update radio and model data structs
- UI for color LCD radios
- Convert existing 'noGlobalFunctions' property.
- Language strings.

* Make 'theme' control specific to color LCD radios.

* Add B&W radio UI.

* Simplify code, reduce compiled code size.
Fix page count display on model select tab.
Fix GVARS for 212x64 radios.

* Collapse timer sections if timer is off.

* Remove 'Use global functions' checkbox from B&W model setup.

* Make preflight checks, throttle and view options sections expand & collapse (default collapsed).

* Fix build.

* Add view options to companion data classes, save and load values in YAML files.
Fix scrolling for radio setup view options.

* Add Companion UI for view option settings.

* Remove 'Mixes' from list of tabs that can be hidden.

* Updated Companion UI from elecpower.

* Use view options flags to enable/disable functionality:
- skip heli mixer logic if heli not enabled
- Remove heli, gvars and telemetry options from source selection if not enabled

* Remove 'flight mode', 'curve' and 'global variable' settings from input & mix editors if option disabled.

* Rename 'View Options' to 'Enabled Features'.
Put GVAR option under Flight Mode and indent text.
Make relationship between FM and GV more obvious.

* Remove global variable option dependency on flight modes.
Hide FM1-FM8 in global variables if flight modes hidden.

* Hide 'Custom Mixer Scripts' in source selection menu popup if disabled.

* Add translation strings for Hebrew language file.

* Fix typo. Add comment for double call to setCurrentTab.
2023-05-22 20:08:16 +10:00
philmozandGitHub fc1d6ba3a0 fix: Change mixer output value calculation to 'round away from 0' instead 'floor' (#3292) 2023-03-19 16:01:27 +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
3djcandGitHub 8ee73a5800 fix(lua): Remove faulty carryTrim, replace with trimSource (#2995)
* Fix carryTrim in LUA

* Remove carryTrim
2023-01-15 11:54:57 +10:00
Raphael CoefficandGitHub 6cc393cef5 fix(gf): reset global function context if disabled (#2578)
Fixes #2577
2022-10-17 12:14:27 +10:00
Jesper FrickmannandGitHub 83fbf1a7f8 feat(lua): Add getSourceValue (#2316)
* Moved getFieldInfo and getValue up right after related functions

* Modified getValue to return a valid status, so Lua can see if it got zero because of invalid source id

* Added new getSourceValue Lua function per Issue #781
Also added alias getSourceInfo for getFieldInfo

* Updated according to comment https://github.com/EdgeTX/edgetx/pull/2175#issuecomment-1245605114

* Replaced isFresh() by !isOld() as requested in https://github.com/EdgeTX/edgetx/pull/2316#issuecomment-1246759370

* Clean up `lua_pushtablenil` - tables cannot hold nil values

* Changed isFresh() to !isOld() ... AGAIN

* Return both `!isOld()` and `isFresh()`

* Return nil for all values if the item does not exist

* Return 0 instead of pushing three nil values

* Update documentation
2022-09-28 09:42:16 +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 0b8d93ca88 WiP: support for LSM6DSxx 2022-06-25 16:09:04 +02:00
d9b51f8ecf feat: Deadzone option for NV14 sticks (#1777)
Imported from open-flysky/Flysky-OpenTX-Test-Branch

* companion: Don't nuke `stickDeadZone` setting

* Implement data storage properly

* Add missing check for NV14 storage struct sizes

* Formatting

* Use one less byte in the packed data struct
Thanks @raphaelcoeffic :)

* Move setting of stickDeadZone default

* Use a Choice combo rather than NumberEdit

* Good riddance magic number

* Also set default stick zone if setting is missing

* Teach tests about `STICK_DEAD_ZONE`

* Tweak choice width

* Cpn NV14 add stick dead zone to hardware and section labels

* Cpn NV14 align default pot names to radio

Co-authored-by: elecpower <neilh713@tpg.com.au>
2022-04-06 10:30:20 +10:00
3djcandRaphael Coeffic d31482c18b Introduce T-pro and function switches handling 2021-12-17 17:07:48 +01:00
Raphael Coeffic 397674021e Improved logical switches 2021-11-10 11:07:02 +01:00
Raphael Coeffic 69c017091a More stringified values 2021-11-10 11:07:01 +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
eshifriandGitHub c1cd083476 allow mixes without source (#665) 2021-09-03 19:05:54 +10:00
3djcand3djc 6aa465a3f8 fix crosstrims trim reset 2020-12-06 11:48:06 +01:00
3djcand3djc c76663d5ad patch throttle trim 2020-12-06 11:45:40 +01:00
Bertrand Songis 42a3198568 Merge with latest 2.3 2020-10-07 21:01:45 +02:00