Now I could adjust the travel on my sticks, but if I wanted to change it in the code, I think I would want to change;
in MultiWii.ino;
Code: Select all
for(axis=0;axis<3;axis++) {
if ((f.ANGLE_MODE || f.HORIZON_MODE) && axis<2 ) { // MODE relying on ACC
// 50 degrees max inclination
errorAngle = constrain((rcCommand[axis]<<1) + GPS_angle[axis],-500,+500) - att.angle[axis] + conf.angleTrim[axis]; //16 bits is ok here
PTermACC = ((int32_t)errorAngle*conf.pid[PIDLEVEL].P8)>>7; // 32 bits is needed for calculation: errorAngle*P8[PIDLEVEL] could exceed 32768 16 bits is ok for result
PTermACC = constrain(PTermACC,-conf.pid[PIDLEVEL].D8*5,+conf.pid[PIDLEVEL].D8*5);
and replace the -500 and +500 in the constrain statement to -200 and + 200? I've written some arduino scripts, but am no way a programmer, understanding the MultiWii code doesn't come easy for me.
Thanks for any help.
Andrew