From 0c92c8f16f791b16d3fdfd827bc640527e2bea5d Mon Sep 17 00:00:00 2001 From: brentrubell Date: Fri, 3 Aug 2018 17:49:10 -0400 Subject: [PATCH] Map props patch (#55) * remove string for props in function * Update mapblock.h to add props string. * Update library.properties --- library.properties | 2 +- src/blocks/MapBlock.cpp | 4 ++-- src/blocks/MapBlock.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/library.properties b/library.properties index 483cf24b..8d6435bb 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit IO Arduino -version=2.7.12 +version=2.7.13 author=Adafruit maintainer=Adafruit sentence=Arduino library to access Adafruit IO. diff --git a/src/blocks/MapBlock.cpp b/src/blocks/MapBlock.cpp index 8fb64027..dc5e8969 100644 --- a/src/blocks/MapBlock.cpp +++ b/src/blocks/MapBlock.cpp @@ -27,11 +27,11 @@ String MapBlock::properties() tile = "contrast"; } - String props = "{\"historyHours\":\""; + props = "{\"historyHours\":\""; props += historyHours; props += "\",\"tile\":\""; props += tile; props += "\"}"; return props; -} \ No newline at end of file +} diff --git a/src/blocks/MapBlock.h b/src/blocks/MapBlock.h index 6ca37a72..8de7fc9e 100644 --- a/src/blocks/MapBlock.h +++ b/src/blocks/MapBlock.h @@ -19,7 +19,8 @@ class MapBlock : public AdafruitIO_Block { public: MapBlock(AdafruitIO_Dashboard *d, AdafruitIO_Feed *f); ~MapBlock(); - + + String props; int historyHours; const char *tile;