- MIXBUS LUA SCRIPTS HOW TO
- MIXBUS LUA SCRIPTS FULL SIZE
- MIXBUS LUA SCRIPTS FULL
- MIXBUS LUA SCRIPTS SIMULATOR
You would think you want that to be 0, 0.
That would offset the image over to the right and down. I think you are misunderstanding how it should work too though.Īssuming I am interpreting the LUA docs correctly (which really doesn't explain all the parameters and functions well), You are telling the drawBitmap() function to start inside the Widget area at x=10 and y=20. It would appear to me that the drawBitmap() function is not working properly.
MIXBUS LUA SCRIPTS FULL
image does not span on the full screen (perhaps wrong sized?) (i thought this would size the image to the size of the full LCD)ġ. Local bitmap = lcd.loadBitmap("/bitmaps/user/sprvpr.png")
MIXBUS LUA SCRIPTS FULL SIZE
I would like to make a widget with a full size background image (full screen) - is that not possible? I tried copying the example lua scripts to my home directory under C:\Users\Adam\.ethos\scripts directory but they don't show up so maybe Lua isnt functional yet in the simulator. The models are stored in your home directory under a. The widget created by Lothar 3 posts above this will show you the widget size for any widget area you use it for to determine that too. You can find that out using the w, h = lcd.getWindowSize() function as shown in the included sample lua scripts and explained in the lua documentation that is available on github with the release. The size usable by a Widget depends on what Widget size you are using. The specs of the screen on the FrSky site say the screen resolution is 800 x 480. the list of options ends with "Line Chart".
MIXBUS LUA SCRIPTS SIMULATOR
I have installed X20 simulator but under "configure widget" there are no LUA options shown.
MIXBUS LUA SCRIPTS HOW TO
Basically, all events are passed, if the widget doesn't do anything with this event, it just returns false which means "I didn't do anything special, just deal with it as you would do with any widget".Īlso is there an online tutorial on how to run LUA on X20 PC simulator? where to place files. When a refresh is needed, paint() is called.Ģ) Yes, if something has changed in the widget and you want to draw it again, then invalidateWindow needs to be calledģ) The events flow is different as well. If only one widget needs to be refreshed (invalidateWindow has been called), then only this widget is drawn and the cycle is very quick. If nothing has changed, then the screen is not refreshed. The wakeup() will call the wakeup() of all (Lua) widgets.
when it is not visible, only the background() function is calledĮthos: wakeup() function is called at each cycle. OpenTX: the screen is always FULLY refreshed, even if nothing has changed - when a Lua widget is visible, its refresh() function is called so that he can paint his own region. To write in bold font, just call setFont(BOLD)ġ) background + refresh (OpenTX) vs wakeup + paint (Ethos) > For the drawText function is there a way to set BOLD, etc type text? Is that a parameter at the end or a separate function like the new setFont(S)? > Is there a way to set background color for text?įirst you draw a filled rectangle, then the text above > Are there some defined colors for draw functions? (not sure how that would work as they need red green blue parameters). a widget requested it, or the time changed) The screen is refresh only if needed and partially when possible (i.e. > When does wakeup() get called on a script?Īt each cycle of the main task, i.e. ON4MJ's DLG/F3K training script converted for Ethos by xStatiCa Keep track of the number of flights on a model by d_wheel The ETHOS Lua documentation can be downloaded from the ETHOS release files 1.1.0. Main FrSky X20, X20S & X20HD Tandem and ETHOS 24 Channel System thread Then keep it in memory for the next use, to avoid read again from SDĬurrently the first release of ETHOS Lua can be used in any radio display window cell that supports widgets.įor folks that might be wondering why Lua scripting is helpful with ETHOS here is some information It is suggested the users use lazy loading = load a bitmap ONLY when needed. 2MB for Lua scripts (this is a large amount)Īvoid using too much ram for bit maps. 2MB for bitmaps (one full screen bitmap on X20 costs 768K) The ETHOS Lua script files are stored on Click "Go to file" button. Alpha here on GitHub Click "Go to file" button. The Lua interpreter embedded inside ETHOS is based on LUA 5.4.3. Lua scripts allows users to extend ETHOS with custom features. This thread is dedicated to the discussion of the ETHOS Lua programming.