Using the button item
2 posters
Using the button item
Using the button item
Here is how to use a button:
- select menu -> edit ui
- click on blank space where you want to add the button
- select button
- the button will appear in the interface
- move it by dragging the top left corner
- resize it by dragging the bottom right corner
- edit its options by clicking on it
set text:
Set the text that will appear on the button. Defualt is "button"
set press action:
Set the stirng that will be sent when you press the button
set release action:
Set the string that will be sent when you release the button
set repeat period:
Set the time interval (in milliseconds) after which, if you keep holding the button, it will send again the release action, then the press action. Default is 0 (repeat disabled).
set repeat delay:
Set the time interval for the first repetition. Default is 0 (repeat period will be used).
set local / set remote:
Defualt is remote. A remote button will send the actions to the connected remote device.
A local button will send the actions locally, to the RoboRemo app.
Local action examples:
“iface n” or “interface n”
select the nth interface. (n from 0 to 7)
“echo abc”
will simulate the receiving of “abc” command.
“disconnect”
disconnect from the remote device
“connect rfcomm 11:22:33:44:55:66 1” or
“connect rfcomm 112233445566 1”
connect over Bluetooth RFCOMM to the remote device
with address 11:22:33:44:55:66 and port 1.
“connect rfcomm e 112233445566 1”
Also use encryption.
“connect rfcomm 112233445566 d”
Connect using the default UUID
“connect rfcomm 112233445566 f”
Connect using the first UUID
“connect tcp 192.168.0.5:9876”
conect over tcp/ip to the remote device with ip 192.168.0.5 and port 9876.
Here is how to use a button:
- select menu -> edit ui
- click on blank space where you want to add the button
- select button
- the button will appear in the interface
- move it by dragging the top left corner
- resize it by dragging the bottom right corner
- edit its options by clicking on it
set text:
Set the text that will appear on the button. Defualt is "button"
set press action:
Set the stirng that will be sent when you press the button
set release action:
Set the string that will be sent when you release the button
set repeat period:
Set the time interval (in milliseconds) after which, if you keep holding the button, it will send again the release action, then the press action. Default is 0 (repeat disabled).
set repeat delay:
Set the time interval for the first repetition. Default is 0 (repeat period will be used).
set local / set remote:
Defualt is remote. A remote button will send the actions to the connected remote device.
A local button will send the actions locally, to the RoboRemo app.
Local action examples:
“iface n” or “interface n”
select the nth interface. (n from 0 to 7)
“echo abc”
will simulate the receiving of “abc” command.
“disconnect”
disconnect from the remote device
“connect rfcomm 11:22:33:44:55:66 1” or
“connect rfcomm 112233445566 1”
connect over Bluetooth RFCOMM to the remote device
with address 11:22:33:44:55:66 and port 1.
“connect rfcomm e 112233445566 1”
Also use encryption.
“connect rfcomm 112233445566 d”
Connect using the default UUID
“connect rfcomm 112233445566 f”
Connect using the first UUID
“connect tcp 192.168.0.5:9876”
conect over tcp/ip to the remote device with ip 192.168.0.5 and port 9876.
Re: Using the button item
Hi,
In the button item i did set the repeat to both.
If i press and hold the button i would expect a repeated press action.
If i release the button i would expect a repeated release action.
What realy happens when i press and hold the button: it sends the press action and release action alternately and when i release the button no repeated signal is send.
Is this correct? It doesn't make sense to me?
In the button item i did set the repeat to both.
If i press and hold the button i would expect a repeated press action.
If i release the button i would expect a repeated release action.
What realy happens when i press and hold the button: it sends the press action and release action alternately and when i release the button no repeated signal is send.
Is this correct? It doesn't make sense to me?
ECV- Posts : 5
Join date : 2017-02-16
Re: Using the button item
Hi,
Yes, that is the desired behavior. It was inspired from the computer keyboard: when you hold a key, it keeps generating key_down and key_up events alternatively. The repeat functionality is intended to generate same sequence of events as if user was clicking a non-repeating button many times very fast.
Yes, that is the desired behavior. It was inspired from the computer keyboard: when you hold a key, it keeps generating key_down and key_up events alternatively. The repeat functionality is intended to generate same sequence of events as if user was clicking a non-repeating button many times very fast.
Re: Using the button item
Would you concider adding the repeat function as i described above?
Now when i release the button my application occasionally misses a packet and the output stays on.
When the button also keeps repeating when released the output will turn off with the repeated packets and there's no problem anymore.
With the slider this works fine!
Thanks!
Now when i release the button my application occasionally misses a packet and the output stays on.
When the button also keeps repeating when released the output will turn off with the repeated packets and there's no problem anymore.
With the slider this works fine!
Thanks!
ECV- Posts : 5
Join date : 2017-02-16
Re: Using the button item
I don't like that solution, since it is not fail-safe: If something happens to the phone/app before you release the button, the output will still remain ON.
I would suggest this:
- set the button to repeat only the press action
- implement a watchdog function in the remote device, so that it will turn OFF if does not receive the press action for a specific amount of time (which should be greater that the repeat period) I use repeat period 250ms and watchdog timeout 500ms.
All the best,
Victor
I would suggest this:
- set the button to repeat only the press action
- implement a watchdog function in the remote device, so that it will turn OFF if does not receive the press action for a specific amount of time (which should be greater that the repeat period) I use repeat period 250ms and watchdog timeout 500ms.
All the best,
Victor
Similar topics
» Toggle button image
» Question about the "Button" function
» Using the slider item
» Button to load another interface
» Attach Image to slider button
» Question about the "Button" function
» Using the slider item
» Button to load another interface
» Attach Image to slider button
Permissions in this forum:
You cannot reply to topics in this forum
|
|