public void ReadBinaryData(BinaryReader reader) { type = (RobotSensorType)reader.ReadByte(); portA = reader.ReadInt16(); portB = reader.ReadInt16(); conversionFactor = reader.ReadDouble(); }
public void ReadBinaryData(BinaryReader reader) { type = (RobotSensorType)reader.ReadByte(); module = reader.ReadInt16(); port = reader.ReadInt16(); equation = reader.ReadRWObject <Polynomial>(); useSecondarySource = reader.ReadBoolean(); }
public RobotSensor(RobotSensorType type) { this.type = type; switch (type) { case RobotSensorType.ENCODER: conTypePortA = SensorConnectionType.DIO; conTypePortB = SensorConnectionType.DIO; break; case RobotSensorType.LIMIT: conTypePortA = SensorConnectionType.DIO; conTypePortB = SensorConnectionType.DIO; break; case RobotSensorType.POTENTIOMETER: conTypePortA = SensorConnectionType.ANALOG; conTypePortB = SensorConnectionType.ANALOG; break; } }
public RobotSensor(RobotSensorType type) { this.type = type; }