DEV_Valve.h
/* Called by Home Span each round */
Called by Home Span each round
Called by Home Span each round
void loop(void) {
    updateTime();
    if (stopAt != 0 && time >= stopAt)
      turnOff();
    if (startedAt != 0 && stopAt != 0)
      remDuration->setVal(stopAt - startedAt, false);
    digitalWrite(pin, on);
  }
void loop ( void ) { updateTime ( ) ; if ( stopAt != 0 && time >= stopAt ) turnOff ( ) ; if ( startedAt != 0 && stopAt != 0 ) remDuration -> setVal ( stopAt - startedAt , false ) ; digitalWrite ( pin , on ) ; }
Called by Home Span each round
Called by Home Span each round
/* Turn off our valve if the time is past */ /* Update remaining duration, but don't force a notification to save traffic */ /* Make sure hardware matches internal state */