|
Re: 1 Joystick Drive
Although i do not know what other code in the part you are talking about, I do know what LimitMax is doing.
As you can see, the number being entered into the function is well over 2000, while the maximum that can be put to the PWM is only 255. What Limit_Max is reduces the input number, and its output is limited to the 0,255 range valid for the PWMs... On my team, we just skipped this and made all numbers signed so we could just add 127 making the range from -127,127, to 0,255.. but I would not advise doing this without knowing what you are doing, you may miss something and mess up the entire code.
__________________
- from B B frank
|