|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need help with our deadspace.
This is what we are using for our deadspace. Only problem with it is that it jumps from being 127 to say 142 without slowly getting up to speed. We would like to make this much smooth. I am fairly new at robot language but have c++ experience if that helps any. Please reply if you can help thankyou.
temp2 = (unsigned int)p2_y; if (temp2 > (127 + DEADSPACE)) { pwm02 = 255 - (unsigned char)(((temp2 - (127 + DEADSPACE)) * (127 / (127 - DEADSPACE))) + 127); } else if (temp2 < (127 - DEADSPACE)) { pwm02 = 255 - (unsigned char)(temp2 * 127 / (127 - DEADSPACE)); } else { pwm02 = 127; } |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|