mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -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 %}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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} {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user