[solved] ? on Changing Servo tilt



I see that the Servo has 5 steps up and 5 steps down.

I can change the ArduinoPhysics.js file for the Servo from a setting of (-.7, .7) to ( -1, 1) to get more range in the tilt. With older code I was able to make a setting of (-1.4, 1.4) and get the full range of 180deg but that no longer works. I also tried changing the return mapA(value, -1,1, 1000,2000); to 900,2100 with no noticeable change.

physics.mapTiltServo = function (value) {
value = limit(value, -1, 1);
return mapA(value, -1, 1, 1000, 2000);

I have been looking through openrov_servo.cpp *& openservo_servo.h trying to see if I can make changes in there to get more range in tilt. I want the get the full 180deg range but not sure what changes I need to do to make that happen.

My though was to add 6 steps up and 6 down or maybe there is a easier way of doing this any help on this would be most welcome.


Hey David,

There is a secondary limiter in the arduino code as well: https://github.com/OpenROV/openrov-software/blob/v2.5.0-rc1/arduino/OpenROV/CameraMount.cpp#L51




Thanks Brian that did the trick.