mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[hal] Rename SimDevice constants to all caps
Also use enum class for SimDevice C++ wrapper.
This commit is contained in:
@@ -31,14 +31,14 @@ public class RomiGyro {
|
||||
public RomiGyro() {
|
||||
m_simDevice = SimDevice.create("Gyro:RomiGyro");
|
||||
if (m_simDevice != null) {
|
||||
m_simDevice.createBoolean("init", Direction.kOutput, true);
|
||||
m_simRateX = m_simDevice.createDouble("rate_x", Direction.kInput, 0.0);
|
||||
m_simRateY = m_simDevice.createDouble("rate_y", Direction.kInput, 0.0);
|
||||
m_simRateZ = m_simDevice.createDouble("rate_z", Direction.kInput, 0.0);
|
||||
m_simDevice.createBoolean("init", Direction.OUTPUT, true);
|
||||
m_simRateX = m_simDevice.createDouble("rate_x", Direction.INPUT, 0.0);
|
||||
m_simRateY = m_simDevice.createDouble("rate_y", Direction.INPUT, 0.0);
|
||||
m_simRateZ = m_simDevice.createDouble("rate_z", Direction.INPUT, 0.0);
|
||||
|
||||
m_simAngleX = m_simDevice.createDouble("angle_x", Direction.kInput, 0.0);
|
||||
m_simAngleY = m_simDevice.createDouble("angle_y", Direction.kInput, 0.0);
|
||||
m_simAngleZ = m_simDevice.createDouble("angle_z", Direction.kInput, 0.0);
|
||||
m_simAngleX = m_simDevice.createDouble("angle_x", Direction.INPUT, 0.0);
|
||||
m_simAngleY = m_simDevice.createDouble("angle_y", Direction.INPUT, 0.0);
|
||||
m_simAngleZ = m_simDevice.createDouble("angle_z", Direction.INPUT, 0.0);
|
||||
} else {
|
||||
m_simRateX = null;
|
||||
m_simRateY = null;
|
||||
|
||||
@@ -8,19 +8,19 @@ using namespace wpi::romi;
|
||||
|
||||
RomiGyro::RomiGyro() : m_simDevice("Gyro:RomiGyro") {
|
||||
if (m_simDevice) {
|
||||
m_simDevice.CreateBoolean("init", hal::SimDevice::kOutput, true);
|
||||
m_simRateX =
|
||||
m_simDevice.CreateDouble("rate_x", hal::SimDevice::kInput, 0.0);
|
||||
m_simRateY =
|
||||
m_simDevice.CreateDouble("rate_y", hal::SimDevice::kInput, 0.0);
|
||||
m_simRateZ =
|
||||
m_simDevice.CreateDouble("rate_z", hal::SimDevice::kInput, 0.0);
|
||||
m_simAngleX =
|
||||
m_simDevice.CreateDouble("angle_x", hal::SimDevice::kInput, 0.0);
|
||||
m_simAngleY =
|
||||
m_simDevice.CreateDouble("angle_y", hal::SimDevice::kInput, 0.0);
|
||||
m_simAngleZ =
|
||||
m_simDevice.CreateDouble("angle_z", hal::SimDevice::kInput, 0.0);
|
||||
m_simDevice.CreateBoolean("init", hal::SimDevice::Direction::OUTPUT, true);
|
||||
m_simRateX = m_simDevice.CreateDouble(
|
||||
"rate_x", hal::SimDevice::Direction::INPUT, 0.0);
|
||||
m_simRateY = m_simDevice.CreateDouble(
|
||||
"rate_y", hal::SimDevice::Direction::INPUT, 0.0);
|
||||
m_simRateZ = m_simDevice.CreateDouble(
|
||||
"rate_z", hal::SimDevice::Direction::INPUT, 0.0);
|
||||
m_simAngleX = m_simDevice.CreateDouble(
|
||||
"angle_x", hal::SimDevice::Direction::INPUT, 0.0);
|
||||
m_simAngleY = m_simDevice.CreateDouble(
|
||||
"angle_y", hal::SimDevice::Direction::INPUT, 0.0);
|
||||
m_simAngleZ = m_simDevice.CreateDouble(
|
||||
"angle_z", hal::SimDevice::Direction::INPUT, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user