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
jknobmaker - knobs in wrong position?
4 posts
• Page 1 of 1
jknobmaker - knobs in wrong position?
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?
BTW, i have also troubles with the switch, when using it teh image disappears?
- Attachments
-
- knob.fsm
- (62.56 KiB) Downloaded 1374 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: jknobmaker - knobs in wrong position?
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 (52.48 KiB) Viewed 15742 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: jknobmaker - knobs in wrong position?
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.
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.
-
support - Posts: 151
- Joined: Fri Sep 07, 2012 2:10 pm
Re: jknobmaker - knobs in wrong position?
Thanks support, everything is clear now!
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 86 guests