Commit Graph
21 Commits
Author SHA1 Message Date
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