Thrifty Nova
  • Software Resources
    • Getting Started
    • Configure Controller Settings
      • Factory Default
      • Motor Type - Minion Setting
      • Inverting the Motor
      • Brake Mode
      • Maximum Output
      • Ramp Up/Ramp Down
      • Current Limiting
      • Soft Limits
      • Hard Limits
      • Setting Encoder Position
      • Follower Mode
    • Configure Onboard PID
    • Configure CAN Frequency
    • IO Signal Management
    • Set Output
    • Logging
    • Get Feedback
    • Unit Conversions
    • Subsystem Examples
      • Simple Elevator Example
      • Swerve Module Example
      • Simple Arm Example
  • Electrical Resources
    • Wiring the Thrifty Nova
    • LED Color Codes
    • Brushless Hall Sensor Connector
    • USB Communications
    • 10 Pin Data Connector
      • Intro to Sensors
      • Sensor Hat
      • Motor Runner Board
    • Hard Reset
  • Mechanical
    • Mounting Options
  • Software Releases
    • Software Releases
  • Thrifty Config
    • Thrifty Config Demo Video
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Software Resources

Configure Controller Settings

There are many options to configuring on the Thrifty Nova. These can be configured in the constructor using a variety of configuration setters. These setters can be chained together to make for a very clean configuration style. The following is an example of this configuration strategy.

motor = new ThriftyNova(7)   // create with CAN ID 7
  .setInverted(true)         // reverse the motor
  .setBrakeMode(true);       // set brake mode

Configuration Error Handling

After you are done setting your configurations you can check for any errors reported from the motor controllers. The motor controller will provide a list of errors encountered while configuring values. Errors are represented by a status enum. The following examples show how to access these error codes, check for certain error codes, and clear the error list.

In this example we get a list of all errors, then iterate through the errors and printing them out.

List<Error> errors = motor.getErrors();
for (Error err : errors) {
  System.out.println(err.toString());
}

You can also check if a given error is present. Here we are checking if configuring brake mode has failed.

if (motor.hasError(Errors.SET_BRake_MODE)) {
  System.out.println("Setting brake mode has failed!");
}

You can also clear this error list. It will repopulate if more errors are encountered

motor.clearErrors();
PreviousGetting StartedNextFactory Default

Last updated 6 months ago

Was this helpful?