Ejemplo n.º 1
0
 public virtual void OnSpeedIndependantPidCorrectionDataFromRobot(double corrPM1, double corrIM1, double corrDM1, double corrPM2, double corrIM2, double corrDM2, double corrPM3, double corrIM3, double corrDM3, double corrPM4, double corrIM4, double corrDM4)
 {
     OnSpeedIndependantPidCorrectionDataFromRobotEvent?.Invoke(this, new IndependantPidCorrectionArgs
     {
         CorrPM1 = corrPM1,
         CorrIM1 = corrIM1,
         CorrDM1 = corrDM1,
         CorrPM2 = corrPM2,
         CorrIM2 = corrIM2,
         CorrDM2 = corrDM2,
         CorrPM3 = corrPM3,
         CorrIM3 = corrIM3,
         CorrDM3 = corrDM3,
         CorrPM4 = corrPM4,
         CorrIM4 = corrIM4,
         CorrDM4 = corrDM4
     });
 }
Ejemplo n.º 2
0
        public virtual void OnSpeedIndependantPidCorrectionDataFromRobot(byte[] payload)
        {
            uint timeStamp = (uint)(payload[3] | payload[2] << 8 | payload[1] << 16 | payload[0] << 24);

            OnSpeedIndependantPidCorrectionDataFromRobotEvent?.Invoke(this, new IndependantPidCorrectionArgs
            {
                CorrPM1 = BitConverter.ToSingle(payload, 4 * 01),
                CorrIM1 = BitConverter.ToSingle(payload, 4 * 02),
                CorrDM1 = BitConverter.ToSingle(payload, 4 * 03),
                CorrPM2 = BitConverter.ToSingle(payload, 4 * 04),
                CorrIM2 = BitConverter.ToSingle(payload, 4 * 05),
                CorrDM2 = BitConverter.ToSingle(payload, 4 * 06),
                CorrPM3 = BitConverter.ToSingle(payload, 4 * 07),
                CorrIM3 = BitConverter.ToSingle(payload, 4 * 08),
                CorrDM3 = BitConverter.ToSingle(payload, 4 * 09),
                CorrPM4 = BitConverter.ToSingle(payload, 4 * 10),
                CorrIM4 = BitConverter.ToSingle(payload, 4 * 11),
                CorrDM4 = BitConverter.ToSingle(payload, 4 * 12)
            });
        }