mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -10,7 +10,7 @@
|
||||
Robot::Robot() {
|
||||
m_chooser.SetDefaultOption(kAutoNameDefault, kAutoNameDefault);
|
||||
m_chooser.AddOption(kAutoNameCustom, kAutoNameCustom);
|
||||
frc::SmartDashboard::PutData("Auto Modes", &m_chooser);
|
||||
wpi::SmartDashboard::PutData("Auto Modes", &m_chooser);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
|
||||
m_autoSelected = m_chooser.GetSelected();
|
||||
// m_autoSelected = SmartDashboard::GetString("Auto Selector",
|
||||
// kAutoNameDefault);
|
||||
wpi::print("Auto selected: {}\n", m_autoSelected);
|
||||
wpi::util::print("Auto selected: {}\n", m_autoSelected);
|
||||
|
||||
if (m_autoSelected == kAutoNameCustom) {
|
||||
// Custom Auto goes here
|
||||
@@ -73,6 +73,6 @@ void Robot::SimulationPeriodic() {}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() {
|
||||
return frc::StartRobot<Robot>();
|
||||
return wpi::StartRobot<Robot>();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <wpi/opmode/TimedRobot.hpp>
|
||||
#include <wpi/smartdashboard/SendableChooser.hpp>
|
||||
|
||||
class Robot : public frc::TimedRobot {
|
||||
class Robot : public wpi::TimedRobot {
|
||||
public:
|
||||
Robot();
|
||||
void RobotPeriodic() override;
|
||||
@@ -25,7 +25,7 @@ class Robot : public frc::TimedRobot {
|
||||
void SimulationPeriodic() override;
|
||||
|
||||
private:
|
||||
frc::SendableChooser<std::string> m_chooser;
|
||||
wpi::SendableChooser<std::string> m_chooser;
|
||||
const std::string kAutoNameDefault = "Default";
|
||||
const std::string kAutoNameCustom = "My Auto";
|
||||
std::string m_autoSelected;
|
||||
|
||||
Reference in New Issue
Block a user