Hey! I've been working on some code that seems a bit too elaborate for the SimpleRobot template, so I wanted to try out Iterative. I looked for a template, and didn't find one, so then I searched the forum here, and found that the "BuiltinDefaultCode" is essentially the template, with a lot of code I'd probably never use mixed in. I realized that I actually know very little about FRC programming (or at least feel like it). Could someone please help explain a the different methods in the BuiltinDefaultCode (and some of the other things they threw into the code for kicks)? I've removed most of the "actual code" that I'm pretty sure isn't necessary (but I still have questions about), and this is what I was left with (in case it helps).
Code:
#include "WPILib.h"
class BuiltinDefaultCode : public IterativeRobot{
UINT32 m_autoPeriodicLoops;
UINT32 m_disabledPeriodicLoops;
UINT32 m_telePeriodicLoops;
public:
BuiltinDefaultCode(void){
m_autoPeriodicLoops = 0;
m_disabledPeriodicLoops = 0;
m_telePeriodicLoops = 0;
}
////Init Routines///
void RobotInit(void) {
/* Actions which would be performed once (and only once)
*upon initialization of the robot would be put here */
}
void DisabledInit(void) {
m_disabledPeriodicLoops = 0; // Reset the loop counter for disabled mode
/**/
}
void AutonomousInit(void) {
m_autoPeriodicLoops = 0; // Reset the loop counter for autonomous mode
/**/
}
void TeleopInit(void) {
m_telePeriodicLoops = 0;
/**/
}
////Periodic Routines////
void DisabledPeriodic(void) {
/**/
}
void AutonomousPeriodic(void) {
/**/
}
void TeleopPeriodic(void) {
/**/
}
////Continuous Routines////
void DisabledContinuous(void) {
/**/
}
void AutonomousContinuous(void) {
/**/
}
void TeleopContinuous(void) {
/**/
}
};
START_ROBOT_CLASS(BuiltinDefaultCode);
Thanks!