void LLBC_MD5::MD5GroupDigest::SetInfo(uint32 a, uint32 b, uint32 c, uint32 d) { SetA(a); SetB(b); SetC(c); SetD(d); }
DOMMatrix* DOMMatrix::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv) { SVGTransformListParser parser(aTransformList); if (!parser.Parse()) { aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR); } else { mMatrix3D = nullptr; mMatrix2D = new gfx::Matrix(); gfxMatrix result; const nsTArray<nsSVGTransform>& mItems = parser.GetTransformList(); for (uint32_t i = 0; i < mItems.Length(); ++i) { result.PreMultiply(mItems[i].GetMatrix()); } SetA(result._11); SetB(result._12); SetC(result._21); SetD(result._22); SetE(result._31); SetF(result._32); } return this; }
/** * 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); }
DOMMatrixReadOnly* DOMMatrixReadOnly::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv) { // An empty string is a no-op. if (aTransformList.IsEmpty()) { return this; } gfx::Matrix4x4 transform; bool contains3dTransform = false; if (!ServoCSSParser::ParseTransformIntoMatrix(aTransformList, contains3dTransform, transform.components)) { aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR); return nullptr; } if (!contains3dTransform) { mMatrix3D = nullptr; mMatrix2D = new gfx::Matrix(); SetA(transform._11); SetB(transform._12); SetC(transform._21); SetD(transform._22); SetE(transform._41); SetF(transform._42); } else { mMatrix3D = new gfx::Matrix4x4(transform); mMatrix2D = nullptr; } return this; }
LLBC_MD5::MD5GroupDigest &LLBC_MD5::MD5GroupDigest::operator +=(const LLBC_MD5::MD5GroupDigest &right) { SetA(GetA() + right.GetA()); SetB(GetB() + right.GetB()); SetC(GetC() + right.GetC()); SetD(GetD() + right.GetD()); return *this; }
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; }
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(); }
void SRXSpeed::ChangePID(float P, float I, float D) { SetP(P); SetI(I); SetD(D); }