Commit Graph
60 Commits
Author SHA1 Message Date
97c57cf9ee feat(colorlcd): Value widget text alignment options (#3080)
* Adds option to align value widget label and value to left, center or right border of the widget zone.

* Cpn sync

* Typofix thx to @Eldenroot

* fix: Add `TW` translation

* fix: Two spaces for indent

---------

Co-authored-by: elecpower <neilh713@tpg.com.au>
2023-02-20 14:57:58 +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
David PHAM-VANandGitHub 4ed4f218b4 feat: Allow Lua widget translations (#2275) 2022-09-07 21:18:50 +10:00
Raphael CoefficandRaphael Coeffic a3424d5bc0 Support for touch/key events in LUA widgets 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 4c8bb99e73 Replaced focus handling with LVGL groups 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 12f51350ce Scrolling is now handled 100% by LVGL 2022-06-11 15:38:08 +02:00
Jesper FrickmannandGitHub b91be18414 feat: Increase resources for Lua widgets (#1498) 2022-02-01 11:37:11 +10:00
Peter FeerickandGitHub dcbdde2b74 Fix warning: "EVENT_BUFFER_SIZE" redefined 2022-01-17 11:34:09 +10:00
Jesper FrickmannandGitHub cc316e5a2c fix: Wrong x-coordinate for Lua touchState during sliding on mainviews other than the first screen (#1409)
Fix for issue #1348 as discussed on https://github.com/EdgeTX/libopenui/pull/49
2022-01-11 22:44:54 +10:00
jfrickmannandPeter Feerick a66e78fea8 Fixed string option for Lua widgets 2021-12-14 20:12:12 +10:00
jfrickmannandPeter Feerick d4b8717575 Added zone.absx and zone.absy to give position of a Lua widget on the screen 2021-11-27 18:18:44 +10:00
jfrickmann ce7b408445 Add touch to Standalone Lua scripts 2021-11-19 08:01:28 -05:00
jfrickmann df153b4b1f memset() -> memclear() 2021-11-18 19:51:01 -05:00
Raphael Coeffic d2ddb2e535 Fix compilation error 2021-11-10 11:06:59 +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
Jesper FrickmannandGitHub 8d04b5112d Add tap count support to simulator (#719)
* Removed unused #define
* Added touchState.tapCount for double taps etc. to simulator
2021-09-14 16:30:39 +10:00
jfrickmann dcd5db38f9 Set error message if script fails in create() function 2021-09-11 13:36:10 -04:00
jfrickmann 98ed28db09 Added Lua function lcd.exitFullScreen() 2021-09-11 09:00:20 -04:00
jfrickmann ca478dccba Removed unused function exec() 2021-09-11 07:35:48 -04:00
jfrickmann 935bd403ee Add tapCount to touchState in Lua widgets 2021-09-10 17:14:37 -04:00
jfrickmann f8eb2adab0 Show error message in Lua widgets instead of "disabled"
Also a new function drawTextLines(...) in draw_functions that splits a string over multiple lines
2021-08-29 18:22:31 -04:00
jfrickmann 5b3db33f03 Translate color option to create() function call
Forgot that in PR #646
2021-08-28 10:29:41 -04:00
jfrickmann 1af65969ed Color options for Lua widget get translated to Lua color flags
To support new color encoding in Lua widgets
2021-08-27 22:21:37 -04:00
jfrickmannandRaphael Coeffic bf656ffd7b Added event buffer to LuaWidget
Since Lua only runs at 10 Hz and the GUI at a higher frequency, events sometimes are skipped unless we store them in a buffer.
This buffer is only two slots, but can be expanded by changing EVENT_BUFFER_SIZE.
2021-07-31 07:54:17 +02:00
jfrickmann d4e02dbc22 Accumulate (slideX, slideY) with touch slide events.
Apparently, onTouchSlide gets called more frequently, and hence we miss some of the sliding if we do not accumulate between calls to Lua.
2021-07-26 21:34:38 -04:00
jfrickmann da94cc64ff Merge branch 'VCENTER' into Everything 2021-07-24 17:32:48 -04:00
jfrickmann 1fc59ce31a Merged LuaScriptPreemption 2021-07-24 17:32:41 -04:00
jfrickmann c62aac7bde Lua task preempts long running scripts instead of killing them
Ported to EdgeTX from https://github.com/opentx/opentx/pull/8194
2021-07-22 14:41:53 -04:00
jfrickmann 296acc6558 Code polishing 2021-07-22 08:03:48 -04:00
jfrickmann fd05bcab19 One swipe at a time
Added a timeout so we do not get a swipe storm during slide events
2021-07-22 08:03:28 -04:00
jfrickmann 61602d525b Improved swipe-onomics 2021-07-22 08:03:09 -04:00
jfrickmann 8b90754e95 Only one EVT_TOUCH_FIRST at a time 2021-07-22 08:02:53 -04:00
jfrickmann 0b9fd82074 Added touch events to Lua widgets 2021-07-22 08:02:33 -04:00
jfrickmann e1066af88c Added LuaWidget::onEvent(event) and LuaWidget::event to capture key events to be passed to the Lua widgets. 2021-07-22 08:01:29 -04:00
jfrickmann e3fb2ac6ea Added key event to fullscreen Lua widget 2021-07-22 08:01:08 -04:00
jfrickmann 2e129af9f1 Added VCENTER to lcd flags
Only for COLORLCD
2021-07-21 19:53:13 -04:00
Raphael Coeffic 9ecccef315 Call LuaWidget background() if widget is not painted
Resolves #222
2021-06-19 17:47:47 +02:00
Raphael Coeffic 78915daf95 Fixed memory leak: widget factories need to be deleted
in opentxClose()
2021-06-12 07:38:31 +02:00
Raphael Coeffic c37bc91475 Unregister LUA widgets when the factory is destoyed
Resolves #183
2021-06-12 07:38:30 +02:00
Raphael CoefficandRaphael Coeffic f305fd397d Selectable widgets (+edit, fullscreen mode, etc) 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic f0f6a1e093 Fixed various issues while running "teckel12/LuaTelemetry" widget 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic 72a7409d10 First working LUA widget: Timer2 2021-05-06 12:55:59 +02:00
3djcGitHub3djc <Th1sisfmyofmyo>
87cd9047b1 2.4 continued (#8092)
Quite a bit of work on 2.4

Co-authored-by: 3djc <Th1sisfmyofmyo>
2020-11-14 14:55:37 +04:00
Bertrand Songis 42a3198568 Merge with latest 2.3 2020-10-07 21:01:45 +02:00
Bertrand Songis f410d5c74b Warnings removed 2020-10-05 09:13:09 +02:00
Bertrand Songis 71ec1db9f6 Merge with latest 2.3 2020-06-18 11:14:07 +02:00
Bertrand Songis 36839dd417 [Horus] Gauge percent was not vertically centered 2020-06-01 16:02:20 +02:00
Raphael CoefficandBertrand Songis 8b4d2b698d YAML storage (#7071)
YAML storage
2019-11-12 14:50:05 +01:00
Bertrand Songis 3e2cb83991 Now uses the external libopenui 2019-10-02 14:41:52 +02:00
Damjan AdamicandBertrand Songis 49a63d43b3 Fix some bugs found by Sonar (#5392)
* Fix some bugs found by Sonar

* Different syntax for NOSONAR

* Switch Sonar badge to proper branch
2017-11-23 23:28:36 +01:00