Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Top GUI doesn't update

For general discussion related FlowStone

Top GUI doesn't update

Postby Visteon1 » Fri May 03, 2013 4:10 pm

Hello,

I am trying to get x,y coordinates from a module when the mouse moves and separately when the mouse clicks.
Using the LDO module i can get mouse clicks but when i try to recreate that in ruby code it doesn't output anything.

Also i have the ruby code for following the mouse position and it updates from the second level over the bit map module but not when i go to the top level?

The module i am trying to do this on is the bit map module. I have attached my code.

Can anyone see anything wrong with it? Im not sure if the code is wrong or i have missed a step/setting?

Thanks for the help

Rob
Attachments
Grid Point & 5 Servo.fsm
(64.17 KiB) Downloaded 833 times
Visteon1
 
Posts: 2
Joined: Fri May 03, 2013 4:03 pm

Re: Top GUI doesn't update

Postby trogluddite » Fri May 03, 2013 6:24 pm

Hi there, Visteon, welcome to the forum.

You'll be glad to hear that it won't take much to get your schematic fixed - looks like a very interesting design, I'm from more of a Audio DSP background myself, so I find what you robotics and control guys are doing fascinating.
Anyhow, one at a time...

1) Mouse Over
This is just a matter of GUI "levels". When you have several modules nested inside each other, the "MouseOver" input on the MGUI primitive has to be turned on for all of the levels above the one where you need to pick up the signal. In this case, you just need to add a boolean true to the MGUI in the main "mother" module.

2) Mouse Click
Two things you need to do...
a - Disconnect the 'mouse down' primitive. Mouse messages can only ever get picked up by one receiver at a time, so you have to choose between Ruby or the primitives.
b - The mouse clicks will send a message with your code - but it's being sent to the same 'shared' output as the mouse over movements. To send the data separately, create new outputs by dragging the little widget downwards, and right click the outputs to select an appropriate type of data (float in this case). Then you need to tell Ruby to use the new outputs by adding an index number to the output code - sometihing like this...
Code: Select all
output 1, x
output 2, y

(NB - the first output is at index zero - the one being used by the mouse over readout).
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Top GUI doesn't update

Postby Visteon1 » Tue May 07, 2013 8:54 am

Hi trogluddite,

Thanks for the reply.
I have changed what you have said and now it works, thanks.
But the mouse movement gives me the coordinates across the entire top level GUI not just the Module i have written the code in, how can i limit this to just the module?

Thanks
Rob
Visteon1
 
Posts: 2
Joined: Fri May 03, 2013 4:03 pm


Return to General

Who is online

Users browsing this forum: No registered users and 93 guests