WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
XRPReflectanceSensor.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <frc/AnalogInput.h>
8
9namespace frc {
10
11/**
12 * @ingroup xrp_api
13 * @{
14 */
15
16/** This class represents the reflectance sensor pair on an XRP robot. */
18 public:
19 /**
20 * Returns the reflectance value of the left sensor.
21 *
22 * @return value between 0.0 (white) and 1.0 (black).
23 */
25
26 /**
27 * Returns the reflectance value of the right sensor.
28 *
29 * @return value between 0.0 (white) and 1.0 (black).
30 */
32
33 private:
34 frc::AnalogInput m_leftSensor{0};
35 frc::AnalogInput m_rightSensor{1};
36};
37
38/** @} */
39
40} // namespace frc
Analog input class.
Definition AnalogInput.h:32
This class represents the reflectance sensor pair on an XRP robot.
Definition XRPReflectanceSensor.h:17
double GetLeftReflectanceValue() const
Returns the reflectance value of the left sensor.
double GetRightReflectanceValue() const
Returns the reflectance value of the right sensor.
Definition CAN.h:11