mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Make C++ examples able to run GradleRIO unit tests (#1490)
Closes #1484
This commit is contained in:
committed by
Peter Johnson
parent
d84240d8e9
commit
6e8f8be370
@@ -27,4 +27,6 @@ class Robot : public frc::TimedRobot {
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -60,4 +60,6 @@ class Robot : public frc::TimedRobot {
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -37,4 +37,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::PowerDistributionPanel m_pdp;
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -80,4 +80,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Encoder m_encoder{1, 2, false, frc::Encoder::k4X};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -42,4 +42,6 @@ void Robot::TeleopPeriodic() { frc::Scheduler::GetInstance()->Run(); }
|
||||
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -55,4 +55,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Timer m_timer;
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -55,4 +55,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Joystick m_joystick{kJoystickPort};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -58,4 +58,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Joystick m_joystick{kJoystickPort};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -30,4 +30,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::XboxController m_hid{0};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -73,4 +73,6 @@ class Robot : public frc::TimedRobot {
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -48,4 +48,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Joystick m_stick{kJoystickChannel};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -26,4 +26,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Spark m_motor{0};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -48,4 +48,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Encoder m_encoder{0, 1};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -80,4 +80,6 @@ void Robot::Log() {
|
||||
drivetrain.GetRightEncoder().GetDistance());
|
||||
}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -73,4 +73,6 @@ class Robot : public frc::TimedRobot {
|
||||
|
||||
constexpr std::array<double, 3> Robot::kSetPoints;
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -27,4 +27,6 @@ class Robot : public frc::TimedRobot {
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -55,4 +55,6 @@ class Robot : public frc::TimedRobot {
|
||||
static constexpr int kRelayReverseButton = 2;
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -79,4 +79,6 @@ class Robot : public frc::TimedRobot {
|
||||
nt::NetworkTableEntry m_maxSpeed;
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -67,4 +67,6 @@ class Robot : public frc::TimedRobot {
|
||||
static constexpr int kDoubleSolenoidReverse = 3;
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -50,4 +50,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::DifferentialDrive m_robotDrive{m_left, m_right};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -80,4 +80,6 @@ class Robot : public frc::TimedRobot {
|
||||
frc::PIDController m_pidController{kP, kI, kD, m_ultrasonic, m_pidOutput};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user