Class NovaWrapper

java.lang.Object
yams.motorcontrollers.SmartMotorController
yams.motorcontrollers.local.NovaWrapper

public class NovaWrapper extends yams.motorcontrollers.SmartMotorController
Nova wrapper for SmartMotorController
  • Constructor Details

    • NovaWrapper

      public NovaWrapper(com.thethriftybot.devices.ThriftyNova controller, DCMotor motor, yams.motorcontrollers.SmartMotorControllerConfig config)
      Construct the Nova Wrapper for the generic SmartMotorController.
      Parameters:
      controller - ThriftyNova to use.
      motor - DCMotor connected to the ThriftyNova.
      config - SmartMotorControllerConfig to apply to the ThriftyNova.
  • Method Details

    • setupSimulation

      public void setupSimulation()
      Specified by:
      setupSimulation in class yams.motorcontrollers.SmartMotorController
    • seedRelativeEncoder

      public void seedRelativeEncoder()
      Specified by:
      seedRelativeEncoder in class yams.motorcontrollers.SmartMotorController
    • synchronizeRelativeEncoder

      public void synchronizeRelativeEncoder()
      Specified by:
      synchronizeRelativeEncoder in class yams.motorcontrollers.SmartMotorController
    • simIterate

      public void simIterate()
      Specified by:
      simIterate in class yams.motorcontrollers.SmartMotorController
    • setIdleMode

      public void setIdleMode(yams.motorcontrollers.SmartMotorControllerConfig.MotorMode mode)
      Specified by:
      setIdleMode in class yams.motorcontrollers.SmartMotorController
    • setEncoderVelocity

      public void setEncoderVelocity(AngularVelocity velocity)
      Specified by:
      setEncoderVelocity in class yams.motorcontrollers.SmartMotorController
    • setEncoderVelocity

      public void setEncoderVelocity(LinearVelocity velocity)
      Specified by:
      setEncoderVelocity in class yams.motorcontrollers.SmartMotorController
    • setEncoderPosition

      public void setEncoderPosition(Angle angle)
      Specified by:
      setEncoderPosition in class yams.motorcontrollers.SmartMotorController
    • setEncoderPosition

      public void setEncoderPosition(Distance distance)
      Specified by:
      setEncoderPosition in class yams.motorcontrollers.SmartMotorController
    • setPosition

      public void setPosition(Angle angle)
      Specified by:
      setPosition in class yams.motorcontrollers.SmartMotorController
    • setPosition

      public void setPosition(Distance distance)
      Specified by:
      setPosition in class yams.motorcontrollers.SmartMotorController
    • setVelocity

      public void setVelocity(LinearVelocity velocity)
      Specified by:
      setVelocity in class yams.motorcontrollers.SmartMotorController
    • setVelocity

      public void setVelocity(AngularVelocity angularVelocity)
      Specified by:
      setVelocity in class yams.motorcontrollers.SmartMotorController
    • applyConfig

      public boolean applyConfig(yams.motorcontrollers.SmartMotorControllerConfig config)
      Specified by:
      applyConfig in class yams.motorcontrollers.SmartMotorController
    • getDutyCycle

      public double getDutyCycle()
      Specified by:
      getDutyCycle in class yams.motorcontrollers.SmartMotorController
    • setDutyCycle

      public void setDutyCycle(double dutyCycle)
      Specified by:
      setDutyCycle in class yams.motorcontrollers.SmartMotorController
    • getSupplyCurrent

      public Optional<Current> getSupplyCurrent()
      Specified by:
      getSupplyCurrent in class yams.motorcontrollers.SmartMotorController
    • getStatorCurrent

      public Current getStatorCurrent()
      Specified by:
      getStatorCurrent in class yams.motorcontrollers.SmartMotorController
    • getVoltage

      public Voltage getVoltage()
      Specified by:
      getVoltage in class yams.motorcontrollers.SmartMotorController
    • setVoltage

      public void setVoltage(Voltage voltage)
      Specified by:
      setVoltage in class yams.motorcontrollers.SmartMotorController
    • getDCMotor

      public DCMotor getDCMotor()
      Specified by:
      getDCMotor in class yams.motorcontrollers.SmartMotorController
    • getMeasurementVelocity

      public LinearVelocity getMeasurementVelocity()
      Specified by:
      getMeasurementVelocity in class yams.motorcontrollers.SmartMotorController
    • getMeasurementPosition

      public Distance getMeasurementPosition()
      Specified by:
      getMeasurementPosition in class yams.motorcontrollers.SmartMotorController
    • getMeasurementAcceleration

      public LinearAcceleration getMeasurementAcceleration()
      Specified by:
      getMeasurementAcceleration in class yams.motorcontrollers.SmartMotorController
    • getMechanismVelocity

      public AngularVelocity getMechanismVelocity()
      Specified by:
      getMechanismVelocity in class yams.motorcontrollers.SmartMotorController
    • getMechanismAcceleration

      public AngularAcceleration getMechanismAcceleration()
      Specified by:
      getMechanismAcceleration in class yams.motorcontrollers.SmartMotorController
    • getMechanismPosition

      public Angle getMechanismPosition()
      Specified by:
      getMechanismPosition in class yams.motorcontrollers.SmartMotorController
    • getRotorVelocity

      public AngularVelocity getRotorVelocity()
      Specified by:
      getRotorVelocity in class yams.motorcontrollers.SmartMotorController
    • getRotorPosition

      public Angle getRotorPosition()
      Specified by:
      getRotorPosition in class yams.motorcontrollers.SmartMotorController
    • getExternalEncoderPosition

      public Optional<Angle> getExternalEncoderPosition()
      Specified by:
      getExternalEncoderPosition in class yams.motorcontrollers.SmartMotorController
    • getExternalEncoderVelocity

      public Optional<AngularVelocity> getExternalEncoderVelocity()
      Specified by:
      getExternalEncoderVelocity in class yams.motorcontrollers.SmartMotorController
    • setMotorInverted

      public void setMotorInverted(boolean inverted)
      Specified by:
      setMotorInverted in class yams.motorcontrollers.SmartMotorController
    • setEncoderInverted

      public void setEncoderInverted(boolean inverted)
      Specified by:
      setEncoderInverted in class yams.motorcontrollers.SmartMotorController
    • setMotionProfileMaxVelocity

      public void setMotionProfileMaxVelocity(LinearVelocity maxVelocity)
      Specified by:
      setMotionProfileMaxVelocity in class yams.motorcontrollers.SmartMotorController
    • setMotionProfileMaxAcceleration

      public void setMotionProfileMaxAcceleration(LinearAcceleration maxAcceleration)
      Specified by:
      setMotionProfileMaxAcceleration in class yams.motorcontrollers.SmartMotorController
    • setMotionProfileMaxVelocity

      public void setMotionProfileMaxVelocity(AngularVelocity maxVelocity)
      Specified by:
      setMotionProfileMaxVelocity in class yams.motorcontrollers.SmartMotorController
    • setMotionProfileMaxAcceleration

      public void setMotionProfileMaxAcceleration(AngularAcceleration maxAcceleration)
      Specified by:
      setMotionProfileMaxAcceleration in class yams.motorcontrollers.SmartMotorController
    • setMotionProfileMaxJerk

      public void setMotionProfileMaxJerk(Velocity<AngularAccelerationUnit> maxJerk)
      Specified by:
      setMotionProfileMaxJerk in class yams.motorcontrollers.SmartMotorController
    • setExponentialProfile

      public void setExponentialProfile(OptionalDouble kV, OptionalDouble kA, Optional<Voltage> maxInput)
      Specified by:
      setExponentialProfile in class yams.motorcontrollers.SmartMotorController
    • setKp

      public void setKp(double kP)
      Specified by:
      setKp in class yams.motorcontrollers.SmartMotorController
    • setKi

      public void setKi(double kI)
      Specified by:
      setKi in class yams.motorcontrollers.SmartMotorController
    • setKd

      public void setKd(double kD)
      Specified by:
      setKd in class yams.motorcontrollers.SmartMotorController
    • setFeedback

      public void setFeedback(double kP, double kI, double kD)
      Specified by:
      setFeedback in class yams.motorcontrollers.SmartMotorController
    • setKs

      public void setKs(double kS)
      Specified by:
      setKs in class yams.motorcontrollers.SmartMotorController
    • setKv

      public void setKv(double kV)
      Specified by:
      setKv in class yams.motorcontrollers.SmartMotorController
    • setKa

      public void setKa(double kA)
      Specified by:
      setKa in class yams.motorcontrollers.SmartMotorController
    • setKg

      public void setKg(double kG)
      Specified by:
      setKg in class yams.motorcontrollers.SmartMotorController
    • setFeedforward

      public void setFeedforward(double kS, double kV, double kA, double kG)
      Specified by:
      setFeedforward in class yams.motorcontrollers.SmartMotorController
    • setStatorCurrentLimit

      public void setStatorCurrentLimit(Current currentLimit)
      Specified by:
      setStatorCurrentLimit in class yams.motorcontrollers.SmartMotorController
    • setSupplyCurrentLimit

      public void setSupplyCurrentLimit(Current currentLimit)
      Specified by:
      setSupplyCurrentLimit in class yams.motorcontrollers.SmartMotorController
    • setClosedLoopRampRate

      public void setClosedLoopRampRate(Time rampRate)
      Specified by:
      setClosedLoopRampRate in class yams.motorcontrollers.SmartMotorController
    • setOpenLoopRampRate

      @Deprecated public void setOpenLoopRampRate(Time rampRate)
      Deprecated.
      Specified by:
      setOpenLoopRampRate in class yams.motorcontrollers.SmartMotorController
    • setMeasurementUpperLimit

      public void setMeasurementUpperLimit(Distance upperLimit)
      Specified by:
      setMeasurementUpperLimit in class yams.motorcontrollers.SmartMotorController
    • setMeasurementLowerLimit

      public void setMeasurementLowerLimit(Distance lowerLimit)
      Specified by:
      setMeasurementLowerLimit in class yams.motorcontrollers.SmartMotorController
    • setMechanismUpperLimit

      public void setMechanismUpperLimit(Angle upperLimit)
      Specified by:
      setMechanismUpperLimit in class yams.motorcontrollers.SmartMotorController
    • setMechanismLowerLimit

      public void setMechanismLowerLimit(Angle lowerLimit)
      Specified by:
      setMechanismLowerLimit in class yams.motorcontrollers.SmartMotorController
    • setMechanismLimits

      public void setMechanismLimits(Angle lower, Angle upper)
      Specified by:
      setMechanismLimits in class yams.motorcontrollers.SmartMotorController
    • setMechanismLimitsEnabled

      public void setMechanismLimitsEnabled(boolean enabled)
      Specified by:
      setMechanismLimitsEnabled in class yams.motorcontrollers.SmartMotorController
    • setClosedLoopSlot

      public void setClosedLoopSlot(yams.motorcontrollers.SmartMotorController.ClosedLoopControllerSlot slot)
      Specified by:
      setClosedLoopSlot in class yams.motorcontrollers.SmartMotorController
    • getTemperature

      public Temperature getTemperature()
      Specified by:
      getTemperature in class yams.motorcontrollers.SmartMotorController
    • getConfig

      public yams.motorcontrollers.SmartMotorControllerConfig getConfig()
      Specified by:
      getConfig in class yams.motorcontrollers.SmartMotorController
    • getMotorController

      public Object getMotorController()
      Specified by:
      getMotorController in class yams.motorcontrollers.SmartMotorController
    • getMotorControllerConfig

      public Object getMotorControllerConfig()
      Specified by:
      getMotorControllerConfig in class yams.motorcontrollers.SmartMotorController
    • getUnsupportedTelemetryFields

      public Pair<Optional<List<yams.telemetry.SmartMotorControllerTelemetry.BooleanTelemetryField>>,Optional<List<yams.telemetry.SmartMotorControllerTelemetry.DoubleTelemetryField>>> getUnsupportedTelemetryFields()
      Specified by:
      getUnsupportedTelemetryFields in class yams.motorcontrollers.SmartMotorController
    • setMechanismGearing

      public void setMechanismGearing(yams.gearing.MechanismGearing gearing)
      Specified by:
      setMechanismGearing in class yams.motorcontrollers.SmartMotorController
    • setMechanismCircumference

      public void setMechanismCircumference(Distance circumference)
      Specified by:
      setMechanismCircumference in class yams.motorcontrollers.SmartMotorController