예제 #1
0
 public virtual void OnSpeedPolarPidCorrectionDataFromRobot(double corrPx, double corrIx, double corrDx, double corrPy, double corrIy, double corrDy, double corrPTheta, double corrITheta, double corrDTheta)
 {
     OnSpeedPolarPidCorrectionDataFromRobotEvent?.Invoke(this, new PolarPidCorrectionArgs
     {
         CorrPx     = corrPx,
         CorrIx     = corrIx,
         CorrDx     = corrDx,
         CorrPy     = corrPy,
         CorrIy     = corrIy,
         CorrDy     = corrDy,
         CorrPTheta = corrPTheta,
         CorrITheta = corrITheta,
         CorrDTheta = corrDTheta
     });
 }
예제 #2
0
        public virtual void OnSpeedPolarPidCorrectionDataFromRobot(byte[] payload)
        {
            uint timeStamp = (uint)(payload[3] | payload[2] << 8 | payload[1] << 16 | payload[0] << 24);

            OnSpeedPolarPidCorrectionDataFromRobotEvent?.Invoke(this, new PolarPidCorrectionArgs
            {
                CorrPx     = BitConverter.ToSingle(payload, 4 * 1),
                CorrIx     = BitConverter.ToSingle(payload, 4 * 2),
                CorrDx     = BitConverter.ToSingle(payload, 4 * 3),
                CorrPy     = BitConverter.ToSingle(payload, 4 * 4),
                CorrIy     = BitConverter.ToSingle(payload, 4 * 5),
                CorrDy     = BitConverter.ToSingle(payload, 4 * 6),
                CorrPTheta = BitConverter.ToSingle(payload, 4 * 7),
                CorrITheta = BitConverter.ToSingle(payload, 4 * 8),
                CorrDTheta = BitConverter.ToSingle(payload, 4 * 9)
            });
        }