Make the tutorial demo a bit more useful
This commit is contained in:
parent
2505dde605
commit
d7d7ab2244
1 changed files with 3 additions and 3 deletions
|
|
@ -44,14 +44,14 @@ The second feature is a generalized method for sending commands to components wi
|
|||
want to send some serial data to a machine:
|
||||
|
||||
{% raw %}
|
||||
{% include machine-command.html type='button' label='Try It!' machine='vt100' component='SerialPort' command='receiveData' value='Hello World' %}
|
||||
{% include machine-command.html type='button' label='Try It!' machine='test1170' component='SerialPort' command='receiveData' value='HELP\r' %}
|
||||
{% endraw %}
|
||||
|
||||
which should translate into a control that looks like:
|
||||
|
||||
<button type="button" onclick="commandMachine('vt100','SerialPort','receiveData','Hello World')">Try It!</button>
|
||||
<button type="button" onclick="commandMachine('test1170','SerialPort','receiveData','HELP\r')">Try It!</button>
|
||||
|
||||
In fact, let's try it now. {% include machine-command.html type='button' label='Try It!' machine='vt100' component='SerialPort' command='receiveData' value='Hello World' %}
|
||||
In fact, let's try it now. {% include machine-command.html type='button' label='Try It!' machine='test1170' component='SerialPort' command='receiveData' value='HELP\r' %}
|
||||
|
||||
Obviously, every component we want to control will need to be updated to export the necessary "command" functions.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue