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

@@ -13,7 +13,7 @@
#include "wpi/event/BooleanEvent.hpp"
using namespace frc;
using namespace wpi;
{{ ConsoleName }}Controller::{{ ConsoleName }}Controller(int port) : GenericHID(port) {
HAL_ReportUsage("HID", port, "{{ ConsoleName }}Controller");
@@ -92,7 +92,7 @@ bool {{ ConsoleName }}Controller::GetTouchpadReleased() {
}
{%- endif %}
void {{ ConsoleName }}Controller::InitSendable(wpi::SendableBuilder& builder) {
void {{ ConsoleName }}Controller::InitSendable(wpi::util::SendableBuilder& builder) {
builder.SetSmartDashboardType("HID");
builder.PublishConstString("ControllerType", "{{ ConsoleName }}");
{%- for trigger in triggers %}

View File

@@ -8,7 +8,7 @@
#include "wpi/hal/UsageReporting.h"
using namespace frc;
using namespace wpi;
{{ name }}::{{ name }}(int channel) : PWMMotorController("{{ name }}", channel) {
SetBounds({{ pulse_width_ms.max }}_ms, {{ pulse_width_ms.deadbandMax }}_ms, {{ pulse_width_ms.center }}_ms, {{ pulse_width_ms.deadbandMin }}_ms, {{ pulse_width_ms.min }}_ms);

View File

@@ -10,8 +10,8 @@
#include "wpi/driverstation/{{ ConsoleName }}Controller.hpp"
using namespace frc;
using namespace frc::sim;
using namespace wpi;
using namespace wpi::sim;
{{ ConsoleName }}ControllerSim::{{ ConsoleName }}ControllerSim(const {{ ConsoleName }}Controller& joystick)
: GenericHIDSim{joystick} {

View File

@@ -13,7 +13,7 @@
#include "wpi/driverstation/GenericHID.hpp"
namespace frc {
namespace wpi {
/**
* Handle input from {{ ConsoleName }} controllers connected to the Driver Station.
@@ -28,8 +28,8 @@ namespace frc {
* to have the same mapping, as well as any 3rd party controllers.
*/
class {{ ConsoleName }}Controller : public GenericHID,
public wpi::Sendable,
public wpi::SendableHelper<{{ ConsoleName }}Controller> {
public wpi::util::Sendable,
public wpi::util::SendableHelper<{{ ConsoleName }}Controller> {
public:
/**
* Construct an instance of a controller.
@@ -236,7 +236,7 @@ class {{ ConsoleName }}Controller : public GenericHID,
{%- endfor %}
};
void InitSendable(wpi::SendableBuilder& builder) override;
void InitSendable(wpi::util::SendableBuilder& builder) override;
};
} // namespace frc
} // namespace wpi

View File

@@ -8,7 +8,7 @@
#include "wpi/hardware/motor/PWMMotorController.hpp"
namespace frc {
namespace wpi {
/**
* {{ Manufacturer }} {{ DisplayName }} Motor Controller with PWM control.
@@ -40,4 +40,4 @@ class {{ name }} : public PWMMotorController {
{{ name }}& operator=({{ name }}&&) = default;
};
} // namespace frc
} // namespace wpi

View File

@@ -10,7 +10,7 @@
#include "wpi/simulation/GenericHIDSim.hpp"
namespace frc {
namespace wpi {
class {{ ConsoleName }}Controller;
@@ -95,4 +95,4 @@ class {{ ConsoleName }}ControllerSim : public GenericHIDSim {
};
} // namespace sim
} // namespace frc
} // namespace wpi