Commit 899059e2 authored by user2684's avatar user2684
Browse files

if POWER_MANAGER is not enabled setAutoPowerPins()...

if POWER_MANAGER is not enabled setAutoPowerPins() inNodeManager::registerSensor() throws an error #26
parent e826d15f
......@@ -1077,8 +1077,10 @@ int NodeManager::registerSensor(Sensor* sensor) {
Serial.print(" T=");
Serial.println(sensor->getType());
#endif
// set auto power pin
sensor->setAutoPowerPins(_auto_power_pins);
#if POWER_MANAGER == 1
// set auto power pin
sensor->setAutoPowerPins(_auto_power_pins);
#endif
// add the sensor to the array of registered sensors
_sensors[sensor->getChildId()] = sensor;
// return the child_id
......
......@@ -314,6 +314,8 @@ Each sensor class can expose additional methods.
void setDebounce(int value);
// time to wait in milliseconds after a change is detected to allow the signal to be restored to its normal value (default: 0)
void setTriggerTime(int value);
// Set initial value on the interrupt pin (default: HIGH)
void setInitial(int value);
~~~
## Upload your sketch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment