sysid-projects/drive/src/main/cpp/Robot.cpp
/**
 * This function is called every robot packet, no matter the mode. Use
 * this for items like diagnostics that you want ran during disabled,
 * autonomous, teleoperated and test.
 *
 * <p> This runs after the mode specific periodic functions, but before
 * LiveWindow and SmartDashboard integrated updating.
 */
This function is called every robot packet, no matter the mode. Use
this for items like diagnostics that you want ran during disabled,
autonomous, teleoperated and test.

 This runs after the mode specific periodic functions, but before
LiveWindow and SmartDashboard integrated updating.
This function is called every robot packet no matter the mode . Use this for items like diagnostics that you want ran during disabled autonomous teleoperated and test . This runs after the mode specific periodic functions but before LiveWindow and SmartDashboard integrated updating .
void Robot::RobotPeriodic() {
  try {
    frc::SmartDashboard::PutNumber("Left Position", m_leftPosition());
    frc::SmartDashboard::PutNumber("Right Position", m_rightPosition());
    frc::SmartDashboard::PutNumber("Left Velocity", m_leftRate());
    frc::SmartDashboard::PutNumber("Right Velocity", m_rightRate());
    frc::SmartDashboard::PutNumber("Gyro Reading", m_gyroPosition());
    frc::SmartDashboard::PutNumber("Gyro Rate", m_gyroRate());
  } catch (std::exception& e) {
    fmt::print("Project failed: {}\n", e.what());
    std::exit(-1);
  }
}
void Robot :: RobotPeriodic ( ) { try { frc :: SmartDashboard :: PutNumber ( " " , m_leftPosition ( ) ) ; frc :: SmartDashboard :: PutNumber ( " " , m_rightPosition ( ) ) ; frc :: SmartDashboard :: PutNumber ( " " , m_leftRate ( ) ) ; frc :: SmartDashboard :: PutNumber ( " " , m_rightRate ( ) ) ; frc :: SmartDashboard :: PutNumber ( " " , m_gyroPosition ( ) ) ; frc :: SmartDashboard :: PutNumber ( " " , m_gyroRate ( ) ) ; } catch ( std :: exception & e ) { fmt :: print ( " \n " , e . what ( ) ) ; std :: exit ( -1 ) ; } }
This function is called every robot packet, no matter the mode.
This function is called every robot packet no matter the mode .