mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -9,16 +9,16 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "mockdata/SimDeviceDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::hal;
|
||||
|
||||
namespace hal::init {
|
||||
namespace wpi::hal::init {
|
||||
void InitializeSimDevice() {}
|
||||
} // namespace hal::init
|
||||
} // namespace wpi::hal::init
|
||||
|
||||
extern "C" {
|
||||
|
||||
HAL_SimDeviceHandle HAL_CreateSimDevice(const char* name) {
|
||||
hal::init::CheckInit();
|
||||
wpi::hal::init::CheckInit();
|
||||
return SimSimDeviceData->CreateDevice(name);
|
||||
}
|
||||
|
||||
@@ -68,11 +68,11 @@ void HAL_ResetSimValue(HAL_SimValueHandle handle) {
|
||||
SimSimDeviceData->ResetValue(handle);
|
||||
}
|
||||
|
||||
hal::SimDevice::SimDevice(const char* name, int index) {
|
||||
wpi::hal::SimDevice::SimDevice(const char* name, int index) {
|
||||
m_handle = HAL_CreateSimDevice(fmt::format("{}[{}]", name, index).c_str());
|
||||
}
|
||||
|
||||
hal::SimDevice::SimDevice(const char* name, int index, int channel) {
|
||||
wpi::hal::SimDevice::SimDevice(const char* name, int index, int channel) {
|
||||
m_handle = HAL_CreateSimDevice(
|
||||
fmt::format("{}[{},{}]", name, index, channel).c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user