Commit Graph
183 Commits
Author SHA1 Message Date
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
d396b38e8b feat: Add trainer virtual switch (#3937)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-10-16 08:41:40 +10:00
3djcandGitHub 7f669f12d9 feat: Add initial Jumper T20 support (#3726)
* Jumper T20

* Fix center beeps

* Add option to pinch top trim as well to bootloader

* chore: Regenerate yaml

* chore: Add entry for Buddy

* Jumper T20

* Foldable section for fonction swith and fix preflight pot checks

* Remove duplicated entry

* Rename "function switches" to "customizable switches"

* chore: Add translations

* chore: Update translations

* chore: Update Companion translations/wording
2023-07-07 10:44:14 +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
raphaelcoefficandMalte Langermann c15c5ea9eb fix: switch position if disabled or transitioning 2023-06-25 14:32: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
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 bc8087cbf1 feat: Add Radiomaster Boxer (#2877)
* Radiomaster Boxer

* chore: Add Build system bits

* chore: `EEPROM_VARIANT` no longer used
2022-12-31 16:45:09 +10:00
Raphael CoefficandGitHub e7969e737d fix(tpro): function switches auto-switch & position matching (#2505)
* fix(tpro): auto-switch for function switches

Fixes #1488

* fix(tpro): matching function switch UP position
2022-10-12 12:52:00 +10:00
Raphael CoefficandGitHub 9c951224c7 fix: auto-switch timeout raised to 1s (#2433)
Fixes #2418
2022-10-01 20:22:32 +10:00
Peter FeerickandPeter Feerick 857e863d3c fix(tx12mk2): Switch pos checks 2022-07-22 20:00:39 +10:00
Raphael CoefficandRaphael Coeffic 99ed405b84 fix: switch display 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 30e3ac3399 Basic utf8 support for B&W radios 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
ed7be53565 feat: Function Switch led startup sequence (#1746)
* TPro - Fancy led startup seq

* Cleanup

* fix define for function switches

* added shutdown sequence @pfeerick

* Formatting

Co-authored-by: Batam <batam@macbook-pro.home>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-03-31 11:50:46 +10:00
79e0a212e7 fix: Invalid 'active' state of Sticky LS when no source set (#1430)
* The set/reset switches for a logical switch are only processed if the are valid.

* added coment

* Move / elaborate on comment

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-02-27 11:37:32 +10:00
d1ef6f866c [tpro] fix function switch behaviours and add always on capability (#1479)
* fix: tpro function switch toggle mode

* feat: Function switches now have alway on option

* Companion support for function switch always on

* Fix nasty eeprom error

* Update fs startup item model

* Fix Tpro SWITCH_EXISTS

Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Co-authored-by: elecpower <neilh713@tpg.com.au>
2022-01-23 18:42:31 +10:00
Peter FeerickandPeter Feerick f8c01c3988 Show warning LED with switch and throttle alerts
Show warning LED for switch, throttle and ALERTS generally
i.e. MULTI failsafe not set, low RTC battery, storage warning
2022-01-08 14:12:26 +10:00
eshifriandGitHub e15b34941d [NV14] Add switch definitions for NV14 (#1313) 2021-12-29 11:38:17 +10:00
eshifriandGitHub 87724bba2f [colorlcd] Fix pot and slider warning checks (#1281)
Some pot/sliders were being ignored or check state was inverted
2021-12-28 10:25:33 +10:00
Raphael Coeffic 6b990574af Fix switch checks 2021-12-17 17:31:36 +01:00
3djcandRaphael Coeffic d31482c18b Introduce T-pro and function switches handling 2021-12-17 17:07:48 +01:00
3djcandRaphael Coeffic 6735a42b08 Radiomaster Zorro
Port of opentx/opentx#8791
2021-12-17 15:17:48 +01:00
Raphael CoefficandGitHub 498bc152a3 Merge pull request #1040 from EdgeTX/sw-warnings 2021-12-17 13:05:13 +01:00
Raphael CoefficandRaphael Coeffic e854515147 Fix T12 switch definitions
The T12 has SG instead of SF.
2021-12-17 12:08:23 +01:00
Raphael Coeffic 571cae732c Unify switch warnings 2021-12-09 09:48:28 +01:00
Raphael Coeffic 865cf06b0d Revamped switch state checking 2021-12-09 09:20:01 +01:00
Jesper FrickmannandGitHub a09e318e64 [Lua] Add setStickySwitch and getLogicalSwitchValue (#1056)
[Lua] Add setStickySwitch and getLogicalSwitchValue (#1056)
* Adds setStickySwitch to set the value of a stick logical switch
* Adds getLogicalSwitchValue to get the value of a logical switch by index
2021-11-29 12:48:01 +11:00
Raphael Coeffic 397674021e Improved logical switches 2021-11-10 11:07:02 +01:00
Raphael Coeffic 68bdf025c1 Fixed switch position warning display on B&W 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
eshifriandRaphael Coeffic fb3ac5e0ba switch warning fix 2021-07-31 07:57:47 +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 6eb1ade135 Multipos autoswitch 2021-01-18 13:38:47 +01:00
3djc 6ffed2c777 Properly space swich/pots check text 2021-01-14 16:58:10 +01:00
3djcandGitHub 24f93a7cbe 3djc/2.4 add 2.3 pr (#8099) 2020-11-19 16:32:50 +01:00
3djcandGitHub e1e67a9d8c Add support for radiomaster TX12 (#8080)
* Add tx12 support
2020-11-14 11:48:46 +01:00
Bertrand Songis bddccb9765 Merge with latest 2.3 2020-05-30 11:57:03 +02:00
Bertrand Songis fdf77fb476 C function backlightOn() renamed to resetBacklightTimeout() 2020-03-27 10:43:06 +01:00
Bertrand Songis 6cab260ee6 Merge with latest 2.3 2019-12-13 12:30:02 +01:00
Bertrand Songis 14a366ea27 Cosmetics 2019-12-12 15:07:27 +01:00
Bertrand SongisandGitHub b06e865141 Wismy/x7 access (#7182)
X7 ACCESS
2019-12-12 14:44:34 +01:00
Bertrand SongisandGitHub 98c123ef8b Bsongis/issue 7156 (#7160)
Fixes #7156
2019-12-06 16:27:07 +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
3djc 3489bed482 Add startup warnings 2019-11-08 20:21:39 +01:00
Bertrand Songis 071116afeb Merge with latest 2.3 2019-11-07 15:04:45 +01:00
Kilrah b40dfdf12b Merge branch '2.3.1' into 2.3
# Conflicts:
#	CREDITS.txt
#	radio/src/gui/480x272/radio_hardware.cpp
2019-10-05 11:41:48 +02:00
Bertrand Songis d31f566965 Updates 2019-10-04 18:59:38 +02:00
Bertrand Songis 3e2cb83991 Now uses the external libopenui 2019-10-02 14:41:52 +02:00