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
  • Network Tables Logging
  • Global Status Updates
  • Individual Status Updates

Was this helpful?

Export as PDF
  1. Software Resources

Logging

Network Tables Logging

ThriftyNova controllers automatically support integration with NetworkTables, making it easy to view motor data in real-time using tools like Shuffleboard or Glass.

 * Enables or disables NetworkTables logging for this motor controller.
 * 
 * <p>When enabled, motor data will be automatically published to NetworkTables
 * for viewing in Shuffleboard or other dashboard applications.</p>
 * 
 * @param enabled True to enable logging, false to disable.
 */
public void setNTLogging(boolean enabled) { ... }

Example Usage:

// Enable logging for a specific motor
motor.setNTLogging(true);

// Disable logging to reduce network traffic during competition
motor.setNTLogging(false);

Default Logged Values

When NetworkTables logging is enabled, the following values are automatically published:

// Values published to NetworkTables when setNTLogging(true) is called
// and updateStatusNT() is called either manually or through periodic updates

"position"         // Current position from the selected encoder
"velocity"         // Current velocity from the selected encoder
"voltage"          // Output voltage
"stator_current"   // Stator current in amps
"supply_current"   // Supply current in amps
"temperature"      // Controller temperature in °C
"io"               // IO state as integer (can be decoded with getIOState())
"closed_loop_error" // Error between setpoint and actual position/velocity

Global Status Updates

The ThriftyNova API provides a static method to update all motor controllers' NetworkTables values at once:

/**
 * Updates the network tables for all ThriftyNova motors.
 * This is a convenient way to update all motors at the same time,
 * typically called from robotPeriodic().
 */
public static void updateStatusNTGlobal() { ... }

Example Usage in Robot Code:

@Override
public void robotPeriodic() {
    // Update all ThriftyNova motors' telemetry data
    ThriftyNova.updateStatusNTGlobal();
    
    // Other periodic robot code
    CommandScheduler.getInstance().run();
}

Individual Status Updates

You can also update NetworkTables values for individual motor controllers:

/**
 * Updates NetworkTables entries for this motor controller.
 * This calls all status getters and publishes their values to NetworkTables.
 */
public void updateStatusNT() { ... }

Example Usage:

// In a subsystem's periodic method
@Override
public void periodic() {
    // Update just this motor's telemetry
    shooterMotor.updateStatusNT();
    
    // Other subsystem code
}
PreviousSet OutputNextGet Feedback

Last updated 2 months ago

Was this helpful?