30 volatile bool beginned;
35 volatile uint16_t prev_dist_mm;
85 virtual bool begin ();
Supported_sensor()
Creates an object of a supported sensor.
Definition Supported_sensor.h:23
virtual uint16_t read_dist_mm()
Reads the distance between this ultrasonic sensor and the obstacle in front of it.
Definition Uts_general.cpp:28
uint16_t get_prev_dist_mm()
Gets the previous measured distance.
Definition Uts_general.h:69
bool is_beginned()
Checks if this ultrasonic sensor is already activated.
Definition Uts_general.h:55
Uts_general()
Constructor for a generic ultrasonic sensor driver.
Definition Uts_general.cpp:8
static const uint16_t ERROR_DIST_MM
The distance representing a measurement error (in millimeters).
Definition Uts_general.h:41
virtual bool begin()
Activates this ultrasonic sensor.
Definition Uts_general.cpp:19
virtual void set_beginned(bool is_beginned)
Sets whether this ultrasonic sensor is activated.
Definition Uts_general.cpp:15
uint16_t read_dist_cm()
Reads the distance between this ultrasonic sensor and the obstacle in front of it.
Definition Uts_general.h:107
void store_prev_dist_mm(uint16_t dist_mm)
Stores the previous measured distance.
Definition Uts_general.h:62
virtual void end()
Deactivates this ultrasonic sensor.
Definition Uts_general.cpp:24