Thonners / Helicopter

Scripts to fly a remote-control helicopter, using a Raspberry Pi as the main controller instead of a standard RC receiver unit
GNU General Public License v3.0
0 stars 0 forks source link

Set the default behaviour of the servos to cap the demand (rather than wrap round) #18

Closed Thonners closed 3 years ago

Thonners commented 3 years ago

Make it so that if the demand > 90degrees, the servo holds 90 deg (so that the demand doesn't wrap round to -90 if the heli still calls 'increment' or some other such instance).

The option to wrap can remain, but set the default behaviour to cap (so all demands >= 90 are set to 90).

Thonners commented 3 years ago

Implemented.

Updated the code to add the offset before doing the capping so that it doesn't accidentally wrap (or try to set the PWM width outside the legal limit) when applied.