mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
The 2 high level classes were temporarily kept to keep the examples compiling. We will remove those when we have the interface into the built in IMU.
29 lines
965 B
C++
29 lines
965 B
C++
// Copyright (c) FIRST and other WPILib contributors.
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
#pragma once
|
|
|
|
#include "hal/simulation/AnalogInData.h"
|
|
#include "hal/simulation/SimDataValue.h"
|
|
|
|
namespace hal {
|
|
class AnalogInData {
|
|
HAL_SIMDATAVALUE_DEFINE_NAME(Initialized)
|
|
HAL_SIMDATAVALUE_DEFINE_NAME(AverageBits)
|
|
HAL_SIMDATAVALUE_DEFINE_NAME(OversampleBits)
|
|
HAL_SIMDATAVALUE_DEFINE_NAME(Voltage)
|
|
|
|
public:
|
|
SimDataValue<HAL_Bool, HAL_MakeBoolean, GetInitializedName> initialized{
|
|
false};
|
|
std::atomic<HAL_SimDeviceHandle> simDevice;
|
|
SimDataValue<int32_t, HAL_MakeInt, GetAverageBitsName> averageBits{7};
|
|
SimDataValue<int32_t, HAL_MakeInt, GetOversampleBitsName> oversampleBits{0};
|
|
SimDataValue<double, HAL_MakeDouble, GetVoltageName> voltage{0.0};
|
|
|
|
virtual void ResetData();
|
|
};
|
|
extern AnalogInData* SimAnalogInData;
|
|
} // namespace hal
|