Commit Graph
2506 Commits
Author SHA1 Message Date
3djcandGitHub d85218bbc5 fix: (re)enable time based mute for TX16S based on RM feedback (#3701) 2023-06-20 19:32:12 +10:00
MichaelandGitHub fa490e5adb fix: external MPM flash (#3671) 2023-06-20 11:39:43 +10:00
richardclliandGitHub 5288441a82 fix(el18): Audio output should be OFF if no audio playing (#3670)
* Added audio on/off depends whether audio content is present.

* Aligned the mute control with the implementation in the DAC driver.

* Mute Pin should be inverted.

* Removed PCB specific dependencies.

* chore: Formatting and cleanup
2023-06-15 10:07:30 +10:00
zyrenandGitHub 3a32c8d307 fix: Display corruption on Boxer after shutdown (#3654)
* Solve the messy display after Boxer shutdown

Solve the redundant cluttered display on the screen after Boxer is shut down.

* Solve the messy display after F407 B&W Radios
2023-06-08 18:47:15 +10:00
Peter FeerickandGitHub a4fd03bd7f fix: Remove double cli option text (#3620)
* fix: Remove double `cli` option
Seems like it was incorrectly added in #2123

* chore: Implcit CLI on ENABLE_SERIAL_PASSTHROUGH

* fix: Not really a conditional

* fix: Opt handled higher up
2023-05-31 13:29:45 +10:00
MichaelandGitHub f1773da256 fix: Missing first channel in PPM stream (#3598) 2023-05-27 14:42:40 +10:00
MichaelandGitHub 04359757c4 fix: Update built-in Multi-protocol module protocol lists, single source for firmware and cpn (#3435)
* - Concentrated Multi protocol definitions into a consistent single source. Actually two .h files, one for the protocol list and names, the other for subtypes and capababilites, see comments in .h files as to why

- updated available protocols reflecting 1.3.3.20 (15+ protocols)
- fixed Companion always showing f/s and channel map options in model setup disregarding the protocol capability

* Following @pfeerick's review: changed heaeders and typos

fixed Ubuntu runtime error on assert
fixed change of Multi protocol not triggering writing yaml file

* corrected copy/paste error

* fixed FrSky index juggling

* Updated Multiprotocol database to current MPM project status (ref. MPM Multiprotos.ino)

- changed protocol name FX816 to FX
- added Flysky AFHDS2A options PPM and PPWM SBUS 16ch subtypes "PWM,SB16" and  "PPM,SB16
- added V761 option to select TOPRC
- added FX options "816" and "620"
- added FRSKYR9 option "-- 8ch"

* MPM protocol scan excludes some protocols which are not meant to be selected. For Companion and Simualtor (and for radios if there is no MPM connected) this was handled in different places with outdated information. Harmonized and centralized the handling of non-selectabale protocols into the single source for all companion, Simulator and all gui types.

* More cleanup:

- changed some MPM protocol names to the ones the MPM delivers with MPM protocol scan to harmonize names between CPN/Simulator/radio
- added XN2927DUMP and MOULDKG to the list of excluded MPM protocols just like the MPM does with MPM protocol scan
- added new option value limits and moved definitions to single source
- adapted CPN and radio to use common definitions of option values for all GUI types
- moved distributed MPM (as far as possible) to one coherent place under a single #if defined (MULTIMODULE)
- fixed option value not reset at change of protocol
- some editorial stuff

Note: There is still some work to be done on CPN GUI option values. DSM2 servo rates are hard coded, BAYANG telemetry options are only shown by index and not by text as in radio code, AFHDS2A servo update rate is shown as index too which is to no use for users.

I'll try to fix all this in the next session, but request to get rid of BAYANG telemetry options translations. It is much easier to define a common string list by using untranslated.h

* rebase due to fr.h

* resolve merge conflict with main fr.h

* more cleanup:

- deleted multiple definition of MM_RF_CUSTOM_SELECTED in favor of single source define
- bw radios: change to only allow defined protocols rather than a fixed 127 protocols

* Changes:

- magic sentinel number 0xfe as define
- add 10 NN protocol entries for future use of new MPM protocols not yet defined in ETX (still recommend timely ETX maintenance update if MPM releases new firmware)

* Changes by @elecpower:

- align field labels to radio
- change servo update frequency from combo box to spin box with edit only via up/down arrows to stop invalid values being entered via keyboard. Remove frequency list used to populate combo box as only used by Companion.
- add validation to module yaml decode checking for unsupported multi protocols and/or multi protocol sub types and if unsupported set module to OFF just to be safe.

* Changes:

- radio: added validation to module yaml decode checking for unsupported multi protocols and/or multi protocol sub types and if unsupported set module to OFF just to be safe.

* CPN: use sentinel define

* cpn: Sort multi protocols list (courtesy @elecpower)

* fixes #3480

changes:
- moved FrSky subtype defines to MultiProtoDefs.h
- updated bind_button_driver.cpp

* missed replacing one instance of setMultiProtocol()

* changes:

- editorial change
- added multi option to OMP protocol (ref #2713)

* rather go for STR_MULTI_RFTUNE because MPM manual talks about RF tune

* made XN297_DUMP selectable (available with MPM debug fw only)

* corrected merge mistakes
2023-05-22 20:07:29 +10:00
3djcandGitHub d383826b3f fix: FrSky BT support on B&W RM radios with BLE port (#3607)
* FrSky BT support on RM radio with BLE port

* Remove hardcoded 'no bt'

* Compilation fix
2023-05-22 19:01:41 +10:00
32e544c8dd chore: Support T-Lite F4 variant (#3254)
* TLite F4

* chore: Add to fw list for Buddy

* chore(cpn): TLite F4 Companion support

* fix: Remove seemingly incorect cmake set
Or at least, the code now builds without that directive

* fix(cpn): Stupid typo

* chore: Actually build/register tlitef4 simulator

* fix: Need tlitef4 flavor for simulator and updates

* chore: tlitef4 can use tlite simulator

* fix: downloadid AND simulatorid

* fix: Correct simulatorid

---------

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: Peter Feerick <pfeerick@users.noreply.github.com>
2023-05-10 19:43:07 +10:00
Maksim BrykovandGitHub 2568f33188 fix: Add default contrast settings for Zorro (#3575) 2023-05-09 21:20:17 +10:00
Neil HorneandGitHub f800447cd5 feat(cpn): Radio types can reference any libsim and/or firmware download id (#3432)
* Radio profiles reference any libsim and/or firmware download id

* Revert files filter for now
2023-05-07 18:01:14 +10:00
Raphael CoefficandGitHub 6aa1fc90c4 fix: signal polarity for soft-serial & timer based protocols (#3513)
* fix: signal polarity for soft-serial & timer based protocols

* fix: first PWM period after init
2023-05-05 19:20:29 +10:00
Raphael CoefficandGitHub 99da364eaf fix: explicitly locate .data segment in FLASH (#3556)
Rather than using `_sidata` marker.
2023-05-02 09:20:43 +10:00
raphaelcoeffic 53f172bb07 fix: possible endless loop in case some error flag is set but RXNE is not
Fixes #3482
2023-04-28 13:05:31 +02:00
MichaelandGitHub 74d44ed057 fix: Corrupt data using soft serial driver (#3329)
* restore bit start detection IRQ for soft serial

* restore bit start detection IRQ for softserial (target Taranis and Horus)

* target Taranis: EXTI9_5 is a shared interrupt for Rotary Encoder and Heartbeat for X7, X7-ACCESS und TPRO radios. Changed IRQ priority accordingly

* fix crashes where the heartbeat ISR running at interrupt priorities higher than 5 interferes with FreeRTOS calls made from within the heartbeat ISR.

* changed mixer scheduler timer initialization to allow for software generated update events to avoid freeRTOS calls from now prio 0 heartbeat ISR.

* resolved review feedback: using defines for IRQ prio settings

* following review by @raphaelcoeffic:

- new function void mixerSchedulerSoftTrigger() (to be called by heartbeat driver)
- defines in hal.h for targets horus and taranis

* following @raphaelcoeffics review

- changed all but telemetry EXIT IRQ (soft serial) definition back to their original state and added define to override EXIT IRQ (soft serial) prio
2023-04-19 19:43:25 +10:00
RistoandGitHub a4689d0b00 fix: Explicitly list 12-bit ADC resolution (#3488) 2023-04-19 18:50:22 +10:00
philmozandGitHub 6985d3f24b feat(color,cpn): Updates to the model telemetry page, sensor ID consistency (#3401)
* Add 'Show Instance ID' button to telemetry page to show/hide sensor instance number (default is hidden).
Fix issues with page refresh when all sensors deleted.
Select closest sensor when a single sensor is deleted.
On change, only refresh the sensor list instead of the whole page.
The 'showInstanceIds' property is saved to the model file.
Update Companion to save/load 'showInstanceIds' in model YAML file. Add checkbox to telemetry edit page.

* Update all radio specific files.

* Keep focus on 'Discover/Stop' button when searching for new sensors.
Start sensor ID index at 1 to match B&W radios.
Keep focus on changed parameter when editing sensor, don't rebuild entire parameter list on change.

* Display actual 'instance' ID instead of 'instance' + 1.

* Fix incorrect ID when reloading simulator data.

* Fix incorrect ID when reloading simulator data on B&W radios.
2023-04-17 18:44:44 +10:00
philmozandGitHub b3c7a95aa2 fix: Direction detection for rotary encoder on startup (#3445) 2023-04-16 17:08:59 +10:00
125fd2ba28 fix: Missing configurable port code, R9M Access, support FRM303 via mod (#3442)
* Fix configurable external module port

* Added FRM303 support for TX16S via AUX1 mod, i.e. direct connect AUX1 TX/RX to PPM/Heartbeat pins.

---------

Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
2023-04-15 19:04:34 +10:00
MichaelandGitHub 2ce94e3e4b fix: X10access - no PPM output on CPPM pin (#3419) 2023-04-05 14:03:15 +10:00
MichaelandGitHub 7e581d00dd fix(bt): Logic error where txCompleted was reported while still transmitting (#3405) 2023-03-27 09:49:31 +10:00
Raphael CoefficandGitHub e016598b56 fix: Various mostly X10E soft serial issues (#3382)
* fix: pulse driver with 32bit timers

* fix(mpm): clear RX buffer before signature

* fix: add some debouncing on soft-serial start bit detection

This helps coping with spurious impulses on S.PORT created by payload sent over PPM pin (X10E).

* fix: whenever the RXNE bit is set, read the register

... regardless of errors. That allows for reducing the effect of detected errors.
2023-03-26 11:23:32 +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
Raphael CoefficandGitHub d0b95e0a5b fix(pxx1): Pulse length should be 8us (#3231) 2023-03-26 10:27:05 +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
Xy2019andGitHub 9a51ff8f0e fix(el18): Power-on backlight before screen content (#3206)
Also relevant to NV14
2023-03-10 16:43:06 +10:00
Xy2019andGitHub f52fb2f257 fix(el18): Prevent power on when USB is disconnected while radio is charging (#3325) 2023-03-10 16:08:06 +10:00
c84abbf739 chore(cpn): Allow configuring AUX serial port as "External module" (#2854)
* Add external module to hardware settings

* Use serial port aux1 rather than radio profile externalaccessmod
Move module conversion function from OpenTxFirmare to ModuleData

* Remove externalaccessmod from radio profile options

* Unnecessary CMake option HARDWARE_EXTERNAL_ACCESS_MOD removed.

---------

Co-authored-by: rotorman <risto.koiva@web.de>
2023-03-05 19:12:32 +10:00
HThurenandGitHub d927a8d687 feat: Bootloader translated from EN to native language (#2946)
* Basic change

* Other languages

* Minor correction

* IT translated

* Minor correction

* Fix enable / disable in ascii only

* Fix enable / disable in ascii only

* Update cn.h

Fix enable / disable at nv14 bootloader

* Update cz.h

Fix enable / disable at nv14 bootloader

* Update de.h

Fix enable / disable at nv14 bootloader

* Update es.h

Fix enable / disable at nv14 bootloader

* Update fi.h

Fix enable / disable at nv14 bootloader

* Update fr.h

Fix enable / disable at nv14 bootloader

* Update it.h

Fix enable / disable at nv14 bootloader

* Update jp.h

Fix enable / disable at nv14 bootloader

* Update nl.h

Fix enable / disable at nv14 bootloader

* Update se.h

Fix enable / disable at nv14 bootloader
Only use of Ascii in bootloader

* Update pt.h

Fix enable / disable at nv14 bootloader

* Update de.h

Fix enable / disable at nv14 bootloader

* Update pl.h

Fix enable / disable at nv14 bootloader

* Update tw.h

Fix enable / disable at nv14 bootloader
Only use of Ascii in bootloader
2023-02-27 21:50:12 +10:00
9216570d6c feat: Flysky gimbal support for RM Boxer (#3139)
* Adds Flysky digital hall gimbal support for RadioMaster Boxer.

---------

Co-authored-by: rotorman <risto.koiva@web.de>
2023-02-26 13:27:37 +01: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
raphaelcoeffic 66c0551076 fix: simu internal port module fake driver 2023-02-19 15:56:38 +01:00
Peter FeerickandGitHub 6de37d9b8a fix(boxer): Power LED sequence BLUE => GREEN (#3201) 2023-02-17 19:25:33 +10:00
4ea77cd172 fix: Enable AUX1 power on TX16S with IMU_LSM6DS33 (#3156)
* fix: enable AUX1 power on TX16S with IMU_LSM6DS33

* Add some delay when powering I2C bus

---------

Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
2023-02-15 16:22:58 +10:00
Malte LangermannandGitHub 070b255647 fix: RTOS independent 1ms tick count for HAL (#3178)
* fix: use a 1ms HW timer to generate a RTOS independend 1ms tick counter for HAL

* fix comments
2023-02-13 16:35:11 +10:00
Raphael CoefficandGitHub d4633ea1de chore: Move __global_locale to FLASH (frees some RAM!) (#3169)
And save a bit of RAM.
2023-02-10 19:52:42 +10:00
Raphael CoefficandGitHub be3f8d74a8 feat(lua): Port of NodeMCU Lua53 read-only tables (#2994)
* chore(lua): revert useless c light function change

This change was part of the eLua LTR patches (based on 5.1), whereby this feature was already integrated in Lua 5.2.

* feat(lua): port of NodeMCU Lua53 read-only tables

# Conflicts:
#	radio/src/lua/CMakeLists.txt
#	radio/src/lua/api_general.cpp

* fix(nv14): missing SDRAM definition

* fix: l_mathop

* fix: use float functions in drawPower()

* fix: ltable resize

* fix: correct name is "bit32"

* fix: first Lua context must be closed last

As the lookup cache is attached to that one

* Revert to Lua using double

* Ensure byte-code compatibility

* Fix possible compatibility issue with `lua_typename`/`luaL_typename`

* Fix Bitmap symbol table

* Re-add table lib for COLORLCD
2023-02-09 20:29:56 +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
raphaelcoefficandPeter Feerick af9f1b7e9c chore: fix STM32 HAL headers
Single HAL headers/modules are enabled by changing the defines in `stm32f2xx_hal_conf.h` / `stm32f2xx_hal_conf.h` rather than being directly included into this file.
2023-02-02 13:12:33 +10:00
RistoandGitHub 5acaa79c1c feat(fw): Only show SD card in USB storage mode (#3045)
* Only attach SD card in USB storage mode

* Added compile time option FWDRIVE (default OFF) to enable attaching also the firmware drive via USB, when attached in mass storage mode.

* Re-trigger GitHub Actions

* chore: Trailing whitespace cleanup
2023-01-26 14:39:31 +10:00
Raphael CoefficandPeter Feerick 4c272863d3 fix: Prevent firmware overflow for X9D+2019
- Remove __global_locale
- Use same animation for startup and shutdown
2023-01-25 19:42:05 +10:00
RistoandGitHub 0b79315fe5 chore: cleanup, remove unnecessary commented line 2023-01-24 19:03:10 +01:00
CliffandGitHub 0b8e4c6003 Allow using Segger RTT as debug output (#3052)
Firmware needs to be built with -DDEBUG=YES and -DDEBUG_SEGGER_RTT=YES to use this feature.
2023-01-23 09:08:31 +01:00
Raphael CoefficandGitHub acd95dfad4 fix(B&W): Avoid having constants in SRAM (#2993)
fix constness to avoid having constants in data segment 
.... and thus free some precious RAM
2023-01-18 20:12:35 +10:00
Matthias HryniszakandGitHub a68c0cf58a feat(diags): Red LED before RTC data, blue LED after (#3006)
* Added turning the red LED before RTC data and blue LED afterwards

With the LED turned RED if the RTC data retrieval fails it will stay red.
This will at least be an indication that the RTC startup encountered
a problem. For now there is no indication that this problem occurred.

* GH-3005 Moved LED manipulation to conditionally compiled when RTC operation happens
2023-01-15 12:02:03 +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
raphaelcoeffic 330e673826 fix(taranis): XJT internal module initialization 2022-12-29 10:25:29 +01: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 f9bac7ba9b chore: Remove support for binary storage format (#2900) 2022-12-23 13:05:57 +10:00
philmozandGitHub 2206506c82 fix(color): Increase menu max height on landscape screens for better fit (#2896) 2022-12-19 19:10:05 +10:00