Raphael Coeffic
56542bf7e8
Some fixes for simu
2021-07-31 17:31:50 +02:00
jfrickmann and Raphael Coeffic
6e37d11710
Added a lua function lcd.sizeText(text[, flags])
...
Gets the width and height (incl. vertical offset) of text on the LCD with flags applied.
2021-07-31 07:59:08 +02:00
jfrickmann and Raphael 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
Raphael Coeffic and GitHub
6e9b09b548
Merge pull request #494 from EdgeTX/nv14-build
...
NV14 Support and Build
2021-07-27 09:39:03 +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
richardclli and GitHub
f12e9d4599
Merge pull request #501 from EdgeTX/main
...
Merge from main
2021-07-26 10:50:32 +08: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
richardclli and GitHub
d9d4591008
Merge pull request #495 from EdgeTX/main
...
Merge from main
2021-07-24 00:23:37 +08:00
jfrickmann
5671838864
Cleaned up code for Mixer/Custom/Model scripts and added compiler directives
2021-07-22 15:11:12 -04:00
jfrickmann
dcac3cb9da
Fixed Lua error messages in standalone and telemetry scripts - again. There is still a problem that the call to POPUP_WARNING in displayLuaError does not return and the gui goes dark on colorlcd. Could it be long jump?
2021-07-22 14:56:23 -04:00
jfrickmann
c76532f33a
Fixed Lua error messages in standalone and telemetry scripts. TODO: If a standalone script errors in init() on COLORLCD it just quits without showing error. Is that because it calls luaError from luaExec() in radio_tools.cpp instead of from luaTask() in standalone_lua.cpp?
2021-07-22 14:51:44 -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
6d11fa8033
[lua] Fix sensor max and min matching
...
Resolves #442
2021-07-14 08:45:00 +02:00
richardclli and GitHub
2222ee75e8
Merge pull request #373 from EdgeTX/2.4
...
Merge from 2.4
2021-06-30 15:14:08 +08:00
Richard Li
fe532f32fe
Some more fixes.
2021-06-30 15:10:45 +08:00
Peter Feerick and Raphael Coeffic
edbec9f35e
Updated getVersion luadoc and example output
...
Finished updated lua docs for getVersion() api change,
verified functionality and grabbed simulator output,
removed magic string and used a define instead.
2021-06-26 06:36:35 +02:00
Peter and Raphael Coeffic
74222fe74d
Lua scripts can detect EdgeTX via getVersion
...
Add a sixth parameter to getVersion so that scripts
can detect whether running on EdgeTX or OpenTX.
i.e. `local ver, radio, maj, minor, rev, osname = getVersion()`
2021-06-26 06:36:35 +02:00
richardclli and GitHub
2f54a629a2
Merge pull request #289 from EdgeTX/2.4
...
Merge from 2.4 bug fixes
2021-06-21 15:45:44 +08:00
Raphael Coeffic
9ecccef315
Call LuaWidget background() if widget is not painted
...
Resolves #222
2021-06-19 17:47:47 +02:00
Raphael Coeffic
d10563d08b
Fixed more zchar / string copy errors
...
Resolves #224
2021-06-16 18:00:42 +02:00
Raphael Coeffic
60517df349
Removed necessity for lcd allowance in lcd.setColor() and lcd.getColor()
2021-06-15 16:24:54 +02:00
Raphael Coeffic
b8511a2b22
Fix lcd.RGB()
...
It does not require access to lcd, so let's not check that.
2021-06-15 16:19:43 +02:00
yaapu
1f62bab4f1
colorlcd: lua fix INVERS+RIGHT in drawText, drawNumber
2021-06-14 08:07:31 +00:00
yaapu
29966c53ff
colorlcd: fix for BOLD font h/v offsets, fix for lcd.clear()
2021-06-12 22:05:07 +00:00
yaapu
e5bb4d3fb7
colorlcd: fix for drawNumber INVERS and text vertical and horizontal offsets
2021-06-12 10:25:57 +00: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
Richard Li
cc92f25046
Fixed NV14 build, added flysky build script and target in build-gh.sh
2021-06-09 16:10:45 +08:00
Raphael Coeffic
247ac2a524
Fixes
2021-06-09 09:30:18 +02:00
Raphael Coeffic
b0fb80b264
ZChar nightmare / take 2
2021-06-09 09:24:48 +02:00
olliw42 and Raphael Coeffic
d5d3bf5aa9
Add some new LUA graphics plotting functions
2021-06-05 22:29:15 +02:00
yaapu and Raphael Coeffic
714a9a3bea
color_lcd: fixed lcd.drawGauge()
2021-06-05 20:29:54 +02:00
yaapu and Raphael Coeffic
e9b699f6e2
color_lcd: fixed lcd.clear()
2021-06-05 20:29:54 +02:00
Raphael Coeffic
493b9aaedc
Fixes issue with model LUA API strings
2021-06-04 20:43:02 +02:00
Raphael Coeffic and Raphael Coeffic
6d490bddf0
Sensors don't use ZCHAR in 2.4
...
Resolves #97
2021-06-02 11:19:11 +02:00
olliw42 and GitHub
25cce2611c
avoid compiler warning ( #139 )
2021-06-02 07:12:09 +02:00
Raphael Coeffic
267375cda8
Fix copy-paste error in luaLcdDrawNumber()
...
Resolves #127
2021-05-30 19:10:28 +02:00
Raphael Coeffic
5030939e4e
Added support for LUA pop-up functions
2021-05-30 18:25:35 +02:00
Raphael Coeffic
703bb6c20e
Fixed several disabled LUA lcd methods
2021-05-30 11:15:21 +02:00
Raphael Coeffic
54a7ef68e0
Fixed starting scripts from "Tools" page
2021-05-30 08:10:02 +02:00
Raphael Coeffic and Raphael Coeffic
6b9abe0670
Remove obsoleted code
2021-05-24 16:23:06 +02:00