   int size() 
   {
     return _size;  
+  }
+
+  void invalidate()
+  {
+    _size = 0;
   }
 
   bool valid() 

      Serial.println("");
#endif  

      if (time - lastUpdate > 2500) 
      {
        if (lastDistance != cm) {
          lastDistance = cm;
  
  #ifdef DEBUG_ENABLED       
          Serial.print("Ping: ");
          Serial.print(cm);
          Serial.println("cm");
  #endif        
  
          if (settings.floorLevel > 0 && settings.safeDepth > 0) {
            int depth = settings.floorLevel - cm;
  
            if (depth <= settings.warnDepth) {
              smartthing.shieldSetLED(0, 4, 0);
            } else {
              if (depth <= settings.safeDepth) {
                smartthing.shieldSetLED(6, 4, 0); 
              } else {
                smartthing.shieldSetLED(8, 0, 0);               
              }
            }
          }
  
          snprintf(message, sizeof(message), "level:%d", cm);
          smartthing.send(message);
  
          lastUpdate = time;
        }        
      }
    }
    
    lastCheck = time;

#include "SmartThings.h"

#define DEBUG_ENABLED      1
#define DEBUG_RAW_ENABLED  1

#define PIN_THING_RX       3
#define PIN_THING_TX       2
