MorrisLecar::MorrisLecar(const int&_No,bool _Is1Class,bool _IsResting):No(_No){ if(_Is1Class){ set_class1(); if(_IsResting) SetI(39.7);//=39.7;//just above Bifurcation point else SetI(42.0);//I=42.0;//Never happen } else{ set_class2(); if(_IsResting) SetI(88.1);//=88.1;//88.1; else SetI(95.0);//=95.0;//88.1;//just above Bifurcation point } }
/** * Sets control values for closed loop control. * * @param p Proportional constant. * @param i Integration constant. * @param d Differential constant. * @param f Feedforward constant. */ void CANTalon::SetPID(double p, double i, double d, double f) { SetP(p); SetI(i); SetD(d); SetF(f); }
SRXSpeed::SRXSpeed(int id, double Pvalue, double Ivalue, double Dvalue, int a):CANTalon(id) { SetControlMode(CANTalon::kSpeed); SetFeedbackDevice(CANTalon::QuadEncoder); SetP(Pvalue); SetI(Ivalue); SetD(Dvalue); EnableControl(); maxTicks=a; }
JohanCity::JohanCity(int gridsize,float edgelen) { // Resize grid Resize(gridsize,edgelen); // Misc. checkid = 0; timingreport[0] = 0; clock = new Clock(false); // Set default user values SetPopulation(0); SetMoney(50000); SetR(50); // beginpop SetC(10); // 1 kantoortje? SetI(70); }
SRXPosition::SRXPosition(int id, double p, double i, double d, bool invert):CANTalon(id) { SetControlMode(CANTalon::kPosition); SetP(p); SetI(i); SetD(d); SetFeedbackDevice(CANTalon::QuadEncoder); invertMotor=invert; SetInverted(invert); if (invert) { ConfigFwdLimitSwitchNormallyOpen(false); } else { ConfigRevLimitSwitchNormallyOpen(false); } SetPosition(0); target=0; EnableControl(); }
MorrisLecar::MorrisLecar():No(0){ set_class1(); SetI(39.7);//=39.7; }
void SRXSpeed::ChangePID(float P, float I, float D) { SetP(P); SetI(I); SetD(D); }
void JohanCity::AddI(int value) { SetI(idemand + value); }