Factory Default

Sometimes you might need to reset your Thrifty Nova motor controller back to its original settings. The factory reset feature lets you do this with just one line of code!

Basic Usage

motor.factoryReset();

That's it! This command will reset almost all settings back to their factory defaults.

What Gets Reset?

When you perform a factory reset, these settings will return to their default values:

  • Motor inversion (returns to false)

  • Brake mode (returns to false)

  • Maximum output (returns to 100%)

  • Ramp rates (returns to 0.1 seconds)

  • Current limits (returns to 40 amps)

  • PID values (returns to 0)

  • Soft limits

  • Temperature throttling

What Doesn't Get Reset?

Some settings will stay the same even after a factory reset:

  • CAN ID

  • Device name

  • Serial number

Example Code

Here's a complete example showing how you might use factory reset in your robot code:

javaCopypublic class MySubsystem extends Subsystem {
    private ThriftyNova motor;
    
    public MySubsystem() {
        // Create our motor with CAN ID 7
        motor = new ThriftyNova(7);
        
        // Reset to factory defaults
        motor.factoryReset();
        
        // Now set up the configuration we actually want
        setupMotor();
    }
    
    private void setupMotor() {
        motor.setInverted(true)
             .setBrakeMode(true)
             .setMaxOutput(0.8)  // Limit to 80% power
             .setRampUp(0.5);    // Take 0.5 seconds to reach full power
    }
}

When Should You Use Factory Reset?

Factory reset is useful when:

  1. You're setting up a new motor controller

  2. You want to start fresh with default settings

  3. You're troubleshooting motor issues

  4. You're not sure what settings might have been changed before

💡 Tip: It's a good practice to call factoryReset() during your robot's initialization if you want to ensure you're starting with known default values.

⚠️ Important: Remember that after doing a factory reset, you'll need to reconfigure any special settings your robot needs. Don't just reset and forget!

Last updated