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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user