Skip to content

Commit 6079dcb

Browse files
committed
Address review comments
1 parent f535dcd commit 6079dcb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

examples/LedStrip/LedStrip.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const unsigned int NUMBER_OF_LED = 4;
44
const unsigned char LED_PINS[NUMBER_OF_LED] = { 16, 5, 4, 0 };
55

6-
HomieNode stripNode("strip", "Strip", "strip", "true", 1, NUMBER_OF_LED);
6+
HomieNode stripNode("strip", "Strip", "strip", true, 1, NUMBER_OF_LED);
77

88
bool stripLedHandler(const HomieRange& range, const String& value) {
99
if (!range.isRange) return false; // if it's not a range

examples/SingleButton/SingleButton.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void setup() {
3232
buttonNode.advertise("button").setName("Button")
3333
.setDatatype("enum")
3434
.setFormat("PRESSED,RELEASED")
35-
.retained(false);
35+
.setRetained(false);
3636

3737
Homie.setup();
3838
}

src/HomieNode.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ PropertyInterface& PropertyInterface::setFormat(const char* format) {
3434
return *this;
3535
}
3636

37-
PropertyInterface& PropertyInterface::retained(const bool retained) {
38-
_property->retained(retained);
37+
PropertyInterface& PropertyInterface::setRetained(const bool retained) {
38+
_property->setRetained(retained);
3939
return *this;
4040
}
4141

src/HomieNode.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PropertyInterface {
2929
PropertyInterface& setUnit(const char* unit);
3030
PropertyInterface& setDatatype(const char* datatype);
3131
PropertyInterface& setFormat(const char* format);
32-
PropertyInterface& retained(const bool retained = true);
32+
PropertyInterface& setRetained(const bool retained = true);
3333

3434
private:
3535
PropertyInterface& setProperty(Property* property);
@@ -49,7 +49,7 @@ class Property {
4949
void setUnit(const char* unit) { _unit = unit; }
5050
void setDatatype(const char* datatype) { _datatype = datatype; }
5151
void setFormat(const char* format) { _format = format; }
52-
void retained(const bool retained = true) { _retained = retained; }
52+
void setRetained(const bool retained = true) { _retained = retained; }
5353

5454

5555
private:

0 commit comments

Comments
 (0)