Allow sensors to re-present themselves on request from controller. All

presentations actions moved to their own function in the examples.
This commit is contained in:
Henrik Ekblad
2015-09-27 18:04:05 +02:00
parent aa22a3eaec
commit 415aa29b34
49 changed files with 281 additions and 169 deletions
@@ -162,15 +162,6 @@ void setup() {
Serial.flush();
Serial.println(F(" - Online!"));
sendSketchInfo("Sensebender Micro", RELEASE);
present(CHILD_ID_TEMP,S_TEMP);
present(CHILD_ID_HUM,S_HUM);
#ifdef BATT_SENSOR
present(BATT_SENSOR, S_POWER);
#endif
isMetric = getConfig().isMetric;
Serial.print(F("isMetric: ")); Serial.println(isMetric);
@@ -181,6 +172,17 @@ void setup() {
}
void presentation() {
sendSketchInfo("Sensebender Micro", RELEASE);
present(CHILD_ID_TEMP,S_TEMP);
present(CHILD_ID_HUM,S_HUM);
#ifdef BATT_SENSOR
present(BATT_SENSOR, S_POWER);
#endif
}
/***********************************************
*