Setting the command ending
Setting the command ending
The command ending is a string that is automatically appended at the end of each command. Default command ending is "\n", which is LF (line feed) character / hex code 0x0A.
For example: a button with press action "up" will send "up\n" when pressed.
The command ending is also used to parse the received commands. App searches for that string to know where a command ends, then executes it, then waits for the next command.
For example, to turn on an LED that has id "led1", app should receive "led1 1\n". To turn it off - should receive "led1 0\n".
You can change the command ending if you want (menu -> interface -> set command ending).
Each interface uses its own command ending.
The most used command endings are:
"\n" - LF / line feed / 0x0A
"\r" - CR / carriage return / 0x0D
"\r\n" - CRLF / carriage return + line feed / 0x0D 0x0A
For example: a button with press action "up" will send "up\n" when pressed.
The command ending is also used to parse the received commands. App searches for that string to know where a command ends, then executes it, then waits for the next command.
For example, to turn on an LED that has id "led1", app should receive "led1 1\n". To turn it off - should receive "led1 0\n".
You can change the command ending if you want (menu -> interface -> set command ending).
Each interface uses its own command ending.
The most used command endings are:
"\n" - LF / line feed / 0x0A
"\r" - CR / carriage return / 0x0D
"\r\n" - CRLF / carriage return + line feed / 0x0D 0x0A
Permissions in this forum:
You cannot reply to topics in this forum
|
|