emGUI basics II : Tweaking
this tutorial walks through the typical workflow of tuning a process inside the device.
- Let's presume that you have done a successful Search and you can see the device's tree.
- Let's presume that you are familiar with the platform and know which parameters, states and commands you wish to play with.
Setting the value of a parameter
Arbitrary parameter setting is not recommended unless you know what you're doing. The motor or the vehicle may spontaneously accelerate. If you wish to have a more user-friendly experience with setting up a product, we recommend using some of our predefined plugins or scripts.
The simplest way: you can just click inside the contents column and edit the value in-line. By pressing enter
afterward, the value will be written to the device.
Double-clicking on a parameter will invoke its dialog. In there, you can play with the value. You may dock the dialog inside the main emGUI window.
There are multiple ways how to change value:
Write your value to the text field:
You can specify the step value (if not predefined). Once the step value is set, you may use
+
and-
buttons to increment/decrement the value by one step. Corresponding keyboard buttons and mouse wheel will also work:You can specify the min and max values (if not predefined). Once min and max are set, you may drag&drop the slider for continuous value updating:
If they are defined, you can pick any of the presets:
After you change the value, this new value is not yet synced with the device. To set it, you need to click SET or press enter
.
For quick tuning, you may enable autoset. With auto-set, the value will be auto-set and synced each time you change it:
For bulk value set, you may leave more of your values unsynced. They will be highlighted in blue. After your tweaking is done, you can issue the value push command (keyboard F2
). Either on the entire device or through a folder's context menu (values will be written recursively):
In all the variable dialogs, as well as in the content column, the special status of the value is indicated by a special color and style of its string:
- Bold : value has been changed from it's default
- Blue : value has not been synced with the device (marked _inconsistent_)
- Yellow : value has been imported from file/clipboard
- : value has just been read from the device
- : value has just been written to the device
You may open multiple dialogs for the same parameter, prepare a different value in each of them and then use their set buttons - for fast switching between the prepared values.
Newly set values will only stay in the device until reset. You need to issue save command to make them persistent.
Executing an arbitrary command
Arbitrary command execution is not recommended unless you know what you're doing. The motor or the vehicle may spontaneously accelerate. If you wish to have a more user-friendly experience with setting up a product, we recommend using some of our predefined plugins or scripts.
to execute an arbitrary command, navigate to /commands folder. Double-clicking your command will open it's dialog:
To execute, hit execute button. You will see the status of execution in the State box. There are two ways (and their combinations) on how to exchange data with the command:
Arguments and result. The dialog contains 4 input string argument boxes and a single number result box. If you wish to append up to 4 input string arguments, fill them up in the arguments boxes. You will see the result of the command after it finishes (usually, a success is indicated with a zero return value). This example shows how to use echo command to mirror arguments into the standard output:
Standard input and output. The dialog consists of standard input and output edit boxes. If you wish to send a text input to the process, fill it up in the standard input box before executing. This example shows how to load an internal script using script command:
Standard input and output with synchronization. When the command awaits input from you, the standard input box will be highlighted. This example shows the save command waiting for the user's confirmation:
You may open multiple dialogs for the same command, prepare input arguments in each of them and then use their execute button - for fast commanding with different inputs.