コード例 #1
0
        protected RemoteSensoredGearbox(float unitsPerRevolution, IMotorController master) : base(master)
        {
            _unitsPerRevolution   = unitsPerRevolution;
            _rotationsPerUnit     = 1f / _unitsPerRevolution;
            _remoteFeedbackDevice = RemoteFeedbackDevice.RemoteFeedbackDevice_None;

            /* child class takes care of sensor */
        }
コード例 #2
0
        public RemoteSensoredGearbox(float unitsPerRevolution, IMotorController master, IFollower[] followers, RemoteFeedbackDevice remoteFeedbackDevice) : base(master, followers)
        {
            _unitsPerRevolution   = unitsPerRevolution;
            _rotationsPerUnit     = 1f / _unitsPerRevolution;
            _remoteFeedbackDevice = remoteFeedbackDevice;

            _motor.ConfigSelectedFeedbackSensor(_remoteFeedbackDevice, 0);
        }
コード例 #3
0
ファイル: VictorSPX.cs プロジェクト: dadulak/Phoenix-netmf
        public VictorSPXConfiguration()
        {
            primaryPID  = new  VictorSPXPIDSetConfiguration();
            auxilaryPID = new VictorSPXPIDSetConfiguration();

            forwardLimitSwitchSource = RemoteLimitSwitchSource.Deactivated;
            reverseLimitSwitchSource = RemoteLimitSwitchSource.Deactivated;
            sum_0  = RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor0;
            sum_1  = RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor0;
            diff_0 = RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor0;
            diff_1 = RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor0;
            //NOTE: while the factory default value is 0, this value can't
            //be set by the API. Thus, RemoteSensor0 is the default
        }
コード例 #4
0
        public static string ToString(RemoteFeedbackDevice value)
        {
            switch (value)
            {
            case 0: return("None (factory default value)");

            case RemoteFeedbackDevice.RemoteFeedbackDevice_SensorSum: return("RemoteFeedbackDevice.RemoteFeedbackDevice_SensorSum");

            case RemoteFeedbackDevice.RemoteFeedbackDevice_SensorDifference: return("RemoteFeedbackDevice.RemoteFeedbackDevice_SensorDifference");

            case RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor0: return("RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor0");

            case RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor1: return("RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor1");

            case RemoteFeedbackDevice.RemoteFeedbackDevice_SoftwareEmulatedSensor: return("RemoteFeedbackDevice.RemoteFeedbackDevice_SoftwareEmulatedSensor");

            default: return("InvalidValue");
            }
        }
コード例 #5
0
 public RemoteSensoredGearbox(float unitsPerRevolution, IMotorController mc0, IFollower mc1, IFollower mc2, RemoteFeedbackDevice remoteFeedbackDevice) : this(unitsPerRevolution, mc0, new IFollower[] { mc1, mc2 }, remoteFeedbackDevice)
 {
 }
コード例 #6
0
 //------ sensor selection ----------//
 public ErrorCode ConfigSelectedFeedbackSensor(RemoteFeedbackDevice feedbackDevice, int pidIdx, int timeoutMs = 0)
 {
     return(_ll.ConfigSelectedFeedbackSensor((FeedbackDevice)feedbackDevice, pidIdx, timeoutMs));
 }
コード例 #7
0
ファイル: VictorSPX.cs プロジェクト: dadulak/Phoenix-netmf
 public VictorSPXPIDSetConfiguration()
 {
     selectedFeedbackSensor = RemoteFeedbackDevice.RemoteFeedbackDevice_RemoteSensor0;
     //NOTE: while the factory default value is 0, this value can't
     //be set by the API. Thus, RemoteSensor0 is the default
 }
コード例 #8
0
 public CurrentLimitedSensorGearbox(float unitsPerRevolution, IMotorControllerEnhanced mc0, IMotorControllerEnhanced mc1, IMotorControllerEnhanced mc2, RemoteFeedbackDevice remoteFeedbackDevice)
     : base(unitsPerRevolution, mc0, mc1, mc2, remoteFeedbackDevice)
 {
 }
コード例 #9
0
 public CurrentLimitedSensorGearbox(float unitsPerRevolution, IMotorControllerEnhanced master, IMotorControllerEnhanced[] followers, RemoteFeedbackDevice remoteFeedbackDevice) : base(unitsPerRevolution, master, followers, remoteFeedbackDevice)
 {
 }
コード例 #10
0
 public SensoredGearbox(float unitsPerRevolution, IMotorControllerEnhanced master, IFollower[] followers, RemoteFeedbackDevice remoteFeedbackDevice) : base(unitsPerRevolution, master, followers, remoteFeedbackDevice)
 {
     _master = master;
     /* parent class selects sensor */
 }