mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
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:
committed by
Peter Johnson
parent
64b03704f8
commit
c89678971c
@@ -27,4 +27,4 @@ class Robot : public frc::IterativeRobot {
|
||||
}
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -60,4 +60,4 @@ class Robot : public frc::IterativeRobot {
|
||||
}
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -37,4 +37,4 @@ class Robot : public frc::IterativeRobot {
|
||||
frc::PowerDistributionPanel m_pdp;
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -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>(); }
|
||||
|
||||
@@ -42,4 +42,4 @@ void Robot::TeleopPeriodic() { frc::Scheduler::GetInstance()->Run(); }
|
||||
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -55,4 +55,4 @@ class Robot : public frc::IterativeRobot {
|
||||
frc::Timer m_timer;
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -55,4 +55,4 @@ class Robot : public frc::IterativeRobot {
|
||||
frc::Joystick m_joystick{kJoystickPort};
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -58,4 +58,4 @@ class Robot : public frc::IterativeRobot {
|
||||
frc::Joystick m_joystick{kJoystickPort};
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -72,4 +72,4 @@ class Robot : public frc::IterativeRobot {
|
||||
}
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -48,4 +48,4 @@ class Robot : public frc::IterativeRobot {
|
||||
frc::Joystick m_stick{kJoystickChannel};
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -26,4 +26,4 @@ class Robot : public frc::IterativeRobot {
|
||||
frc::Spark m_motor{0};
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -80,4 +80,4 @@ void Robot::Log() {
|
||||
drivetrain.GetRightEncoder().GetDistance());
|
||||
}
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -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>(); }
|
||||
|
||||
@@ -27,4 +27,4 @@ class Robot : public frc::IterativeRobot {
|
||||
}
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -55,4 +55,4 @@ class Robot : public frc::IterativeRobot {
|
||||
static constexpr int kRelayReverseButton = 2;
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -67,4 +67,4 @@ class Robot : public frc::IterativeRobot {
|
||||
static constexpr int kDoubleSolenoidReverse = 3;
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -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>(); }
|
||||
|
||||
@@ -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>(); }
|
||||
|
||||
@@ -72,4 +72,4 @@ void Robot::TeleopPeriodic() { frc::Scheduler::GetInstance()->Run(); }
|
||||
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -55,4 +55,4 @@ void Robot::TeleopPeriodic() {}
|
||||
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -87,4 +87,4 @@ void Robot::OperatorControl() {
|
||||
*/
|
||||
void Robot::Test() {}
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
@@ -55,4 +55,4 @@ void Robot::TeleopPeriodic() {}
|
||||
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
START_ROBOT_CLASS(Robot)
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
|
||||
Reference in New Issue
Block a user