ZotBins Core
|
Measures the fullness of the waste bin. More...
#include <FullnessMetric.hpp>
Public Member Functions | |
FullnessMetric (uint32_t binHeight, IDistance &distanceSensor) | |
Construct a new FullnessMetric object. | |
float | getFullness () |
Returns the fullness percentage of the bin. | |
bool | isValidDistance (uint32_t distance) |
Checks if distance is valid. | |
Measures the fullness of the waste bin.
FullnessMetric::FullnessMetric | ( | uint32_t | binHeight, |
IDistance & | distanceSensor ) |
Construct a new FullnessMetric object.
binHeight | Height of bin in mm |
distanceSensor | Interface to distance sensor |
float FullnessMetric::getFullness | ( | ) |
Returns the fullness percentage of the bin.
bool FullnessMetric::isValidDistance | ( | uint32_t | distance | ) |
Checks if distance is valid.
distance | Distance given from distance sensor |