Skip to content

Commit 2cf58e5

Browse files
committed
Add printinfo debug function
1 parent cd341c6 commit 2cf58e5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ArduinoCloudThing.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class ArduinoCloudPropertyGeneric
4545
virtual bool newData() = 0;
4646
virtual bool shouldBeUpdated() = 0;
4747
virtual void updateShadow() = 0;
48-
virtual bool canRead();
48+
virtual bool canRead() = 0;
49+
virtual void printinfo() = 0;
4950
virtual ArduinoCloudPropertyGeneric& onUpdate(void(*fn)(void)) = 0;
5051
virtual ArduinoCloudPropertyGeneric& publishEvery(long seconds) = 0;
5152
void(*callback)(void) = NULL;
@@ -67,6 +68,10 @@ class ArduinoCloudProperty : public ArduinoCloudPropertyGeneric
6768
return false;
6869
}
6970

71+
void printinfo() {
72+
Serial.println("name: " + name + " value: " + String(property) + " shadow: " + String(shadow_property) + " permission: " + String(permission));
73+
}
74+
7075
void updateShadow() {
7176
shadow_property = property;
7277
}

0 commit comments

Comments
 (0)