Replaced the START_ROBOT_CLASS() macro with a template function (#1050)

The START_ROBOT_CLASS() macro's main() now calls this function through a
deprecated proxy function to encourage users to switch.
This commit is contained in:
Tyler Veness
2018-05-16 19:54:39 -07:00
committed by Peter Johnson
parent 64b03704f8
commit c89678971c
24 changed files with 43 additions and 34 deletions

View File

@@ -27,4 +27,4 @@ class Robot : public frc::IterativeRobot {
}
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -60,4 +60,4 @@ class Robot : public frc::IterativeRobot {
}
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -37,4 +37,4 @@ class Robot : public frc::IterativeRobot {
frc::PowerDistributionPanel m_pdp;
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -80,4 +80,4 @@ class Robot : public frc::IterativeRobot {
frc::Encoder m_encoder{1, 2, false, Encoder::k4X};
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -42,4 +42,4 @@ void Robot::TeleopPeriodic() { frc::Scheduler::GetInstance()->Run(); }
void Robot::TestPeriodic() {}
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -55,4 +55,4 @@ class Robot : public frc::IterativeRobot {
frc::Timer m_timer;
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -55,4 +55,4 @@ class Robot : public frc::IterativeRobot {
frc::Joystick m_joystick{kJoystickPort};
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -58,4 +58,4 @@ class Robot : public frc::IterativeRobot {
frc::Joystick m_joystick{kJoystickPort};
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -72,4 +72,4 @@ class Robot : public frc::IterativeRobot {
}
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -48,4 +48,4 @@ class Robot : public frc::IterativeRobot {
frc::Joystick m_stick{kJoystickChannel};
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -26,4 +26,4 @@ class Robot : public frc::IterativeRobot {
frc::Spark m_motor{0};
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -80,4 +80,4 @@ void Robot::Log() {
drivetrain.GetRightEncoder().GetDistance());
}
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -73,4 +73,4 @@ class Robot : public frc::IterativeRobot {
constexpr std::array<double, 3> Robot::kSetPoints;
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -27,4 +27,4 @@ class Robot : public frc::IterativeRobot {
}
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -55,4 +55,4 @@ class Robot : public frc::IterativeRobot {
static constexpr int kRelayReverseButton = 2;
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -67,4 +67,4 @@ class Robot : public frc::IterativeRobot {
static constexpr int kDoubleSolenoidReverse = 3;
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -50,4 +50,4 @@ class Robot : public frc::IterativeRobot {
frc::DifferentialDrive m_robotDrive{m_left, m_right};
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -80,4 +80,4 @@ class Robot : public frc::IterativeRobot {
frc::PIDController m_pidController{kP, kI, kD, m_ultrasonic, m_pidOutput};
};
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -72,4 +72,4 @@ void Robot::TeleopPeriodic() { frc::Scheduler::GetInstance()->Run(); }
void Robot::TestPeriodic() {}
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -55,4 +55,4 @@ void Robot::TeleopPeriodic() {}
void Robot::TestPeriodic() {}
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -87,4 +87,4 @@ void Robot::OperatorControl() {
*/
void Robot::Test() {}
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }

View File

@@ -55,4 +55,4 @@ void Robot::TeleopPeriodic() {}
void Robot::TestPeriodic() {}
START_ROBOT_CLASS(Robot)
int main() { return frc::StartRobot<Robot>(); }