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

jknobmaker - knobs in wrong position?

Post any examples or modules that you want to share here

jknobmaker - knobs in wrong position?

Postby Nubeat7 » Tue Jan 08, 2013 7:31 pm

someone here tried the jknobmaker to make knobs? i, cant get the knobposition right, the knobvalue is is not right, like u can see in the attached file, i`m doing something wrong?

BTW, i have also troubles with the switch, when using it teh image disappears?
Attachments
knob.fsm
(62.56 KiB) Downloaded 1277 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: jknobmaker - knobs in wrong position?

Postby Nubeat7 » Tue Jan 08, 2013 10:50 pm

hmm, ok think i found the problem, looks like there is a bug in the ruby script!? because it is working right when changing a little bit in the angle calculating on the value, just subtract 180° after the anglecalculating like shown below...
Attachments
bug.jpg
bug.jpg (52.48 KiB) Viewed 14786 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: jknobmaker - knobs in wrong position?

Postby support » Wed Jan 16, 2013 10:45 am

Sorry, must have missed this before.

It's not a bug, you just need to modify the code in order to make it work with your bitmap.

In the Init method you need to adjust @startAngle and @sweepAngle. If you want the knob to run from the first cell to the last then set @startAngle to 0 and @sweepAngle to 360.

In the toolbox example we provide the first cell in the bitmap has the knob at 12 o'clock (pointing straight up) and it moves clockwise back to the same position. We wanted it to move from 7:30 on the clock face (225 degrees clockwise) to 4:30 on the clock face (135 degrees clockwise). That equates to a start angle of 225 and a sweep of 270.

Hope that explains things.
User avatar
support
 
Posts: 151
Joined: Fri Sep 07, 2012 2:10 pm

Re: jknobmaker - knobs in wrong position?

Postby Nubeat7 » Wed Jan 16, 2013 2:45 pm

Thanks support, everything is clear now!
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna


Return to User Examples

Who is online

Users browsing this forum: No registered users and 28 guests

cron