A small modification to the AP Mount Library Code

Hi, I have made a small modification to the "AP_Mount" library to be used mainly by the filmmakers, basically is:

1- Add a dead zone when we use the joystick mode to prevent undesired movements of cam, you can change the dead zone using the min and max value in ms.

#define CAM_STICK_DEAD_ZONE_MIN 1400 // Set the dead zone in ms
#define CAM_STICK_DEAD_ZONE_MAX 1600 // Added by Pablo Zeron

and disable this mode with:

#define SLOW_STOP 1 // 1 -> Enable the slow stop 0 -> Disable

2- Add a slow stop mode, until now when you release the stick the movement stops, but with this option the movement continues in base at the actual speed and it goes down slowly trying to get a smooth motion. The stop speed can be change by this parameter:

#define SLOW_STOP_SPEED 0.02f // Change this value to make it faster or slower.

I am a beginner programmer, and I hope that Amilcar Lucas or Gregory Fletcher can take a look to the code and check if it is well done or can be optimized, but it works well for me.

Thanks.

AP_Mount.cpp

AP_Mount.h

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Interested. I've been tuning an APM Ecilop for awhile. It's flying well but have had an issue with the gimbal hunting/twitching a bit against my gyros. Is your dead zone code used to keep the gimbal more steady at the center?
This reply was deleted.

Activity

Santiago Perez liked Santiago Perez's profile
18 hours ago
More…