Merge pull request #42 from Thomas--S/touchscreen-adjustments

Forgotten adjustments for upcoming Touchscreen mod
master
Joachim Stolberg 2020-11-07 12:41:57 +01:00 committed by GitHub
commit a2d3000949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 10 deletions

View File

@ -240,9 +240,9 @@ techage.lua_ctlr.register_function("get_msg", {
return msg.src, data
end
end,
help = ' $get_msg([raw]) --> any value or nil\n'..
' If the optional `raw` parameter is not set or false,\n'..
' the return value is guaranteed to be a string.\n'..
help = ' $get_msg([raw]) --> number and any value or nil\n'..
' If the optional `raw` parameter is not set or false,\n'..
' the second return value is guaranteed to be a string.\n'..
' Read a received messages. Number is the node\n'..
' number of the sender.\n'..
' example: num,msg = $get_msg().'

View File

@ -413,15 +413,10 @@ In contrast the Controller can send text strings to the terminal.
### Further Functions
Messages are used to transport data between Controllers. Messages are always converted to text strings. Incoming messages are stored in order (up to 10) and can be read one after the other.
* `$get_msg()` - Read a received message. The function returns the sender number and the message. (see example "Emails")
Messages are used to transport data between Controllers. Messages can contain arbitrary data. Incoming messages are stored in order (up to 10) and can be read one after the other.
* `$get_msg([raw])` - Read a received message. The function returns the sender number and the message. (see example "Emails"). If the _raw_ parameter is not set or false, the message is guaranteed to be a string.
* `$send_msg(num, msg)` - Send a message to another Controller. _num_ is the destination number. (see example "Emails")
Similiar to the concept above you can also exchange arbitrary data. Please note that external devices might also send such data.
* `$get_data()` - Read received data. The function returns the sender number and the data.
* `$send_data(num, data)` - Send data to another Controller. _num_ is the destination number.
* `$chat(text)` - Send yourself a chat message. _text_ is a text string.
* `$door(pos, text)` - Open/Close a door at position "pos".