Commit Graph
84 Commits
Author SHA1 Message Date
philmozandGitHub b16524837a feat: allow Sticky LS state to persist across EM or optionally across reboot (#4978) 2024-06-02 16:22:36 +10:00
philmozandGitHub d21ac7be2c fix(pxx2): prevent unnecessary model yaml rewrite on load (#5047) 2024-05-24 17:12:43 +10:00
philmozandGitHub f28c1150ed refactor(color): use LVGL styles and objects for UI, legacy cleanup (#4407) 2024-04-05 17:33:14 +10:00
3djcandGitHub b0ef60f8dc fix: custom switches startup position need to be loaded on model change (#4809) 2024-03-26 07:07:36 +10:00
3djcandGitHub 21e610028f fix: ignore invalid GVAR feature flag on BW128 UI (#4671) 2024-02-26 10:21:15 +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
MichaelandGitHub c51c91401e fix: Correctly reflect state of AUX1 when DEBUG build (#3814) 2023-10-09 20:07:51 +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
ac4aeef579 chore(color): Use strAppend and strncmp on widgetName to avoid termination issues (#3905)
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-08-05 18:09:53 +10:00
philmozandGitHub 4272a03025 feat(color): Convert top bar display in main view into widgets (#3700)
* Convert radio info (USB, volume, signal strength), date/time and internal GPS display from top bar into widgets.

* Fix B&W build.
2023-08-04 12:14:31 +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
MichaelandGitHub 15849956ce chore: Remove rssiSource and use default value (#3643)
* fixes #2552

- remove edit option rssiSource
- reset rssiOption to default (none) if carried over from OpenTX conversion

* deleted rssiSource functional code Companion, simulator and radio

* forgot one commented line
2023-06-23 13:52:54 +10: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 95cfe47ad8 feat: Skip model load delay if mixer not running (e.g. on startup) (#3454) 2023-04-17 20:47:19 +10:00
MichaelandGitHub 40ef11d7a4 fix: Undesired MPM protocol selection changes (#3444) 2023-04-13 14:39:17 +10:00
Raphael CoefficandGitHub 8560c1f6bf fix: x10 Express boot freeze and bluetooth lockup (#3349)
* Fix attempt for boot issue

* fix: reset BT usart context after de-init
2023-03-26 11:07:56 +10:00
MichaelandGitHub a7688e2b04 fix(colorlcd): ACCESS receivers being lost after sync with Companion (#3355)
* fixes https://github.com/EdgeTX/edgetx/issues/3273

* empty commit to trigger checks

* Companion: moved yaml tag receivers correction to yaml parserCompanion and radio: updated comments
2023-03-23 10:45:24 +10:00
661657feca feat: New advanced joystick mode on radio, improvements to Companion and Simulator joystick support (#3111)
* Allow switches on the connected radio to control switches in the simulator via the joystick interface.

* Merge configurable radio joystick interface from banyaszg.

* Add two more 'axis' channels to companion.

* Fix 6POS from USB joystick to simulator.

* Reduce data size.

* Fix build error on B&W radios.

* Add 'Companion' button mode to work with the button logic in the Companion app.

* Build Companion joystick setup layout at runtime.
Change #define names for simulator joystick.
Allow 15 axes and 32 buttons.
Initial support for trim sliders.

* Remove custom joystick button type for companion - use 3 buttons per switch in companion to control simulator switch state.

* Fix joystick constructor calls parameters. Connect some radio joystick trims to simulator widgets.

* Restore 'companion' button type to reduce number of buttons needed. Make trims work via buttons in USB joystick.

* Connect joystick trim buttons to simulator widgets.

* Use companion source names for trims.

* Add encode / decode of usb joystick custom settings to Companion.

* Convert to lvgl layouts.
Update language files.

* Fix generated YAML storage files.

* Fix initialisation error when editing button channel. Cleanup code.

* Fix rebase.

* Fix refresh of joystick channel list view after editing an entry.
Companion joystick config window uses two columns.

* Fix vertical joystick inversion bug.
Change stick axis labels.

---------

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-03-22 10:31:29 +10:00
3695930242 fix: Sort mixer lines after loading model (#3172)
* fix: sort mixer lines after loading model

Fixes #2806

* fix(cpn): sort mixer lines after loading model

* More efficient swap

---------

Co-authored-by: elecpower <neilh713@tpg.com.au>
2023-02-15 15:11:13 +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
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
e90cd0f440 feat(X10/X12S) Int/Ext Antenna UI (#1765)
* feature(colorlcd): antenna selection

* fix: let's assume all internal XJT modules used in horus targets are either X10 or X12S type

* fix NV14 compilation

Co-authored-by: Raphael Coeffic <raphael.coeffic@frafos.com>
2022-10-11 21:48:46 +10:00
Raphael CoefficandRaphael Coeffic f6565c6826 Horus fixes 2022-06-11 15:38:08 +02:00
Neil HorneandGitHub cba4e07ce1 fix: Pot and slider warnings weren't being set properly on radio or syncing with Companion (#1981)
- fix Companion yaml model read and write
- B&W radios treat bit values the same as color to avoid unnecessary complication for Companion and radio conversions
- B&W radios default is therefore off for all pots and sliders
- B&W radios fix runtime warnings check
- all radios fix to save last pot or slider position when checked and mode AUTO on change of model or power off
- all radios do not display Pots Warning in model setup if no pots or sliders supported
2022-06-07 13:04:40 +10:00
6b557e49ea USB-VCP no OFF if internal RF module is set to CRSF (#1957)
* Do not list OFF on VCP menu if internal RF module is set to CRSF to allow pass-through flashing.
Set USB-VCP automatically to CLI when CRSF mode is selected for internal module and it was previously OFF. Activate CLI when iCRSF is selected.

* Companion part

Co-authored-by: elecpower <neilh713@tpg.com.au>
2022-05-30 22:14:08 +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
Raphael CoefficandGitHub d8075cbabb fix: Internal module setting and applying post load fixes on radio settings (#1787) 2022-04-02 21:28:04 +10:00
Raphael CoefficandRaphael Coeffic 86d1ca4364 Reorganize module type/subType/rfProtocol 2022-03-24 10:40:17 +01:00
Raphael Coeffic bc75bed8c8 Default VCP mode to CLI 2022-03-20 16:30:59 +01:00
Raphael Coeffic 074a141d81 UI improvements 2022-03-20 16:30:58 +01:00
Raphael Coeffic c696313a4e Use simple scheme with direct model slot to model filename 2021-11-10 11:07:00 +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 Coeffic ba906e1d5d [color] Dynamic MPM proto list 2021-09-11 11:10:00 +02:00
Raphael CoefficandRaphael Coeffic 3eeca550da Wait 200ms after switching external module OFF on model change 2021-07-20 12:28:18 +02:00
Raphael Coeffic 0ad4e6fce1 Layouts properly removed & deleted on model change 2021-04-18 07:57:41 +02:00
3djc 70d24506da Merge branch '2.3' into 2.4
# Conflicts:
#	radio/src/fonts/480x272/font_dblsize.png
#	radio/src/fonts/480x272/font_xxlsize.png
#	radio/src/gui/128x64/model_setup.cpp
#	radio/src/gui/128x64/radio_setup.cpp
#	radio/src/gui/480x272/model_receiver_options.cpp
#	radio/src/gui/480x272/model_setup.cpp
#	radio/src/gui/480x272/radio_calibration.cpp
#	radio/src/gui/480x272/radio_hardware.cpp
#	radio/src/gui/common/stdlcd/draw_functions.cpp
#	radio/src/gui/gui_common.cpp
#	radio/src/keys.h
#	radio/src/lua/interface.cpp
#	radio/src/pulses/afhds3.h
#	radio/src/rtos.h
#	radio/src/switches.cpp
#	radio/src/targets/common/arm/stm32/aux_serial_driver.cpp
#	radio/src/targets/horus/CMakeLists.txt
#	radio/src/targets/horus/lcd_driver.cpp
#	radio/src/targets/horus/startup_stm32f42_43xxx.s
#	radio/src/targets/taranis/CMakeLists.txt
#	radio/src/telemetry/crossfire.h
#	radio/src/telemetry/multi.cpp
#	radio/src/translations.cpp
#	radio/src/translations/it.h.txt
#	radio/src/translations/untranslated.h
#	radio/util/font2png.py
#	tools/commit-tests.sh
2021-04-08 11:42:28 +02:00
3djc b78b457234 Please Travis 2021-02-05 13:17:54 +01:00
3djc f7d17b715c Please Travis 2021-02-03 12:00:48 +01:00
3djc f1e957e466 Improve 2021-02-03 10:42:04 +01:00
3djc 17e272412e Fixes 2021-01-15 18:01:16 +01:00
3djcandGitHub e632a335ea Turn off module on model change (#8189) 2021-01-15 17:20:41 +01:00
3djcandGitHub 24f93a7cbe 3djc/2.4 add 2.3 pr (#8099) 2020-11-19 16:32:50 +01:00
3djcandGitHub 8afb48eee2 Stop trainers before changing model (#8075)
Turn off SBUS trainer to allow model switch
2020-11-07 13:00:33 +01:00
3djcandGitHub f06d47732f 2.4 mainview start (#8030)
* Start work on mainview
2020-10-13 16:39:05 +02:00
Bertrand Songis e7f15ee113 Merge with latest 2.3 2020-01-14 17:34:13 +01:00
Bertrand SongisandGitHub 8c3f226a6e Bsongis/modules sync issue 7288 (#7294)
Fixes #7288
2020-01-13 23:43:13 +01:00
Bertrand Songis 4c484017a4 Merge from 2.3 2019-12-05 09:29:11 +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
3djcandGitHub 3a7e006635 Support new Multi 1.3 features (#7077) 2019-11-15 16:20:24 +01:00
Bertrand Songis ae548b9814 New UI continued 2019-10-05 19:01:57 +02:00