ZotBins Core
Loading...
Searching...
No Matches
Fullness::FullnessMetric Class Reference

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.
 

Detailed Description

Measures the fullness of the waste bin.

Constructor & Destructor Documentation

◆ FullnessMetric()

FullnessMetric::FullnessMetric ( uint32_t binHeight,
IDistance & distanceSensor )

Construct a new FullnessMetric object.

Parameters
binHeightHeight of bin in mm
distanceSensorInterface to distance sensor

Member Function Documentation

◆ getFullness()

float FullnessMetric::getFullness ( )

Returns the fullness percentage of the bin.

Returns
float Fullness % of the bin (0 <= fullness <= 1)

◆ isValidDistance()

bool FullnessMetric::isValidDistance ( uint32_t distance)

Checks if distance is valid.

Parameters
distanceDistance given from distance sensor
Returns
true/false if distance is valid

The documentation for this class was generated from the following files: