Commit Graph
58 Commits
Author SHA1 Message Date
bsongis 3d37b0d397 Lua bugfixes in getCustomFunction/setCustomFunction and
getLogicalSwitch/setLogicalSwitch
2014-06-26 07:16:43 +02:00
bsongis 1febac7bf9 Fixes #1347 2014-06-23 10:41:31 +02:00
bsongis 5fcba6e193 Fixes #1339 2014-06-21 21:49:26 +02:00
bsongis 9e1afe8cb0 Bad display after removal of a custom script 2014-06-20 12:09:43 +02:00
bsongis b83f95ed1a Events are transmitted to the Lua telemetry screens. Menus are displayed
over those screens (needed at least for Reset Telemetry/Flight)
2014-06-18 22:42:04 +02:00
bsongis b77d470684 background function added to Lua scripts (used only in telemetry
scripts)
2014-06-18 22:42:04 +02:00
bsongis ec81b078fe Now telem0.lua replaces the voltages screen and telem1.lua .. telem7.lua
are allowed. The user could now have 1+7+3+1=12 telemetry screens!
2014-06-18 22:42:04 +02:00
bsongis 2416dde7bb Lua telemetry screens. Still not finished:
- the scripts need to be wakedup even when not displayed
- I only tested telem0.lua, but theorically we could have 7 telemetry
screens
2014-06-18 22:42:04 +02:00
bsongis 19ef43cd7f Compilation error on VC++ 2014-06-17 17:38:29 +02:00
bsongis 2094e87da5 'phase' renamed to 'flight mode' everywhere in the code 2014-06-17 10:59:00 +02:00
bsongis d6ef1c011b Now the Lua Telemetry scripts 2014-06-14 11:13:02 +02:00
Damjan Adamic 10413bbede Removed compiler warning: lua.cpp:63:60: warning: missing braces around initializer for 'ScriptInputsOutputs' [-Wmissing-braces] 2014-06-14 08:24:00 +02:00
Damjan Adamic 91dfb0309e Removed compiler warning: lua.cpp:1382:21: warning: variable 'filename' set but not used [-Wunused-but-set-variable] 2014-06-14 08:18:47 +02:00
bsongis e3df420f8e Lua scripts directories changed. We will now have
/SCRIPTS/WIZARD/
/SCRIPTS/TEMPLATES/
/SCRIPTS/MIXES/
/SCRIPTS/FUNCTIONS/
2014-06-13 14:37:57 +02:00
bsongis 89433127c4 Lua scripts now in custom functions! 2014-06-12 18:18:42 +02:00
bsongis 4cdd359405 Prevents a crash in Lua when the inputs/outputs count exceeds the
maximum allowed
2014-06-04 22:47:44 +02:00
bsongis 85cb8b3dbd Wrong constant used for Lua inputs count 2014-06-04 22:22:22 +02:00
bsongis 634c327ac6 Vario value accessible in Lua scripts using getValue("vario") 2014-06-01 18:17:52 +02:00
bsongis b10709f68b Lua metrics (duration and interval) added to the Debug screen 2014-05-30 22:37:12 +02:00
bsongis 950f651af9 BMP are read on the stack to avoid a malloc. Lua memory displayed when
pressing [Menu Long]
2014-05-30 16:14:54 +02:00
bsongis 0963458d29 Plane Wizard flaps and brakes settings applied 2014-05-29 00:04:17 +02:00
bsongis 8c43ec47af Lua mixes setup fixes 2014-05-28 22:44:41 +02:00
bsongis 8b641c1309 Allows standalone Lua scripts to be splitted (the wizard was over 20k) 2014-05-28 10:03:31 +02:00
bsongis 4797df176c Warnings can now have an extra info displayed, which is useful for Lua
errors
2014-05-27 23:00:18 +02:00
bsongis 7cd7d0917e Only works on the simu :( 2014-05-27 22:06:08 +02:00
bsongis 14dec6f432 Add a function to raise an error from a Lua script 2014-05-27 21:55:47 +02:00
bsongis 2be373900c Wizard confirmation page 2014-05-27 08:43:36 +02:00
bsongis fc876f0506 Confirmation page added - not as nice as others ;) - Engine settings
applied (others remain to do). Flaps instead of Flaperons
2014-05-26 16:35:47 +02:00
bsongis 3f2fb96caa Lua garbage collector was never called. [Exit Long] will now force exit
on all standalone scripts.
2014-05-26 14:58:55 +02:00
bsongis eb2fd118b7 Lua Wizard simplification. Engine paged added. 2014-05-26 10:20:29 +02:00
bsongis b01a936b4d The .. operator didn't work well with integers on the real radio (while
it was ok on the simu). I will try to fix the issue later, for now I
introduce the lcd.drawSource(...) function. The Wizard pages are now ok
on the radio itself!
2014-05-22 19:36:56 +02:00
bsongis 90d63738e8 New Lua functions added (needed for the wizard) 2014-05-22 16:47:35 +02:00
bsongis 857aca7e39 Lua changes needed for the wizard 2014-05-21 23:20:34 +02:00
bsongis 847baa09ef Add a revision number to the versioning scheme 2014-05-20 21:17:23 +02:00
Damjan Adamic 34e1a0ce86 All references to "custom switches" renamed to "logical switches" 2014-05-17 15:29:31 +02:00
bsongis cd42a7749e One more constant exported for Lua scripts: FULLSCALE, to avoid 10.24
hardcoded in Lua scripts...
2014-05-14 10:46:37 +02:00
bsongis f178748090 Fixes #986
Fixes #1058
2014-05-05 16:07:07 +02:00
bsongis 6ae7da4b1a Missing check in setGlobalVariable(...) 2014-05-05 14:51:22 +02:00
bsongis 1466f96e51 Lua setGlobalVariable / getGlobalVariable added in model library 2014-05-05 09:59:34 +02:00
Damjan Adamic a6548a05d8 Completed list of conversions in luaGetValueAndPush() 2014-04-28 17:39:43 +02:00
Damjan Adamic bff912aef6 Renamed __luaGetValue() to luaGetValueAndPush() 2014-04-28 17:23:58 +02:00
Damjan Adamic 01391aa6aa Return 0 for all temeletry values, when telemetry not available. 2014-04-27 18:12:06 +02:00
Damjan Adamic 55d8a0ac8c bug: Default value was not added for input type VALUE 2014-04-27 11:24:08 +02:00
Damjan Adamic eac17bda08 Telemetry values are now returned as proper values (i.e. A1 voltage 4.5V is returned as 4.5) for model script inputs and getValue() function. 2014-04-26 21:10:54 +02:00
Damjan Adamic 06beced480 Removed symbol OPENTX_VERSION 2014-04-26 18:50:43 +02:00
Damjan Adamic bd31c541f6 Order of outputs was wrong 2014-04-26 18:48:30 +02:00
Damjan Adamic fc4cf73c89 Registered OpenTX version as symbol OPENTX_VERSION in Lua
Added PlayNumber()
2014-04-26 09:45:07 +02:00
Damjan Adamic d9c1bf767f Refactored luaGetValue(), my previous fix was incorrect. 2014-04-21 20:47:38 +02:00
Damjan Adamic cfa25ab030 Bad indentation 2014-04-21 20:26:23 +02:00
Damjan Adamic 3815ab8c45 Return nil if value not found in luaGetValue() 2014-04-21 20:17:30 +02:00