libstp
Robotics library for Botball
Loading...
Searching...
No Matches
Analog.hpp
Go to the documentation of this file.
1#pragma once
2
4
6{
15 {
16#ifdef SAFETY_CHECKS_ENABLED
17 static inline detail::PortRegistry registry_{};
18 static void registerAnalogPort(int port);
19 static void unregisterAnalogPort(int port);
20#endif
21
22 public:
23 int port;
24
26 explicit AnalogSensor(int port);
27
28 virtual ~AnalogSensor();
29
31 virtual int read() const;
32 };
33}
virtual int read() const
Read the current raw analog value from the selected platform.
AnalogSensor(int port)
Create an analog sensor bound to a platform-defined port index.