Code to make the Yaw only active for + and - 45 degrees on left controller



  • I have found that when I land on throttle back using the default controller code, the yaw is also affected and so the Codrone also rotates left or right. I set yaw=0 instead of -1 and now can land with no rotation.

    Is there any way to code so that if the left joy stick is a hard right or left, the drone rotates +/- 45 degrees respectively. I'd like a little latitude so if I have a range between - 40 to -50 degrees, rotate left 45 degrees and the opposite for rotate right. Any suggestions on how to accomplish this?


  • administrators

    Hello @gbarr if you do not want the Throttle to affect the Yaw you can add a threshold 512+30 or 512-30 . Such that Yaw wont be set if the analogread of that joystick goes above any of those points. Let me know if you need a better explanation.


Log in to reply
 

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.