Commit Graph
453 Commits
Author SHA1 Message Date
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 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
Peter FeerickandRaphael 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
PeterandRaphael 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
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
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
olliw42andRaphael Coeffic d5d3bf5aa9 Add some new LUA graphics plotting functions 2021-06-05 22:29:15 +02:00
yaapuandRaphael Coeffic 714a9a3bea color_lcd: fixed lcd.drawGauge() 2021-06-05 20:29:54 +02:00
yaapuandRaphael 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 CoefficandRaphael Coeffic 6d490bddf0 Sensors don't use ZCHAR in 2.4
Resolves #97
2021-06-02 11:19:11 +02:00
olliw42andGitHub 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 CoefficandRaphael Coeffic 6b9abe0670 Remove obsoleted code 2021-05-24 16:23:06 +02:00
Raphael Coeffic 2f5b522413 Merge branch '2.3' into 2.4 2021-05-16 12:55:21 +02:00
Lucas1188 c8bd18441a Update api_general.cpp 2021-05-10 21:46:15 -06: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 3ba55ac34e Fixed non-color lcd cmake
No widgets necessary for B/W.
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
Raphael CoefficandRaphael Coeffic 3a45cbe8e7 Cleanup & fixes 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic 4656921dea New the BLINK fields do blink 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic 9bcd15e49d Finished moving color table and added INVERS 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic 897d8535e7 Added missing api_colorlcd.h 2021-05-06 12:55:59 +02:00