Commit Graph
100 Commits
Author SHA1 Message Date
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
raphaelcoeffic 426a6e965f fix: revert and fix logs & spacemouse
Check where deactivated in #3208
2023-02-18 18:59:27 +01:00
MichaelandGitHub fef6782f5e fix: logs not written to SD card and SpaceMouse not working (#3208)
* fixes https://github.com/EdgeTX/edgetx/issues/3207
* fixes SpaceMouse readout
2023-02-18 18:24:58 +01: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
Peter FeerickandPeter Feerick d0b693a8dc fix: Radios without RTCLOCK need tmr10ms also
Fix bug introduced in #1967 which only affects !defined(RTCLOCK) boards
2022-08-16 18:44:57 +10:00
MichaelandGitHub c29f12f997 fix: Adjust pointer so extra character not included in source name when logging
The adding of UTF-8 support in 30e3ac3 / #1900 meant there was a second character present
in the symbol character strings, which was not expected here when trimming them off.
2022-08-04 11:25:19 +10:00
tonyyngandGitHub 415b566a79 fix: Handle text fields in logs (#2173)
Telemetry sensors that have text (ie. FM from Betaflight) were not
being handled at all, so were logged as 0.
2022-08-01 19:48:50 +10:00
MichaelandPeter Feerick 4b254b9da4 feat: Add channel outputs to logging
Adds channel outputs (end of the processing chain) to set of logged data in units of microseconds.

Use constant PPM_CENTER instead of literal 1500
2022-08-01 19:07:58 +10:00
MichaelandGitHub ce8cc0b540 Fix missing log steps at 0.1s period (#1967)
fixed issued where log steps would be missed due to 10ms timer resolution
- simulator: allow for one get_tmr10ms() tick (10ms) deviation
- radio: switched to FreeRTOS software timer at user requested period

code cleanup
log.cpp: made variable lastLogTime static
log.cpp: deleted unused variable g_logError
functions.cpp, logs.cpp, sdcard.h: renamed variable logDelay to logDelay100ms to show it is scaled to 100ms increments
2022-06-27 20:12:47 +02:00
Raphael CoefficandRaphael Coeffic 56bec5ca3a WiP: String arrays for translations
DE, EN, FI, FR are done, now we need all the other languages
2022-06-11 15:38:08 +02: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 5b5ea807e1 Use the current time to generate the log filename
Resolves #548
2021-08-03 11:08:14 +02:00
Raphael Coeffic d10563d08b Fixed more zchar / string copy errors
Resolves #224
2021-06-16 18:00:42 +02:00
Raphael Coeffic ef6f2d0c57 Scrolling from view to view works now
And quite some bugs & crashes fixed.
2021-04-18 07:57:42 +02:00
Bertrand Songis bddccb9765 Merge with latest 2.3 2020-05-30 11:57:03 +02:00
Bertrand Songis 6cab260ee6 Merge with latest 2.3 2019-12-13 12:30:02 +01:00
Bertrand Songis 744e3f1ac9 Cosmetics 2019-12-07 08:52:47 +01:00
Bertrand Songis 74db396c36 Stack overflow on Horus 2019-12-07 08:44:13 +01:00
Bertrand SongisandGitHub 98c123ef8b Bsongis/issue 7156 (#7160)
Fixes #7156
2019-12-06 16:27:07 +01:00
Bertrand Songis f4f8893ae9 New UI merged 2019-08-28 20:50:14 +02:00
Bertrand Songis 2ce17f3b68 More unneeded definitions removed 2019-08-20 18:04:19 +02:00
Bertrand Songis 8449a8f617 Cosmetics 2019-08-12 12:22:27 +02:00
3djc f0060af07d Cosmetics 2019-08-11 08:49:49 +02:00
3djc 13ade094a3 Cosmetics 2019-08-10 17:30:20 +02:00
3djc 4fd5091657 Make switch logging using hardware config 2019-08-10 12:00:38 +02:00
Bertrand Songis e07c5d596e Compilation fix 2019-06-27 23:27:32 +02:00
Bertrand Songis 3aab7b8a37 [ACCESS] Automatic detection of the module for accessPushTelemetry if module < 0 2019-06-11 17:06:09 +02:00
3djcandBertrand Songis e4e003b87a rename x3 to x9lite 2019-05-13 15:10:13 +02:00
Bertrand Songis e4fa31be28 Rename char2idx to char2zchar 2019-02-21 10:35:48 +01:00
Bertrand Songis 8772123250 X3 switch fixes 2019-02-18 16:15:56 +01:00
Bertrand Songis 8ec797730e FrSky X3 board support added 2019-02-18 15:20:28 +01:00
Bertrand Songis ea76998beb More AVR removal 2018-08-05 12:39:05 +02:00
Bertrand Songis f3bfde242b RTOS refactoring + more AVR removal 2018-08-05 12:06:48 +02:00
3djc dd632969f3 Massive clean thanks to Schwabe : unifdef -m -DCPUARM -UCPUM64 -UCPUM2560 -UPCBSTD -UPCBMEGA2560 -UPCBGRUVIN9X -UPCB9X $(find . -name "*.cpp" -or -name "*.h") 2018-07-05 08:04:55 +02:00
Kilrah fd4e03c565 Correct switch support 2018-04-27 12:46:06 +02:00
Bertrand SongisandGitHub 99604dccc9 XLite support (#5806) 2018-04-25 23:07:04 +02:00
3djcandAndre Bernet 1835cb12be Fix small negative GPS values (#5810) 2018-04-12 22:05:15 +04:00
Bertrand SongisandGitHub c4001c8507 Bsongis/frsky xlite (#5574)
FrSky X-Lite support added
2018-01-02 14:36:48 +01:00
3djcandBertrand Songis 394bc1689f Massive cleaning (#5538) 2017-12-18 20:54:22 +01:00
3djcandDamjan Adamic 03125ccad6 Fix X7 sd logs (#4462)
* X7 has only 6 switches
2017-02-15 14:27:23 +01:00
Bertrand SongisandGitHub 40ece81de2 X10 (#4377)
[X10] New radio supported!
2017-02-04 10:42:50 +01:00
3djcandBertrand Songis dc51a95029 Allow my X9e to boot ! (#4211)
Thanks
2017-01-09 18:16:16 +01:00
Bertrand Songis 54742fcad9 Compilation fixes for Arch Linux 2017-01-07 18:42:56 +01:00
Bertrand Songis 82d6b96f8b X7D renamed to X7 2016-12-12 07:39:51 +01:00
Bertrand Songis c0fa5734ab Fixes #3969 2016-11-16 23:53:26 +01:00
Damjan AdamicandBertrand Songis 5ba14734cb Projectkk2glider/gps misc fixes (#3970)
* Fixed Lua GPS date (year is now kept with four digits)

* * GPS year displayed with two digits
* GPS date/time handling fixes
2016-11-02 13:03:26 +01:00
Damjan Adamic 37ea272bd4 Replaced all 1900 with TM_YEAR_BASE 2016-10-30 11:35:12 +01:00
Damjan Adamic 024b07a384 Incorrect unit was used for UNIT_CELLS in SD Logs 2016-10-29 21:28:04 +02:00
Damjan AdamicandBertrand Songis 4513cf89f2 Projectkk2glider/fatfs 0.12 (#3925)
* Re #3815: Disk cache: Write statistic added. Bigger disk cache. Show disk cache misses in CLI.

* Update to the latest FatFS R0.12b (all existing OpenTX patches have been already applied in upstream, only few ff.h modifications needed for simulator)

* Missing file

* SD card manager: do not show parent dir [..] for root directory
2016-10-18 18:14:17 +02:00
Damjan Adamic 5157a9f33c Fixes #3843: GPS logging in decimal degrees format. Companion export to Google Earth fixed. 2016-10-05 17:57:02 +02:00