Page 1 of 1
jknobmaker - knobs in wrong position?
Posted: Tue Jan 08, 2013 7:31 pm
by Nubeat7
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?
Re: jknobmaker - knobs in wrong position?
Posted: Tue Jan 08, 2013 10:50 pm
by Nubeat7
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...
Re: jknobmaker - knobs in wrong position?
Posted: Wed Jan 16, 2013 10:45 am
by support
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.
Re: jknobmaker - knobs in wrong position?
Posted: Wed Jan 16, 2013 2:45 pm
by Nubeat7
Thanks support, everything is clear now!