servo 90' increase to 180' degree

Post Reply
c128
Posts: 17
Joined: Tue Apr 07, 2015 2:34 pm

servo 90' increase to 180' degree

Post by c128 »

how to increase servo degree in multiwii?

I try to change in config.h but nothing!

#define SERVO_MIN {500,500,...}
...

in radio control i try to write "500" but in mutiwii minimal value is 900 and max is 2100!

any suggestion?

c128
Posts: 17
Joined: Tue Apr 07, 2015 2:34 pm

Re: servo 90' increase to 180' degree

Post by c128 »

this work for my

file output.cpp

#if defined(SERVO)
for(i=SERVO_START-1; i<SERVO_END; i++) {
if(i < 2) {
servo[i] = map(servo[i], 1020,2000, conf.servoConf[i].min, conf.servoConf[i].max); // servo travel scaling, only for gimbal servos
}
#if defined(HELICOPTER) && (YAWMOTOR)
if(i != 5) // not limit YawMotor
#endif
servo[i] = constrain(servo[i], conf.servoConf[i].min, conf.servoConf[i].max); // limit the values
}
#if defined(A0_A1_PIN_HEX) && (NUMBER_MOTOR == 6) && defined(PROMINI)
servo[3] = servo[0]; // copy CamPitch value to propper output servo for A0_A1_PIN_HEX
servo[4] = servo[1]; // copy CamRoll value to propper output servo for A0_A1_PIN_HEX
#endif
#if defined(TRI) && defined(MEGA_HW_PWM_SERVOS) && defined(MEGA)
servo[5] = constrain(servo[5], conf.servoConf[5].min, conf.servoConf[5].max); // servo[5] is still use by gui for this config (more genereic)
servo[3] = servo[5]; // copy TRI serwo value to propper output servo for MEGA_HW_PWM_SERVOS
servo[4] = map(servo[4], 1020,2000, 500, 2500); //modifica
#endif
#endif

servo{4] now can make 180 degree

Post Reply