protected RemoteSensoredGearbox(float unitsPerRevolution, IMotorController master) : base(master) { _unitsPerRevolution = unitsPerRevolution; _rotationsPerUnit = 1f / _unitsPerRevolution; _remoteFeedbackDevice = RemoteFeedbackDevice.RemoteFeedbackDevice_None; /* child class takes care of sensor */ }
public RemoteSensoredGearbox(float unitsPerRevolution, IMotorController master, IFollower[] followers, RemoteFeedbackDevice remoteFeedbackDevice) : base(master, followers) { _unitsPerRevolution = unitsPerRevolution; _rotationsPerUnit = 1f / _unitsPerRevolution; _remoteFeedbackDevice = remoteFeedbackDevice; _motor.ConfigSelectedFeedbackSensor(_remoteFeedbackDevice, 0); }
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 }
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"); } }
public RemoteSensoredGearbox(float unitsPerRevolution, IMotorController mc0, IFollower mc1, IFollower mc2, RemoteFeedbackDevice remoteFeedbackDevice) : this(unitsPerRevolution, mc0, new IFollower[] { mc1, mc2 }, remoteFeedbackDevice) { }
//------ sensor selection ----------// public ErrorCode ConfigSelectedFeedbackSensor(RemoteFeedbackDevice feedbackDevice, int pidIdx, int timeoutMs = 0) { return(_ll.ConfigSelectedFeedbackSensor((FeedbackDevice)feedbackDevice, pidIdx, timeoutMs)); }
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 }
public CurrentLimitedSensorGearbox(float unitsPerRevolution, IMotorControllerEnhanced mc0, IMotorControllerEnhanced mc1, IMotorControllerEnhanced mc2, RemoteFeedbackDevice remoteFeedbackDevice) : base(unitsPerRevolution, mc0, mc1, mc2, remoteFeedbackDevice) { }
public CurrentLimitedSensorGearbox(float unitsPerRevolution, IMotorControllerEnhanced master, IMotorControllerEnhanced[] followers, RemoteFeedbackDevice remoteFeedbackDevice) : base(unitsPerRevolution, master, followers, remoteFeedbackDevice) { }
public SensoredGearbox(float unitsPerRevolution, IMotorControllerEnhanced master, IFollower[] followers, RemoteFeedbackDevice remoteFeedbackDevice) : base(unitsPerRevolution, master, followers, remoteFeedbackDevice) { _master = master; /* parent class selects sensor */ }