Using the button item

View previous topic View next topic Go down

Using the button item

Post by Admin on Tue Mar 08, 2016 8:29 am

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.


Admin
Admin

Posts : 111
Join date : 2016-03-08

View user profile http://roboremo.makeforum.net

Back to top Go down

Re: Using the button item

Post by ECV on Thu Feb 16, 2017 3:10 pm

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?

ECV

Posts : 4
Join date : 2017-02-16

View user profile

Back to top Go down

Re: Using the button item

Post by Admin on Thu Feb 16, 2017 7:08 pm

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.

Admin
Admin

Posts : 111
Join date : 2016-03-08

View user profile http://roboremo.makeforum.net

Back to top Go down

Re: Using the button item

Post by ECV on Fri Feb 17, 2017 12:29 pm

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!

ECV

Posts : 4
Join date : 2017-02-16

View user profile

Back to top Go down

Re: Using the button item

Post by Admin on Thu Feb 23, 2017 11:16 am

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

Admin
Admin

Posts : 111
Join date : 2016-03-08

View user profile http://roboremo.makeforum.net

Back to top Go down

Re: Using the button item

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum