Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
analog_current_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_CURRENT_SENSOR_HPP_
25#define TAPROOT_ANALOG_CURRENT_SENSOR_HPP_
26
28
30
32{
39{
40public:
66
68
69 float getCurrentMa() const override;
70
71 void update() override;
72
73private:
74 const Config config;
75
76 float prevCurrent = 0.0f;
77};
78
79} // namespace tap::communication::sensors::current
80
81#endif // TAPROOT_ANALOG_CURRENT_SENSOR_HPP_
Definition analog_current_sensor.hpp:39
float getCurrentMa() const override
Definition analog_current_sensor.cpp:34
void update() override
Definition analog_current_sensor.cpp:36
Definition current_sensor_interface.hpp:35
Definition analog.hpp:44
Pin
Definition analog.hpp:52
Definition pwm_info.hpp:4
Definition analog_current_sensor.cpp:31
const float currentSensorMaPerMv
Definition analog_current_sensor.hpp:55
const float currentSensorZeroMv
Definition analog_current_sensor.hpp:60
const tap::gpio::Analog::Pin analogSensorPin
Definition analog_current_sensor.hpp:47
const tap::gpio::Analog * analogDriver
Definition analog_current_sensor.hpp:46
const float currentSensorLowPassAlpha
Definition analog_current_sensor.hpp:64