QuarkEmu Guidelines

Sep 25, 2017 - Start - if RC device is connected, this button download Dir/files (/Apps, /audio,. ... Input device - Set device type manually (when no Tx device is ...
1MB taille 53 téléchargements 415 vues
QuarkEmu Guidelines introduction QuarkEmu application is a Lua code editor & debugger for Jeti Radio control developer. It can being used in standalone mode or connected mode.

Main window The main window is composed by a central part (Code editor) and up to 7 docking windows (Toolbar, File, Simulation, logs & console, Chart, Debug, radio Control).

Preferences dialogbox 3 tabs are available:

General tab Manage all settings that may be used during Lua code execution. User name - Text returned by system.getUserName() Serial code - Text returned by system.getSerialCode() Model name - Text returned by system.getProperty("Model") Screen size - Modify screen size of radio control emulator Audio volume - Modify audio volume when using audio Lua functions Permanent pLoad/pSave cache - Clear all cached items Start - if RC device is connected, this button download Dir/files (/Apps, /audio,...) from your DC/DS 24/16 connected device and put them into private QuarkEmu directories RC Firmware version - Text returned by system.getVersion() require ("utils") - if checked, includes require ("utils") Lua code at the top of the code every time code is executed. Utils.jsn file include overloaded Lua print() function for display Lua tab items and some utility function. - Warning- all code you put in that file may be overloaded by a new QuarkEmu version. Input device - Set device type manually (when no Tx device is connected) Color profile - 12 regular color profiles supported by DC/DS 24 Show Garbage collector chart - If checked, the first chart tab is LUA Garbage collector chart, realtime updated

Sensor tab

Display all sensors loaded from config.jsn file. Table sheet items are not yet editable. Modify directly into config.jsn.

Random generator tab Display all internal data generator used inside QuarkEmu . Table sheet items are not yet editable.

Radio control dock window This window is grouping one main RC tab and two telemetry tabs (as we cannot display for a model more than 2 telemetry windows).

Control buttons area F1 to F5 - Main GUI buttons. Tips: you can directly mouse click on corresponding graphic area to sipulate a presses button Menu - Send Menu button event to Lua main event loop ESC - Send Esc button event to Lua main event loop Emter - Send Enter button event to Lua main event loop Row Cw - Send clockwise rotate event to Lua main event loop Rot Acw - Send anti clockwise rotate event to Lua main event loop 3D Enter - Set default value when pressed for a long time

Switch & Stick controls All action on switches/Sticks are sent to Lua main event loop to be handled by system.getInputs() & system.getInputsVal() 12 digital switches 8 proportional switches or sticks

Debug dock window This window is grouping all debugging controls.

Set breakpoints in Lua code You can set any breakpoints you need from code editor, by selecting left area in text margin. A red circle is then displayed. Each breakpoint locations are saved associated to corresponding files.

When program counter (green arrow) is on a breakpoint, you can then use debug dock window for following actions: Cont - Continue running to the next breakpoint or program end Finish - terminate program Step in - Step into a function Step over - Step over a function Eval - Evaluate variable content. You must select variable name in code editor before hit Eval button. Result is displayed into console tab. For variable content display, regexp filter can be used to shown groups of variables separate by pipes ( | ) characters. Contents will be updated each time program counter will going on a breakpoint. Current filter pattern is saved from a QuarkEmu session to another. For regexp documentation, pleas go to http://doc.qt.io/qt-5/qregexp.html

Files dock window This window is an explorer/finder like that show piece of directory supposed to be your development directory location.

Simulation dock window This window display 3 sliders that allows simulation of 3 telemetry sensors. These sliders can be assigned to wanted sensors. Each time you move a slider, new values are sent to Lua main event loop to be returned by system.getSensors().

Assigned a slider to a sensor Open config.jsn file, choose a sensor (ex: line 6) 1 2 3 4 5 6

{"config": [ {"sensors": [ {"id":1,"param":1,"decimals":0,"type":0,"label":"voltage1","unit"

Add to EOL a json field "sim":"xx", where xx could be S1, S2 or S3. Json fields value, min & max will be used to setup the slider properly. Value type must be numeric.

Chart dock window This window display all charts created with emulator.createChart() function (see QuarkEmu API). If Show Garbage collector chart checkbox in preferences Dialogbox is checked, a Gc tab is automatically created and update each time Lua program is started.

Version history Version

Description

2017.09.25

First release