Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
analog_distance_sensor.hpp
Go to the documentation of this file.
1/*****************************************************************************/
2/********** !!! WARNING: CODE GENERATED BY TAPROOT. DO NOT EDIT !!! **********/
3/*****************************************************************************/
4
5/*
6 * Copyright (c) 2020-2021 Advanced Robotics at the University of Washington <robomstr@uw.edu>
7 *
8 * This file is part of Taproot.
9 *
10 * Taproot is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * Taproot is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Taproot. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#ifndef TAPROOT_ANALOG_DISTANCE_SENSOR_HPP_
25#define TAPROOT_ANALOG_DISTANCE_SENSOR_HPP_
26
28
29#include "distance_sensor.hpp"
30
31namespace tap
32{
33class Drivers;
34namespace sensors
35{
49{
50public:
67 Drivers *drivers,
68 float minDistance,
69 float maxDistance,
70 float m,
71 float b,
72 float offset,
74
81 float read() override;
82
89 bool validReading() const override;
90
91private:
93
94 float m;
95 float b;
96
97 float offset;
98
100};
101
102} // namespace sensors
103
104} // namespace tap
105
106#endif // TAPROOT_ANALOG_DISTANCE_SENSOR_HPP_
Definition drivers.hpp:70
Pin
Definition analog.hpp:52
Definition analog_distance_sensor.hpp:49
bool validReading() const override
Definition analog_distance_sensor.cpp:63
float read() override
Definition analog_distance_sensor.cpp:49
Definition distance_sensor.hpp:32
float maxDistance
Upper boundary for reliable readings.
Definition distance_sensor.hpp:76
float minDistance
Lower boundary for reliable readings.
Definition distance_sensor.hpp:74
Definition ballistics.cpp:29
tap::Drivers Drivers
Definition drivers.hpp:11
fang::Drivers & drivers
Definition robot_singleton.cpp:45