Commit Graph
365 Commits
Author SHA1 Message Date
Peter FeerickandPeter Feerick 9401e00253 Add missing newline at EOF 2021-11-29 12:00:50 +10:00
jfrickmannandPeter Feerick 81cb94a4bf Added string constants to the read-only tables in Lua 2021-11-29 12:00:50 +10:00
Jesper FrickmannandGitHub a09e318e64 [Lua] Add setStickySwitch and getLogicalSwitchValue (#1056)
[Lua] Add setStickySwitch and getLogicalSwitchValue (#1056)
* Adds setStickySwitch to set the value of a stick logical switch
* Adds getLogicalSwitchValue to get the value of a logical switch by index
2021-11-29 12:48:01 +11:00
Raphael CoefficandRaphael Coeffic 5e3c20b258 Push some dirty hack to give internal CRSF a higher prio
This allows for BF scripts to run on internal CRSF.
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 043c1e6a2d Fixed pushing CRSF telem packets to internal module 2021-11-21 11:18:35 +01:00
Jesper FrickmannandGitHub 30780d82ec [lua] Add shared memory variables which can be accessed from Lua widgets and other Lua scripts (#1018)
* Issue #132
Added 16 shared memory variables which can be accessed bot from Lua widgets and other Lua scripts.

* Notice Only available on radios with color display
2021-11-13 16:10:33 +11:00
Raphael Coeffic 69c017091a More stringified values 2021-11-10 11:07:01 +01:00
Peter FeerickandGitHub 3ad98bacf4 [NV14] Use trim hats to emulate key events when standalone lua script running (#985)
* Preliminary trims as keys for lua
Largely based on open-flysky implementation

* Add `isLuaStandaloneRunning()`

* Add more virtual events

* Tweak virtual events further

* Finish remapping keys to virtual events

* Move some virtuals to right trim hat

* Add missing "defined"

* Revert to common EVT_VIRTUAL_MENU mapping

* Make keys/trims reset backlight like other radios
2021-11-09 12:50:20 +11: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
Riwan ec1c1ec345 Added LUA file system operations 2021-08-23 14:39:49 +02:00
jfrickmannandRaphael Coeffic 9d878b71ce Improved color handling in Lua
LCD flags can now hold either a theme color index or a RGB value. Hence, values from lcd.RGB() and literal colors like e.g. RED, WHITE etc. can be used interchangeably with theme colors and CUSTOM_COLOR.
Also redesigned drawText, drawNumber and drawTimer, so they now use a common function to implement the party tricks with BLINK and INVERS flags.
2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic d0e4b767d3 Converted literal colors to indices that can be used everywhere.
Also modified lcd.setColor function so it accepts either RGB or index color as new color. That way, literal colors work as before.
2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic 23ee5d933c Added back Lua constants for old style them colors 2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic 95b87db3e0 Did a scripted search and replace to replace 40 existing theme colors with 11 new theme colors. 2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic 302fcef465 Added OS theme colors as suggested by JimB40 in #506
Amend: trying if tests will pass when I move the new color indices to then end of the enum.
2021-08-22 19:33:03 +02:00
richardclliandGitHub 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
richardclliandGitHub d9d4591008 Merge pull request #495 from EdgeTX/main
Merge from main
2021-07-24 00:23:37 +08: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 0b9fd82074 Added touch events to Lua widgets 2021-07-22 08:02:33 -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
richardclliandGitHub 2222ee75e8 Merge pull request #373 from EdgeTX/2.4
Merge from 2.4
2021-06-30 15:14:08 +08: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
richardclliandGitHub 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 d10563d08b Fixed more zchar / string copy errors
Resolves #224
2021-06-16 18:00:42 +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 b0fb80b264 ZChar nightmare / take 2 2021-06-09 09:24:48 +02:00
Raphael CoefficandRaphael Coeffic 6d490bddf0 Sensors don't use ZCHAR in 2.4
Resolves #97
2021-06-02 11:19:11 +02:00
Raphael Coeffic 5030939e4e Added support for LUA pop-up functions 2021-05-30 18:25:35 +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 f0f6a1e093 Fixed various issues while running "teckel12/LuaTelemetry" widget 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 7b26fe708b More fixes 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic f1be9157ae Move away from color table for low level ops 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic fcf9683f2d NAVIGATION_HORUS does not exist anymore
Use COLORLCD instead.
2021-05-06 12:55:59 +02:00
Raphael Coeffic ef6f2d0c57 Scrolling from view to view works now
And quite some bugs & crashes fixed.
2021-04-18 07:57:42 +02:00
3djc 70d24506da Merge branch '2.3' into 2.4
# Conflicts:
#	radio/src/fonts/480x272/font_dblsize.png
#	radio/src/fonts/480x272/font_xxlsize.png
#	radio/src/gui/128x64/model_setup.cpp
#	radio/src/gui/128x64/radio_setup.cpp
#	radio/src/gui/480x272/model_receiver_options.cpp
#	radio/src/gui/480x272/model_setup.cpp
#	radio/src/gui/480x272/radio_calibration.cpp
#	radio/src/gui/480x272/radio_hardware.cpp
#	radio/src/gui/common/stdlcd/draw_functions.cpp
#	radio/src/gui/gui_common.cpp
#	radio/src/keys.h
#	radio/src/lua/interface.cpp
#	radio/src/pulses/afhds3.h
#	radio/src/rtos.h
#	radio/src/switches.cpp
#	radio/src/targets/common/arm/stm32/aux_serial_driver.cpp
#	radio/src/targets/horus/CMakeLists.txt
#	radio/src/targets/horus/lcd_driver.cpp
#	radio/src/targets/horus/startup_stm32f42_43xxx.s
#	radio/src/targets/taranis/CMakeLists.txt
#	radio/src/telemetry/crossfire.h
#	radio/src/telemetry/multi.cpp
#	radio/src/translations.cpp
#	radio/src/translations/it.h.txt
#	radio/src/translations/untranslated.h
#	radio/util/font2png.py
#	tools/commit-tests.sh
2021-04-08 11:42:28 +02:00
3djcandGitHub b60ba23f1f M-Link telemetry (#8281) 2021-03-10 19:13:36 +01:00
3djc 24fdbcbbab Send 0 with getRSSI when no telem 2021-02-15 13:10:29 +01:00
Daniel b9b5ee8a9d Add switch I X9D+2019 2021-02-06 14:58:34 +01:00
3djcandGitHub 753842fbaf Jumper T-Lite support (#8230) 2021-01-25 15:36:32 +01:00
Bertrand Songis 92479949a9 Warning removed 2021-01-24 22:25:33 +01:00
3djc 43129ca9e2 Improve serial LUA 2021-01-20 19:25:22 +01:00
3djcandGitHub c38e513c7e Allow setting serial baurate for LUA (#8228) 2021-01-19 14:57:45 +01:00
Kilrah c34ed67343 Merge branch '2.3' into 3djc/T-Lite
# Conflicts:
#	companion/src/firmwares/boards.h
#	companion/src/firmwares/opentx/opentxeeprom.h
#	radio/src/gui/common/stdlcd/radio_hardware.cpp
#	radio/src/targets/common/arm/stm32/adc_driver.cpp
#	radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt
#	radio/src/targets/taranis/board.h
#	radio/src/targets/taranis/hal.h
#	radio/src/targets/taranis/keys_driver.cpp
#	radio/src/targets/taranis/lcd_driver_spi.cpp
2021-01-15 20:17:02 +01:00