Commit Graph
228 Commits
Author SHA1 Message Date
Bertrand Songis 2388b90a90 XLITE-S support 2018-11-03 16:56:51 +01:00
3djc 04c95d2fdb LUA : Add curves to inputs 2018-10-12 07:34:56 +02:00
3djc e97cdd00a8 Merge fixes 2018-08-30 13:34:13 +02:00
Bertrand Songis 131078e3a0 GCC new warnings fixed (GCC) 8.1.1 20180531 2018-08-03 23:02:43 +02:00
Max Paperno b15ac0f2e1 Merge branch '2.2' into 2.3 2018-07-16 14:01:33 -04:00
Kilrah b50826bc74 Do not load global function scripts if global functions are disabled in model settings (fix #6029) 2018-07-14 13:21:24 +02:00
Arne Schwabe c99dc375e8 Fix setting x values < 0 for custom curves (fixes #6026)
Also accept bool for smooth parameter as the documentation suggest
2018-07-13 09:36:30 +02:00
Bertrand Songis d2697345e1 VIRTUAL_INPUTS #define removed 2018-07-11 18:54:05 +02:00
Raphael Coeffic 25c02b96f3 add LUA access to serial port (serial2 and USB) 2018-07-06 10:01:09 +02:00
Kilrah b8e9d5542d Xlite LRUD key REPT events were missing in lua 2018-05-27 12:01:28 +02:00
3djc 535e41d43e Add required keyword for xlite. Fix #5909 2018-05-26 08:51:08 +02:00
Bertrand SongisandGitHub 99604dccc9 XLite support (#5806) 2018-04-25 23:07:04 +02:00
3djc af7183151c Restore access from LUA since values are controled 2018-02-28 12:32:47 +01:00
3djc fdf4d4926f POC for review and discussion 2018-02-28 11:34:32 +01:00
tgreerandArne Schwabe 4b7f822848 added case for UNIT_TEXT used by crossfire FM Sensor (#5724) 2018-02-25 01:18:23 +01:00
3djcandAndre Bernet d3951235bd Add gtimer support to LUA (#5669)
* Add gtimer support to LUA

* Copy/paste issue
2018-02-11 23:25:04 +01:00
3djcandBertrand Songis 87eec92c5d Expose more internal GPS data to lua (#5628) 2018-01-26 18:54:22 +01:00
3djcandAndre Bernet 45d1755e19 X12S : give internal GPS access to LUA (#5610)
* Initial test

* Tested version

* Cosmetics
2018-01-08 15:12:28 +01:00
Bertrand SongisandGitHub 269831e0c4 Fixes #5502 (#5575)
* Fixes #5502

* RAS renamed to SWR
2018-01-02 10:41:15 +01:00
Raphael CoefficandBertrand Songis e63a877ed6 added getRtcTime() LUA function (#5524)
This allows for retrieving the UNIX timestamp kept internally.
2017-12-18 21:04:02 +01:00
3djcandBertrand Songis 394bc1689f Massive cleaning (#5538) 2017-12-18 20:54:22 +01:00
Max PapernoandBertrand Songis ba1073ace6 [Lua] Allow global functions to play scripts. (#5440) 2017-11-30 19:10:11 +01:00
3djcandBertrand Songis 13f364d96a Add American time format to lua getDateTime() (#5431)
Add American time format to lua getDateTime()
2017-11-29 09:18:50 +01:00
Damjan AdamicandBertrand Songis 49a63d43b3 Fix some bugs found by Sonar (#5392)
* Fix some bugs found by Sonar

* Different syntax for NOSONAR

* Switch Sonar badge to proper branch
2017-11-23 23:28:36 +01:00
Andre BernetandBertrand Songis 7f4daf3f5b Lua themes with no options wouldn't load anymore (got broken in b4939… (#5351)
* Lua themes with no options wouldn't load anymore (got broken in b493973d7d)

* Keep protection

* Changes according to PR comments
2017-11-18 11:59:59 +01:00
Damjan AdamicandBertrand Songis f0f3e35bf6 Lua memory (de)allocation tracer: (#5191)
* Lua memory (de)allocation tracer:

Usage:
 * turn on: `cmake -DLUA=YES -DLUA_ALLOCATOR_TRACER=YES -DDEBUG=YES -DNANO=NO`
 * get debug output and make plot data: `./simu 2>&1 | grep "^LT" | ../radio/util/lua_trace2plot.py > data.plot`
 * plot: `gnuplot  -e 'set xtics rotate;  plot "data.plot" using 2:xtic(1) ; pause mouse close'`

* Changes based on Bertrand comments
2017-11-11 09:41:05 +01:00
Damjan AdamicandAndre Bernet 955d5775cb Add Lua getUsage() function that returns percent of already used up i… (#5313)
* Add Lua getUsage() function that returns percent of already used up instructions in current script execution cycle. It can be used to avoid script being killed when doing long lasting tasks (like telemetry logs loading and parsing)

* Compilation fixes

* Doc fix

* Disable Lua script instructions limit in DEBUG mode
2017-11-10 17:23:37 +01:00
Damjan Adamic b153cdec93 Fixes #5266: Lua docs updated: radio type has different names for the various radios in 2.2.0 2017-10-31 18:04:21 +01:00
Florent MartelandAndre Bernet 1962336316 Add access to vBatWarn from luaGetGeneralSettings() (#5293) 2017-10-29 08:38:50 +01:00
3djcandBertrand Songis da71f4cbbc Make Horus widgets 'shadow' effect an option (#5203)
* Add shadows to c++ widgets

* Add BOOL zone option to Horus LUA

* LUA widgets too
2017-09-11 07:34:49 +02:00
Damjan Adamic 6cc40c65b2 Lua docs update (CrossfireTelemetryPush and crossfireTelemetryPop and some small spelling fixes) 2017-08-27 16:45:56 +02:00
Bertrand SongisandKilrah 541aa459cf Lua drawBitmap on X7 2017-08-04 12:08:10 +02:00
Arne Schwabe 129bbe2198 Fix getcurve reporting 0 as first x value instead of -100 2017-07-07 23:44:23 +02:00
Arne Schwabe 1ae8e40a3f Fix setCurve not probably working for custom curves
ypoints used for x instead of xpoints
2017-07-01 01:55:31 +02:00
Arne SchwabeandBertrand Songis 8e07f9b0f4 Allow to disable telemetry alarams (#4981)
* Allow to disable telemetry alarams

This mainly useful for cheap transceivers that have telemetry but no power amplifier and very limited range of often 10-20 meters. This includes fishpepper's tinyFISH FC (and its legal/illegal clones) and also Spektrum BNF models.

* Always disable a warning when RSSI Warnings are disabled

* Compile fix

* Fix typos, also mute sensor lost

Refactor the FrskyRSSIAlarm[2] into a EEPROM compatible RssiAlarm struct

* Compile fixes

* Also refactor Companion

* Cleanup unused datastruct on ARM

* Compile fix for AVR

* Change int to uin8_t for avr

* Fix strings
2017-06-14 23:34:27 +02:00
3djcandBertrand Songis 726b989f6c Horus Shadowed (#4979)
* Introduce SHADOWED and use it for BattCheck

* numbers too

* For drawTimer too

* Compilation fix
2017-06-02 16:36:27 +02:00
Chris PrinosandGitHub fe1146b62c drawComboBox luadoc fix
remove extraneous 'page' param
2017-05-31 21:17:46 -04:00
Arne Schwabe 2ae0472f76 Minor fixes to lua dua 2017-05-28 09:48:34 +02:00
Arne SchwabeandBertrand Songis cd23fedb56 Schwabe/lua set curve (#4955)
* Implement setCurve for lua

* Bug fixes after actual testing of API

* Fix documentation

* Even more error checking

* Add example code how to use this function

* Silence gcc warnings

* Drop points and start array index at 1 and note about wrong index in getCurve

* Add standard example

* Fixes

* Don’t use an invalid number in example

* fix missing 0
2017-05-28 07:30:43 +02:00
Damjan AdamicandAndre Bernet 582546f8ed Fixes #4839: path buffer overflow if LUA widget or theme directory name was too long (max length of directory name is 13 characters) (#4876) 2017-04-29 22:18:11 +02:00
3djc 39a631d31d Dramaticaly reduce spam on companion/simu 'debug' output 2017-04-12 10:07:47 +02:00
3djcandBertrand Songis b291faf7a7 Add unit to lua getFieldInfo (#4750)
* Create getUnit lua function

* Cosmetics

* Expend getFieldInfo instead of creating a new function

* Streamline units table

* @projeckk2glider comments

* Cosmetics

* Use simple division
2017-04-06 22:31:17 +02:00
Max PapernoandBertrand Songis 5dabe53af4 Minor misc. fixes (#4729)
* [Simulator] Remove extraneous format value in microsTimer; Better way to delete SimulatorStartupDialog (in case no event loop starts).

* [Simulator] No helpers dependency for SimulatorStartupDialog.

* [simpgmspace] Rename micros timer function and make externally available.

* [Companion] Fix possible uninitialized value in TreeModel (compiler warning).

* [multi_arm] Fix minor compiler warning (MSVC: "unsafe mix of type 'uint8_t' and type 'bool' in operation").

* [lua] Fix compiler warning ("'data' may be used uninitialized in this function").

* [OpenTxSimulator] Fix analogs array range.

* [Simulator] Auto-start simulator when SimulatorMainWindow is first shown (vs. before it was shown).

* [Simulator] DebugOutput: prevent possible mutex deadlock on buffer overflow (force queued connection for Qt < 5.3).

* [Companion] Display calibration data for Horus joysticks (MOUSE1/MOUSE2)
2017-04-01 08:13:24 +02:00
Damjan Adamic 2aebcb842a Lua docs update: lcd.drawText() added link to fonts 2017-03-31 18:33:48 +02:00
Damjan Adamic 5e55a3f5d3 Lua killEvents() docs update 2017-03-25 20:37:05 +01:00
Bertrand SongisandDamjan Adamic 618345a2ef Fixes #4589 (#4644)
Produces a segfault with the telenowa script (missing bitmap)
2017-03-22 09:41:07 +01:00
Damjan AdamicandBertrand Songis 8375304d61 Several fixes for Lua Widgets and Themes options (#4648) 2017-03-21 07:42:00 +01:00
Damjan Adamic 1f1098e270 Lua getValue() docs updated (fixed source links for 2.2 added) 2017-03-20 17:51:02 +01:00
Florent Martel 47f029f01c LUA horizontal and vertical lcd.drawLine(...) fix
Fixes #4608
2017-03-17 10:04:36 -05:00
Damjan Adamic ac2a424353 Lua docs update: lcd.clear() 2017-03-13 20:21:53 +01:00