Skip to content

Commit 103a464

Browse files
author
brentru
committed
add class dox
1 parent f30fdc9 commit 103a464

5 files changed

Lines changed: 107 additions & 6 deletions

File tree

src/blocks/ImageBlock.h

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,65 @@
1717

1818
#include "AdafruitIO_Block.h"
1919

20+
/**************************************************************************/
21+
/*!
22+
@brief Class for interacting with the Adafruit IO Dashboard
23+
Image Block.
24+
*/
25+
/**************************************************************************/
2026
class ImageBlock : public AdafruitIO_Block {
2127

2228
public:
2329
ImageBlock(AdafruitIO_Dashboard *d, AdafruitIO_Feed *f)
2430
: AdafruitIO_Block(d, f) {}
2531
~ImageBlock() {}
2632

27-
int height = 6;
28-
int width = 4;
33+
int height = 6; /*!< Dashboard block height. */
34+
int width = 4; /*!< Dashboard block width. */
2935

36+
/******************************************/
37+
/*!
38+
@brief Returns block type
39+
@return Block type.
40+
*/
41+
/******************************************/
3042
const char *type() { return _visual_type; }
3143

3244
protected:
33-
const char *_visual_type = "image";
45+
const char *_visual_type = "image"; /*!< Block type. */
3446

47+
/******************************************/
48+
/*!
49+
@brief Returns width of block.
50+
@return Block width.
51+
*/
52+
/******************************************/
3553
int _width() { return width; }
54+
55+
/******************************************/
56+
/*!
57+
@brief Returns height of block.
58+
@return Block height.
59+
*/
60+
/******************************************/
3661
int _height() { return height; }
62+
63+
/******************************************/
64+
/*!
65+
@brief Returns block's row location
66+
on an Adafruit IO dashboard.
67+
@return Adafruit IO dashboard row.
68+
*/
69+
/******************************************/
3770
int _row() { return row; }
71+
72+
/******************************************/
73+
/*!
74+
@brief Returns block's column location
75+
on an Adafruit IO dashboard.
76+
@return Adafruit IO dashboard column
77+
*/
78+
/******************************************/
3879
int _column() { return column; }
3980
};
4081

src/blocks/MapBlock.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717

1818
#include "AdafruitIO_Block.h"
1919

20+
/**************************************************************************/
21+
/*!
22+
@brief Class for interacting with the Adafruit IO Dashboard
23+
Map Block.
24+
*/
25+
/**************************************************************************/
2026
class MapBlock : public AdafruitIO_Block {
2127

2228
public:

src/blocks/MomentaryBlock.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717

1818
#include "AdafruitIO_Block.h"
1919

20+
/**************************************************************************/
21+
/*!
22+
@brief Class for interacting with the Adafruit IO Dashboard
23+
Momentary Block.
24+
*/
25+
/**************************************************************************/
2026
class MomentaryBlock : public AdafruitIO_Block {
2127

2228
public:

src/blocks/StreamBlock.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717

1818
#include "AdafruitIO_Block.h"
1919

20+
/**************************************************************************/
21+
/*!
22+
@brief Class for interacting with the Adafruit IO Dashboard
23+
Stream Block.
24+
*/
25+
/**************************************************************************/
2026
class StreamBlock : public AdafruitIO_Block {
2127

2228
public:

src/blocks/TextBlock.h

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717

1818
#include "AdafruitIO_Block.h"
1919

20+
/**************************************************************************/
21+
/*!
22+
@brief Class for interacting with the Adafruit IO Dashboard
23+
Slider Block.
24+
*/
25+
/**************************************************************************/
2026
class TextBlock : public AdafruitIO_Block {
2127

2228
public:
@@ -25,18 +31,54 @@ class TextBlock : public AdafruitIO_Block {
2531

2632
const char *fontSize;
2733

28-
int width = 2;
29-
int height = 1;
34+
int width = 2; /*!< Dashboard block width. */
35+
int height = 1; /*!< Dashboard block height. */
3036

3137
String properties();
38+
39+
/******************************************/
40+
/*!
41+
@brief Returns block type
42+
@return Block type.
43+
*/
44+
/******************************************/
3245
const char *type() { return _visual_type; }
3346

3447
protected:
35-
const char *_visual_type = "text";
48+
const char *_visual_type = "text"; /*!< Block type. */
3649

50+
/******************************************/
51+
/*!
52+
@brief Returns width of block.
53+
@return Block width.
54+
*/
55+
/******************************************/
3756
int _width() { return width; }
57+
58+
/******************************************/
59+
/*!
60+
@brief Returns height of block.
61+
@return Block height.
62+
*/
63+
/******************************************/
3864
int _height() { return height; }
65+
66+
/******************************************/
67+
/*!
68+
@brief Returns block's row location
69+
on an Adafruit IO dashboard.
70+
@return Adafruit IO dashboard row.
71+
*/
72+
/******************************************/
3973
int _row() { return row; }
74+
75+
/******************************************/
76+
/*!
77+
@brief Returns block's column location
78+
on an Adafruit IO dashboard.
79+
@return Adafruit IO dashboard column
80+
*/
81+
/******************************************/
4082
int _column() { return column; }
4183
};
4284

0 commit comments

Comments
 (0)