HCSR04 Library
contrSpeed Class Reference

Speedometer controller. More...

#include <HCSR04.h>

Inheritance diagram for contrSpeed:
controller

Public Member Functions

 contrSpeed (speedometer &meter, display &screen)
 
int getResult (Unit unit)
 Function for fetching result. More...
 
void dispResult (Unit unit, int height)
 Function for displaying result directly on display. More...
 
void setDelay (int pdelay)
 Function for setting the delay between the two distance measurements inside getSpeed(). More...
 
- Public Member Functions inherited from controller
 controller (display &screen)
 Superclass constructor.
 

Additional Inherited Members

- Protected Attributes inherited from controller
displayscreen
 

Detailed Description

Speedometer controller.

Member Function Documentation

void contrSpeed::dispResult ( Unit  unit,
int  height 
)
inlinevirtual

Function for displaying result directly on display.

"Unit unit" represents the unit in which the measurements will be outputted.
"int height" represents the height of the text printed on the display, 0 is the middle of the display.
Available units:
"Unit::Ms" for meter per second.
"Unit::Kmh" for kilometers per hour.
"Unit::Mh" for miles per hour.
"Unit::Cms: for centimeters per hour.

Implements controller.

int contrSpeed::getResult ( Unit  unit)
inlinevirtual

Function for fetching result.

"Unit unit" represents the unit in which the measurements will be outputted.
Available units:
"Unit::Ms" for meter per second.
"Unit::Kmh" for kilometers per hour.
"Unit::Mh" for miles per hour.
"Unit::Cms: for centimeters per hour.

Implements controller.

void contrSpeed::setDelay ( int  pdelay)
inline

Function for setting the delay between the two distance measurements inside getSpeed().

Delay is in milliseconds.


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