Commit Graph
637 Commits
Author SHA1 Message Date
philmozandGitHub fb2188cacd fix(lua): getFieldInfo() not returning switch info (#5108) 2024-06-05 18:19:35 +10:00
philmozandGitHub e807ccbebf refactor: key handling (#4849) 2024-05-27 18:33:53 +10:00
Peter FeerickandGitHub e72f1d2da1 fix: some cppcheck errors (#4942) 2024-05-02 13:13:16 +10:00
philmozandGitHub dc2998e478 feat(lua): add 'mkdir' and 'rename' functions (#4870) 2024-04-28 18:44:55 +10:00
ThomasKuehneandGitHub 8225fb21c5 chore(radio): cleanup -Wzero-as-null-pointer-constant warnings (#4851) 2024-04-15 09:31:46 +10:00
philmozandGitHub f28c1150ed refactor(color): use LVGL styles and objects for UI, legacy cleanup (#4407) 2024-04-05 17:33:14 +10:00
philmozandGitHub 0d84acef59 fix(lua): ignore potential unwanted key events (#4833) 2024-04-02 10:52:17 +10:00
philmozandGitHub 84aa4f4b40 fix(lua): add 'repetition' property to getCustomFunction and setCustomFunction tables (#4693) 2024-03-06 08:59:21 +10:00
Peter FeerickandGitHub 2bef12996f fix(lua): serialRead is not limited to CLI (#4644) 2024-02-27 09:42:50 +10:00
3ebff87e8f feat(lua): add support for CRSF 'direct command' packets (#4630)
Co-authored-by: Raphael Coeffic <raphaelcoeffic@users.noreply.github.com>
2024-02-15 13:04:36 +10:00
Peter Feerick c7b6a13387 revert: 175ab5e pushed to wrong fork
This reverts commit 175ab5ef96.
2024-02-11 21:36:18 +00:00
JimB40 175ab5ef96 Changes to be committed:
modified:   radio/src/lua/api_general.cpp

changed crsfTelemetryPush to support direct commands
2024-02-11 15:01:47 +01: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
Raphael CoefficandGitHub 317766dab7 fix(lua): Re-implement luaSetSerialBaudrate (#4501) 2024-01-03 13:29:02 +10:00
Raphael CoefficandGitHub 6b1256db66 chores(lua): Generate keys definitions (#3923) 2023-12-20 21:28:40 +10:00
philmozandGitHub ad16bf6cdd fix(color): Initialisation of Lua widget options (#4394) 2023-12-09 11:51:03 +10:00
ee73fa47f0 feat: Add "Enable" button to all SF/GF (#3024) (#3601)
Co-authored-by: eshifri <eshifri@hotmail.com>
Co-authored-by: philmoz <philmoz@users.noreply.github.com>
2023-12-03 12:23:34 +10:00
philmozandGitHub b0e43e09ea chore(color): Cleanup bitmap code (#4319) 2023-11-17 10:36:05 +10:00
philmozandGitHub 5e97d1d59b chore: Remove unused LS_FUNC_RANGE, TimersContext (#4267) 2023-11-10 16:35:00 +10:00
Raphael CoefficandGitHub 373bb33f4b chore: Remove some bloat, reduce firmware size (#4288) 2023-11-08 22:05:54 +10:00
bug400andGitHub 926dc36d51 fix(lua): Do not pass key event that triggered telemetry view to lua (#4168) 2023-11-07 09:08:31 +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
f5593c44e8 fix(color): Bitmap name truncation if exactly 14 characters long (#4232)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-10-31 11:40:49 +10:00
philmozandGitHub 1e3f919146 fix(color): 'SWITCH' widget option logic, enable for Lua widgets (#4190) 2023-10-17 07:22:25 +10:00
b22a1b5d32 feat: Support for WS2812 RGB LEDs (#3909)
Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
2023-10-14 14:06:55 +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
f40fa1a64b feat(el18): Use trim hats as keys for navigation (#3894)
Co-authored-by: elecpower <neilh713@tpg.com.au>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-09-29 20:12:54 +10:00
philmozandGitHub a60cf67fb2 fix(radio): Lua insertMix function not working (#4129) 2023-09-29 11:34:34 +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
philmozandGitHub 0aff002c8a chore(color): Cleanup and optimise EdgeTxTheme class (#4013) 2023-09-21 19:39:05 +10:00
philmozandGitHub e4f845c844 chore(radio): Fix some compiler warnings when building firmware (#4058) 2023-09-20 11:16:48 +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
philmozandGitHub dcc2118d19 chore(color): Replace dynamic_cast with virtual functions, disable RTTI to reduce FLASH usage (#3885)
* Replace dynamic_cast with virtual functions and disable RTTI.

* Cleanup TopBar class hierarchy.

* Fix compiler warning.
2023-08-28 12:55:15 +10:00
MichaelandGitHub c2bebfbbd3 fix: Plurals and indefinite articles in German TTS, plus (#3920)
- fixed no LUA constant for unit dbm
- fixed use plurals and indefinite articles in German TTS
2023-08-26 21:09:41 +10:00
Preston GuilloryandGitHub d8cfa671e5 fix(lua): Include scale in getInput and insertInput (#3772)
* Include scale in getInput and insertInput

When using telemetry as an input, the scale field is used to convert from a
value with units (like volts or meters) to a percentage. I'd like to modify an
input's scale via Lua script. However this field does not seem to be supported
by the Lua API. This seems like an oversight, so I added it.

* chore: Add scale luadoc
2023-08-26 19:52:22 +10:00
3djcandGitHub c2d8291e49 feat: Add support for RadioMaster Pocket (#3892)
* RM Pocket support

* Further Pocket changes

* Production readiness

* chore: Consistent formatting

* chore: `ENABLE_SERIAL_PASSTHROUGH` enables `CLI`

* chore: Add to Buddy

* fix: merge wtf
2023-08-14 12:10:22 +10:00
philmozandGitHub 69338ab0ab chore(color): Libopenui refactor (#3614)
* Refactor object creation logic.
Remove unused LVGL features.

* Remove unused files.
Fix height for widgets.

* Rename 'OpenTxTheme' class to 'EdgeTxTheme'.
Cleanup commented out code.
Cleanup unused code from 'etx_lv_theme.cpp'.

* More cleanup.

* Move more style code to etx_lv_theme.cpp

* Update license

* Make default button height match other controls.

* Fix curve edit layout.

* Fix layouts.

* FormWindow and FormGroup provided identical functionality - rename FormGroup to FormWindow and remove duplicate.

* Simplify menu icon handling.
Remove unused 'flysky.cpp' file.

* Fix window size change.

* Simplify page header code.
Fix statistics view page.

* Remove unused file.
Replace redundant 'Subtitle' class with a macro.
Fix compiler warnings.

* Fix compiler warning in LvglWrapper.cpp.
Remove unused code in static.h.
Simplify about page.

* Rename ICON_OPENTX to ICON_EDGETX.

* Fix github build error.

* Fix github build error (attempt 2).

* Move ButtonMatrix styling to etx_lv_theme.cpp.

* Scroll bar consistency.

* Use styles for ButtonMatrix text color.

* Use 'active' color for selected USB advanced setup buttons. Move error message to bottom of page.

* Create style for popup window title bar.
Simplify advanced USB setup code.
Remove unused libopenui/carousel.* files.

* Add style for modal popup content.

* Remove unused BUTTON_BACKGROUND flag.

* Replace GridLayout with FormWindow. Remove unused gridlayout.h file.

* Fix rebase.

* Merge ChoiceEx class into Choice class code.
Remove unused CurveKeyboard.

* Use LVGL bar for progress indicator.
Update only style colors when theme changes (don't recreate all style settings).

* Move ProgressDialog class to dlalog.h/dialog.cpp files.

* Simplify trim and slider code in main view.
Simplify the hardware inputs code.
Fix dialog size.
Remove unused code in layout factory.

* Cleanup unused code.

* Add style for FormWindow class.
Merge BaseNumberEdit class into NumberEdit class and remove BaseNumberEdit.
Remove more unused files.
Cleanup libopenui_config.h files.

* Re-organise libopenui include files to fix build error.

* Fix build error.

* Add missed styles to etx_lv_theme.cpp.
Delete commented out #includes.
More cleaning up of libopenui_xxx.h files and dependencies.
Re-enable LVGL CHECKBOX feature.

* Merge libopenui_helpers.h into opentx_helpers.h file.

* Fix firmware build.

* Use object constructors for LVGL object creation as suggested by gagarinlg.
Add style for number edit text alignment.
Fix background color for focussed control.

* Move color related stuff from libopenui_defines.h to colors.h.
Remove need for libopenui_depends.h file.

* Merge libopenui_types.h content into opentx_types.h file.

* Rename CheckBox class to ToggleSwitch.

* Restore code to update flight mode text color when theme changes.

* Cleanup some more unused code.

* Remove redundant theme.h file.

* Fix rebase.

* Fix button matrix style.

* Fix rebase

* Fix rebase

* Ensure correct initialisation of Choice object.

* Fix rebase.

* Make the slider control bigger to make touch activation easier.

* Fix build error.

* Fix slider logic and cleanup code.

* Use ACTIVE theme color for inputs, mixes, LS, GV and SF.

* Improved border width consistency and focussed state consistency.

* Remove duplicate copy of the default theme colors.
2023-08-04 11:04:54 +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
Raphael CoefficandGitHub 76423370cd fix(lua): Add missing switch constants (#3803) 2023-07-30 14:03:35 +10:00
3djcandMalte Langermann bff3e653fc Fix Colorlcd navigation 2023-06-25 14:32:39 +02:00
3djcandMalte Langermann 29911c6b23 partial TX16s pgup pgdn key fix 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
altemanandGitHub 97deeeb4d3 fix(lua): Support changing module type from model.setModule() (#3699) 2023-06-20 19:03:33 +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
MichaelandGitHub 9378e8e252 fix(lua): GV precision not taken into account (#3540)
changes:
- calculate LUA return value for GVARS taking precision into account
2023-05-05 19:45:06 +10:00
philmozandGitHub 227780d784 feat: Add 'repeat' option to 'Lua Script' special function (#3338)
* Add support for the '1x' repeat option for 'Play Script' special functions.

* Add Companion and B&W radio support.

* Fix B&W radio logic and layout.

* Add translation hooks.
2023-04-10 11:00:50 +10:00
RistoandGitHub 0af86f657e feat(lua): Add serial[Get|Set]Power() to LUA API (#3265) 2023-03-17 11:55:10 +10:00
Peter Feerick fd684d4648 chore: Closing backticks missing from luadocs
Cleanup of #3181, #630
2023-02-20 15:12:48 +10:00