11#include <wpi/hal/SimDevice.hpp>
17#if defined(_WIN32) || defined(_WIN64)
19#pragma warning(disable : 4250)
37 wpi::hal::SimDevice m_simCANrange;
38 wpi::hal::SimDouble m_simSupplyVoltage;
39 wpi::hal::SimDouble m_simDistance;
40 wpi::hal::SimBoolean m_simIsDetected;
42 int32_t m_simPeriodicUid{-1};
43 std::vector<int32_t> m_simValueChangedUids;
45 static void OnValueChanged(
46 const char *name,
void *param, HAL_SimValueHandle handle,
47 HAL_Bool readonly,
const struct HAL_Value *value
49 static void OnPeriodic(
void *param);
75#if defined(_WIN32) || defined(_WIN64)
Class for getting information about an available CAN bus.
Definition CANBus.hpp:19
Represents a status signal with data of type T, and operations available to retrieve information abou...
Definition StatusSignal.hpp:563
CANrange(int deviceId, CANBus canbus)
Constructs a new CANrange object.
static CANrange None()
Constructs a stubbed-out CANrange, where all status signals, controls, configs, etc.
Definition CANrange.hpp:69
Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front o...
Definition CoreCANrange.hpp:734
StatusSignal< wpi::units::meter_t > & GetDistance(bool refresh=true)
Distance to the nearest object in the configured field of view of the CANrange.
StatusSignal< bool > & GetIsDetected(bool refresh=true)
Whether the CANrange detects an object using the configured proximity parameters.
Definition ExternalFeedbackConfigs.hpp:17
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14