Commit Graph
43 Commits
Author SHA1 Message Date
Raphael CoefficandGitHub 04a2231aee feat: WASM modules based simulation in Companion (#6435) 2026-03-20 12:19:17 +10:00
philmozandGitHub 5c04801162 fix(color): fix EM crashes when shutting down Lua states (#6337) 2025-06-13 11:08:54 +10:00
philmozandGitHub 36172d7f44 chore(color): remove legacy color definitions (#6204) 2025-05-06 13:53:26 +10:00
philmozandGitHub eea03e52af fix(lua): io.open(filename, “a”) overwriting instead of appending (#5928) 2025-02-20 21:32:20 +10:00
Frankie ArzuandGitHub 377afcfbd4 fix(lua): io.read always reading 256 bytes rather than specified value (#5833) 2025-01-25 15:20:34 +10:00
philmozandGitHub b6d46325f7 chore: cleanup compiler warnings, disable "unaligned pointer value" warning (#5743) 2025-01-01 11:33:32 +10:00
47cba2211f chores: update to LUA 5.3 (#4203)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
2024-12-24 12:45:06 +10:00
philmozandGitHub e0ec49d84e chore(radio): remove EEPROM macros and related code (#5461) 2024-08-22 10:32:16 +10:00
philmozandGitHub b4e33fc439 feat(lua): support for using LVGL objects on colorlcd (#4887) 2024-06-13 13:16:07 +10:00
Raphael CoefficandGitHub 373bb33f4b chore: Remove some bloat, reduce firmware size (#4288) 2023-11-08 22:05:54 +10:00
ef6316ef6c chore(radio): Move const data from RAM to FLASH. (#4098)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
2023-09-29 10:19:06 +02:00
philmozandGitHub 2dd76d0964 fix(Lua): Enable 'package' Lua library (#3786)
* Enable 'package' and 'string' Lua libraries.

* Change 'package' library to only load for color LCD radios.
Exclude 'string' library to match 2.8 functionality.
2023-07-10 19:42:12 +10:00
philmozandGitHub f2936931f7 fix(color): Memory leaks when using USB mass storage connection (#3547)
* Fix memory leaks when using 'USB Storage (SD)' connection.
- Lua state 'cache' allocated to both lsScripts and lsWidgets; but only one was being released.
- Default theme bitmaps being reloaded without releasing previously allocated memory.

* Fix icons.
2023-05-17 18:28:29 +10:00
MichaelandGitHub 6b2bca510c fix(lua): Debugprint not working (#3472) 2023-04-17 20:15:47 +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
jfrickmannandPeter Feerick 81cb94a4bf Added string constants to the read-only tables in Lua 2021-11-29 12:00:50 +10:00
Peter FeerickandPeter Feerick b3cbf73aa0 Enable lua table for colorlcd, not just horus 2021-11-25 11:18:33 +10:00
Raphael Coeffic 118fc26374 WiP Windows build workflow 2021-09-13 11:13:08 +02:00
3djcandGitHub 1cad34eb73 Add lua table lib to colorlcd (#7599)
* Add lua table lib to colorlcd
* Allow require on colorlcd
2020-05-15 14:50:13 +02:00
Bertrand Songis 9b6a2201bf Compilation fix 2019-08-28 12:28:07 +02:00
Bertrand Songis 3f47ec8f1c Compilation fix 2019-08-28 11:43:40 +02:00
Bertrand Songis e7736f3fdc Replace NULL by nullptr 2019-08-28 10:28:11 +02:00
Damjan AdamicandBertrand Songis 73f4b8f172 Projectkk2glider/issue 4827 (#4855)
* Reverting a part of f94b4c743d that deals with the size of table hash. Fixes 4827, but uses more memory and CPU.

* New internal Lua traces
2017-04-26 21:45:46 +02:00
Damjan Adamic acfeb7b47a Closes #4560: Lua uses double (again) for numbers. The float usage was not good for bit32 library where only ~24bits (out of 32) were correct, others were lost. This is supposed to be a temporary solution. 2017-03-06 18:21:41 +01:00
Damjan Adamic cc36f189f2 Re #4502: Removed cache in Lua rotable search, tests have proven it does not speed up search significantly. Scripts that use some function a lot can use simple local variable to store pointer to the function - simpler and faster that cache. 2017-02-26 18:12:37 +01:00
Damjan AdamicandBertrand Songis a1a58ad8f8 Lua: All usage of double converted to float (#4502)
* Lua: All usage of double converted to float. printf("%f") still uses promotion to double, (floating point va_args are always promoted to double)
Speed improvements:
 * reordering of rotable to put most used tables at the top
 * caching of last found global table
Use real pointer to rotable instead of misusing void* to pass integer value
Lua internal traces now turned on by TRACE_LUA_INTERNALS cmake option

* Replaced floating point division with multiplication (where possible), the hardware FPU is much faster at multiplication vs division.
stb_image: enabled STBI_NO_HDR and STBI_NO_LINEAR (removes code that we don't need)
2017-02-26 12:59:39 +01:00
Damjan Adamic 2a8629c670 Fixes #3826: disable Lua platform optimizations (lua_number2integer() behaves the same way on all platforms) 2016-10-02 17:00:03 +02:00
Bertrand Songis c777af2b72 Compilation error fixed 2016-06-30 23:06:03 +02:00
Bertrand Songis 5f03924b5f Compilation error fixed 2016-06-30 22:44:16 +02:00
Bertrand Songis eb9e6d3c80 Fixes #3342 2016-03-11 18:07:40 +01:00
Bertrand Songis 33910c8721 [Horus] UI continued 2016-02-16 20:45:25 +01:00
Bertrand Songis 1d867a0daa [Horus] Lua constants names can go up to 32 chars 2016-02-16 18:54:07 +01:00
Bertrand Songis 88841f63ca Switch to CMake 2015-12-21 23:43:18 +01:00
Damjan Adamic 7538fcfb51 Git commit ID added to stamp
Fixes #2921: getValue() now also returns pilot position
Fixes #3062: Close any Lua open files when radio powers off
Fixes #3095: Lua string library added (only 6k bytes of flash used)
Re #3095: luaGetVersion() also returns version as numbers
(Ported from master 7ef790d3..4d0bd14ad and squashed into one commit)
2015-11-25 18:00:44 +01:00
Bertrand Songis b7c09d703c [Horus] UI continued 2015-11-18 22:07:48 +01:00
Damjan Adamic 2e068044c6 Fixes #3003: Lua io.write() did not support numbers 2015-10-27 23:59:18 +01:00
Damjan Adamic 2feb5ac894 Fixes #3001: Lua io.open() could not create new files 2015-10-27 23:59:18 +01:00
Damjan Adamic c1efd39df7 Better Lua traces 2015-07-31 18:59:20 +02:00
Damjan Adamic 516be9d9d3 Trace fixed 2015-06-25 21:11:22 +02:00
bsongis 5ed9bfcee9 Warning fix 2015-04-25 10:58:26 +02:00
bsongis becad53951 Cosmetics 2015-04-25 10:52:01 +02:00
bsongis 84fc2007f5 Lua f_open in "a" mode added 2015-03-31 20:39:46 +02:00
bsongis 0b7a85daa7 #1471 - Lua moved to thirdparty directory - io.seek added 2015-03-24 18:58:58 +01:00