Skip to content

Commit f30fdc9

Browse files
author
brentru
committed
doxy mapblock
1 parent 85a2bbf commit f30fdc9

2 files changed

Lines changed: 58 additions & 6 deletions

File tree

src/blocks/MapBlock.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
*/
1515
#include "MapBlock.h"
1616

17+
/**************************************************************************/
18+
/*!
19+
@brief Creates a new map Block on an Adafruit IO Dashboard.
20+
@param d
21+
Adafruit IO Dashboard name.
22+
@param f
23+
Adafruit IO Feed to display on the map.
24+
*/
25+
/**************************************************************************/
1726
MapBlock::MapBlock(AdafruitIO_Dashboard *d, AdafruitIO_Feed *f)
1827
: AdafruitIO_Block(d, f) {
1928
historyHours = 0;
@@ -22,6 +31,13 @@ MapBlock::MapBlock(AdafruitIO_Dashboard *d, AdafruitIO_Feed *f)
2231

2332
MapBlock::~MapBlock() {}
2433

34+
35+
/**************************************************************************/
36+
/*!
37+
@brief Sets map block properties.
38+
@return String containing properties of the map block.
39+
*/
40+
/**************************************************************************/
2541
String MapBlock::properties() {
2642

2743
if ((strcmp(tile, "contrast") != 0) && (strcmp(tile, "street") != 0) &&

src/blocks/MapBlock.h

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,58 @@ class MapBlock : public AdafruitIO_Block {
2323
MapBlock(AdafruitIO_Dashboard *d, AdafruitIO_Feed *f);
2424
~MapBlock();
2525

26-
String props;
27-
int historyHours;
28-
const char *tile;
26+
String props; /*!< Map block properties. */
27+
int historyHours; /*!< Time displayed by map block in hours. */
28+
const char *tile; /*!< Map block title. */
2929

30-
int width = 4;
31-
int height = 4;
30+
int width = 4; /*!< Dashboard block width. */
31+
int height = 4; /*!< Dashboard block height. */
3232

3333
String properties();
34+
35+
/******************************************/
36+
/*!
37+
@brief Returns block type
38+
@return Block type.
39+
*/
40+
/******************************************/
3441
const char *type() { return _visual_type; }
3542

3643
protected:
37-
const char *_visual_type = "map";
44+
const char *_visual_type = "map"; /*!< Block type. */
3845

46+
/******************************************/
47+
/*!
48+
@brief Returns width of block.
49+
@return Block width.
50+
*/
51+
/******************************************/
3952
int _width() { return width; }
53+
54+
/******************************************/
55+
/*!
56+
@brief Returns height of block.
57+
@return Block height.
58+
*/
59+
/******************************************/
4060
int _height() { return height; }
61+
62+
/******************************************/
63+
/*!
64+
@brief Returns block's row location
65+
on an Adafruit IO dashboard.
66+
@return Adafruit IO dashboard row.
67+
*/
68+
/******************************************/
4169
int _row() { return row; }
70+
71+
/******************************************/
72+
/*!
73+
@brief Returns block's column location
74+
on an Adafruit IO dashboard.
75+
@return Adafruit IO dashboard column
76+
*/
77+
/******************************************/
4278
int _column() { return column; }
4379
};
4480

0 commit comments

Comments
 (0)