Exemple #1
0
 public void ReadBinaryData(BinaryReader reader)
 {
     type             = (RobotSensorType)reader.ReadByte();
     portA            = reader.ReadInt16();
     portB            = reader.ReadInt16();
     conversionFactor = reader.ReadDouble();
 }
Exemple #2
0
 public void ReadBinaryData(BinaryReader reader)
 {
     type               = (RobotSensorType)reader.ReadByte();
     module             = reader.ReadInt16();
     port               = reader.ReadInt16();
     equation           = reader.ReadRWObject <Polynomial>();
     useSecondarySource = reader.ReadBoolean();
 }
Exemple #3
0
    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;
        }
    }
Exemple #4
0
 public RobotSensor(RobotSensorType type)
 {
     this.type = type;
 }