HCSR04 Library
display Class Reference

Class for displaying certain data on a display. More...

#include <HCSR04.h>

Public Member Functions

 display (hwlib::window &w)
 
void dispPerc (int perc, int width)
 Function which display a percentage in the form of a percentage bar in horizontal direction. More...
 
void dispNumber (int number, int height)
 This function displays an integer on the display. More...
 
void dispNumberUnit (int number, char unit[], int height)
 This function displays a number and a unit.

. More...
 

Detailed Description

Class for displaying certain data on a display.

Member Function Documentation

void display::dispNumber ( int  number,
int  height 
)
inline

This function displays an integer on the display.

The parameter "int number" is the number that will be display, it can be a maximum of 3 characters.

The parameter "int height" specifies how high on the display the text will be displayed. 0 is the middle of the display.

void display::dispNumberUnit ( int  number,
char  unit[],
int  height 
)
inline

This function displays a number and a unit.

.

"int number" is the number being displayed.
"char unit[]" is the a string of the unit being displayed after the number.
"char unit[]" can only consist of characters available in the bitmap arrays in disparray::bitmaps.
Be aware that in correct C++ you need to cast the string, using (char*) in front of the string like: (char*)"m/s"
"int height" is the height of the printed text, from the middle of the display.

void display::dispPerc ( int  perc,
int  width 
)
inline

Function which display a percentage in the form of a percentage bar in horizontal direction.

"int perc" is the percentage you want to display, from 0 to 100.
"int width" is the percentage of the width, so if you put in 100 the width of the percentage bar will be 100% the width of the display.


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