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:
+6
-4
@@ -95,10 +95,6 @@ void setup()
|
||||
// Set analog led pin to off
|
||||
analogWrite( LED_PIN, 0);
|
||||
|
||||
// Send the Sketch Version Information to the Gateway
|
||||
present(CHILD_ID_LIGHT, S_DIMMER);
|
||||
sendSketchInfo(SN, SV);
|
||||
|
||||
// Retreive our last dim levels from the eprom
|
||||
fadeTo = dimValue = 0;
|
||||
byte oldLevel = loadLevelState(EEPROM_DIM_LEVEL_LAST);
|
||||
@@ -109,6 +105,12 @@ void setup()
|
||||
Serial.println("Ready to receive messages...");
|
||||
}
|
||||
|
||||
void presentation() {
|
||||
// Send the Sketch Version Information to the Gateway
|
||||
present(CHILD_ID_LIGHT, S_DIMMER);
|
||||
sendSketchInfo(SN, SV);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// Check if someone turned the rotary encode
|
||||
|
||||
Reference in New Issue
Block a user