Пример #1
0
	public SpheroBackEMFData(SpheroDeviceMessageDecoder decoder) : base(decoder)
	{
		filtered.right = decoder.DecodeInt32("filtered.rightMotor");
		filtered.left = decoder.DecodeInt32("filtered.leftMotor");
		raw.right = decoder.DecodeInt32("raw.rightMotor");
		raw.left = decoder.DecodeInt32("raw.leftMotor");
	}
Пример #2
0
 public SpheroBackEMFData(SpheroDeviceMessageDecoder decoder) : base(decoder)
 {
     filtered.right = decoder.DecodeInt32("filtered.rightMotor");
     filtered.left  = decoder.DecodeInt32("filtered.leftMotor");
     raw.right      = decoder.DecodeInt32("raw.rightMotor");
     raw.left       = decoder.DecodeInt32("raw.leftMotor");
 }
	public SpheroAccelerometerData(SpheroDeviceMessageDecoder decoder) : base(decoder)
	{
		normalized.X = decoder.DecodeFloat("normalized.x");
		normalized.Y = decoder.DecodeFloat("normalized.y");
		normalized.Z = decoder.DecodeFloat("normalized.z");
		raw.x = decoder.DecodeInt32("accelerationRaw.x");
		raw.y = decoder.DecodeInt32("accelerationRaw.y");
		raw.z = decoder.DecodeInt32("accelerationRaw.z");
	}
Пример #4
0
 public SpheroAccelerometerData(SpheroDeviceMessageDecoder decoder) : base(decoder)
 {
     normalized.X = decoder.DecodeFloat("normalized.x");
     normalized.Y = decoder.DecodeFloat("normalized.y");
     normalized.Z = decoder.DecodeFloat("normalized.z");
     raw.x        = decoder.DecodeInt32("accelerationRaw.x");
     raw.y        = decoder.DecodeInt32("accelerationRaw.y");
     raw.z        = decoder.DecodeInt32("accelerationRaw.z");
 }
Пример #5
0
 public SpheroGyroData(SpheroDeviceMessageDecoder decoder) : base(decoder)
 {
     rotationRate.x    = decoder.DecodeInt32("rotationRate.x");
     rotationRate.y    = decoder.DecodeInt32("rotationRate.y");
     rotationRate.z    = decoder.DecodeInt32("rotationRate.z");
     rotationRateRaw.x = decoder.DecodeInt32("rotationRateRaw.x");
     rotationRateRaw.y = decoder.DecodeInt32("rotationRateRaw.y");
     rotationRateRaw.z = decoder.DecodeInt32("rotationRateRaw.z");
 }
Пример #6
0
	public SpheroGyroData( SpheroDeviceMessageDecoder decoder ) : base(decoder)
	{
		rotationRate.x = decoder.DecodeInt32("rotationRate.x");
		rotationRate.y = decoder.DecodeInt32("rotationRate.y");
		rotationRate.z = decoder.DecodeInt32("rotationRate.z");
		rotationRateRaw.x = decoder.DecodeInt32("rotationRateRaw.x");
		rotationRateRaw.y = decoder.DecodeInt32("rotationRateRaw.y");
		rotationRateRaw.z = decoder.DecodeInt32("rotationRateRaw.z");
	}
	public SpheroDeviceSensorsAsyncData(SpheroDeviceMessageDecoder decoder) 
		: base(decoder)
	{
		frameCount = decoder.DecodeInt32("frameCount");
		mask = decoder.DecodeUInt64("mask");
		
		
		// Decode the frames array and create the frames array converting the 
		// type of each object
		Object[] decodedArray = (Object[])decoder.DecodeObject("dataFrames");
		frames = new SpheroDeviceSensorsData[decodedArray.Length];
		int i = 0;
		foreach( Object decodedObject in decodedArray ) {
			frames[i++] = (SpheroDeviceSensorsData)decodedObject;
		}
	}
Пример #8
0
    public SpheroDeviceSensorsAsyncData(SpheroDeviceMessageDecoder decoder)
        : base(decoder)
    {
        frameCount = decoder.DecodeInt32("frameCount");
        mask       = decoder.DecodeUInt64("mask");


        // Decode the frames array and create the frames array converting the
        // type of each object
        Object[] decodedArray = (Object[])decoder.DecodeObject("dataFrames");
        frames = new SpheroDeviceSensorsData[decodedArray.Length];
        int i = 0;

        foreach (Object decodedObject in decodedArray)
        {
            frames[i++] = (SpheroDeviceSensorsData)decodedObject;
        }
    }
 public SpheroDeviceNotification(SpheroDeviceMessageDecoder decoder)
     : base(decoder)
 {
     // Do not change the "type" string since it is linked in RobotKit
     m_NotificationType = (SpheroNotificationType)decoder.DecodeInt32("type");
 }
	public SpheroDeviceNotification(SpheroDeviceMessageDecoder decoder) 
		: base(decoder)
	{
		// Do not change the "type" string since it is linked in RobotKit
		m_NotificationType = (SpheroNotificationType)decoder.DecodeInt32("type");
	}