mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -11,8 +11,8 @@
|
||||
#include "wpi/hal/simulation/DriverStationData.h"
|
||||
#include "wpi/hal/simulation/MockHooks.h"
|
||||
|
||||
using namespace frc;
|
||||
using namespace frc::sim;
|
||||
using namespace wpi;
|
||||
using namespace wpi::sim;
|
||||
|
||||
std::unique_ptr<CallbackStore> DriverStationSim::RegisterEnabledCallback(
|
||||
NotifyCallback callback, bool initialNotify) {
|
||||
@@ -153,12 +153,12 @@ void DriverStationSim::SetMatchTime(double matchTime) {
|
||||
}
|
||||
|
||||
void DriverStationSim::NotifyNewData() {
|
||||
wpi::Event waitEvent{true};
|
||||
wpi::util::Event waitEvent{true};
|
||||
HAL_ProvideNewDataEventHandle(waitEvent.GetHandle());
|
||||
HALSIM_NotifyDriverStationNewData();
|
||||
wpi::WaitForObject(waitEvent.GetHandle());
|
||||
wpi::util::WaitForObject(waitEvent.GetHandle());
|
||||
HAL_RemoveNewDataEventHandle(waitEvent.GetHandle());
|
||||
frc::DriverStation::RefreshData();
|
||||
wpi::DriverStation::RefreshData();
|
||||
}
|
||||
|
||||
void DriverStationSim::SetSendError(bool shouldSend) {
|
||||
@@ -266,17 +266,17 @@ void DriverStationSim::SetJoystickType(int stick, int type) {
|
||||
}
|
||||
|
||||
void DriverStationSim::SetJoystickName(int stick, std::string_view name) {
|
||||
auto str = wpi::make_string(name);
|
||||
auto str = wpi::util::make_string(name);
|
||||
HALSIM_SetJoystickName(stick, &str);
|
||||
}
|
||||
|
||||
void DriverStationSim::SetGameSpecificMessage(std::string_view message) {
|
||||
auto str = wpi::make_string(message);
|
||||
auto str = wpi::util::make_string(message);
|
||||
HALSIM_SetGameSpecificMessage(&str);
|
||||
}
|
||||
|
||||
void DriverStationSim::SetEventName(std::string_view name) {
|
||||
auto str = wpi::make_string(name);
|
||||
auto str = wpi::util::make_string(name);
|
||||
HALSIM_SetEventName(&str);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user