JohnR Posted June 17, 2015 Share Posted June 17, 2015 From a user servo how can I execute a standard servo algorithm like Sys.ServoCtrl ? Is it as simple as double (*servo)(struct MotorData *Mptr); double myServoOut; servo = pshm->ServoCtrl; myServoOut = servo(Mptr); Link to comment Share on other sites More sharing options...
bradp Posted June 18, 2015 Share Posted June 18, 2015 Even simpler double user_pid_ctrl(MotorData *Mptr) { // Your custom super duper filter probable more than incrementing a P variable pshm->P[100] += 1.0; // The default servo algo. return pshm->ServoCtrl(Mptr); } Link to comment Share on other sites More sharing options...
Recommended Posts