SCRIPT namespace replacements

This commit is contained in:
PJ Reiniger
2025-11-07 20:00:05 -05:00
committed by Peter Johnson
parent ae6c043632
commit 9aca8e0fd6
2622 changed files with 22275 additions and 22275 deletions

View File

@@ -10,7 +10,7 @@
#include <wpi/hardware/led/LEDPattern.hpp>
#include <wpi/opmode/TimedRobot.hpp>
class Robot : public frc::TimedRobot {
class Robot : public wpi::TimedRobot {
public:
Robot();
void RobotPeriodic() override;
@@ -19,19 +19,19 @@ class Robot : public frc::TimedRobot {
static constexpr int kLength = 60;
// SmartIO port 1
frc::AddressableLED m_led{1};
std::array<frc::AddressableLED::LEDData, kLength>
wpi::AddressableLED m_led{1};
std::array<wpi::AddressableLED::LEDData, kLength>
m_ledBuffer; // Reuse the buffer
// Our LED strip has a density of 120 LEDs per meter
units::meter_t kLedSpacing{1 / 120.0};
wpi::units::meter_t kLedSpacing{1 / 120.0};
// Create an LED pattern that will display a rainbow across
// all hues at maximum saturation and half brightness
frc::LEDPattern m_rainbow = frc::LEDPattern::Rainbow(255, 128);
wpi::LEDPattern m_rainbow = wpi::LEDPattern::Rainbow(255, 128);
// Create a new pattern that scrolls the rainbow pattern across the LED
// strip, moving at a speed of 1 meter per second.
frc::LEDPattern m_scrollingRainbow =
wpi::LEDPattern m_scrollingRainbow =
m_rainbow.ScrollAtAbsoluteSpeed(1_mps, kLedSpacing);
};