aboutsummaryrefslogtreecommitdiff
path: root/app.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-07-26 18:06:29 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-07-26 19:27:13 +0200
commitafd694f05178c22b4f71f65143c4647ce912d980 (patch)
treebde5b59098c453a4355f63eaaabdf95f9e2679bb /app.cpp
parenta64156388fc92da1d151a1094e25d9d89240bb38 (diff)
downloadtrygvisio_soil_moisture-afd694f05178c22b4f71f65143c4647ce912d980.tar.gz
trygvisio_soil_moisture-afd694f05178c22b4f71f65143c4647ce912d980.tar.bz2
trygvisio_soil_moisture-afd694f05178c22b4f71f65143c4647ce912d980.tar.xz
trygvisio_soil_moisture-afd694f05178c22b4f71f65143c4647ce912d980.zip
o Much improved Debug class.
- Inlining all definitions to make everything shorter and easier to read. - More const so even more can be inlined. o Adding some support for ATTiny85, still more work to be done. o Removing two unused battery characteristics. o Dynamically adding battery and temperature characteristics if their pipes are defined.
Diffstat (limited to 'app.cpp')
-rw-r--r--app.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/app.cpp b/app.cpp
index aef96d7..30160dc 100644
--- a/app.cpp
+++ b/app.cpp
@@ -2,12 +2,16 @@
#include "Debug.h"
#include "config-check.h"
+#ifdef PERSISTENT_CONFIGURATION_SUPPORT
#include <EEPROM.h>
+#endif
#if SM_BOARD_VERSION == 1
#define SENSOR_COUNT 2
#elif SM_BOARD_VERSION == 2
#define SENSOR_COUNT 4
+#elif SM_BOARD_VERSION == 3
+#define SENSOR_COUNT 1
#else
#error "SM_BOARD_VERSION must be set to a valid value. See config-check.h"
#endif
@@ -37,6 +41,8 @@ struct sm_sensor {
{ A1, 3, 5, 0, 200, 3000, 4, "woot"},
{ A2, 8, 10, 0, 200, 3000, 3, "foo"},
{ A3, 11, 12, 0, 200, 3000, 3, "bar"},
+#elif SM_BOARD_VERSION == 3
+ { A0, 1, 2, 0, 200, 3000, 3, "0"},
#endif
};