   return ADC;
 }
 
-static void sleep(uint8_t wdt_period, boolean include_adc)
+static void sleepPeriod(uint8_t wdt_period)
 {
   set_sleep_mode(SLEEP_MODE_PWR_DOWN);
 
-  // Disable ADC
-  if (include_adc)
-    ADCSRA &= ~bit(ADEN);
-
-  // TODO: Figure out what else I can safely disable
-  // Disable analog comparator to
-  // Internal Voltage Reference? 
-  //   When turned on again, the user must allow the reference to start up before the output is used. 
-  //   these should be disabled at all times, not just sleep
-  
   // Set the watchdog to wake us up and turn on its interrupt
   wdt_enable(wdt_period);
   WDTCSR |= bit(WDIE);

  sleep_cpu();
  
  // Back from sleep
  sleep_disable();
  if (include_adc)
    ADCSRA |= bit(ADEN);
}

static void sleepSeconds(unsigned char secs)
{
#if RECEIVE_TEST
  unsigned long start = millis();
  while (millis() - start < (secs * 1000U))
    rf12_doWork();
  ADCSRA |= bit(ADEN);
#else
  while (secs >= 8) { sleep(WDTO_8S, true); secs -=8; }
  if (secs >= 4) { sleep(WDTO_4S, true); secs -= 4; }
  if (secs >= 2) { sleep(WDTO_2S, true); secs -= 2; }
  if (secs >= 1) { sleep(WDTO_1S, true); }
#endif
}

static void updateBatteryLow(void)


void loop(void)
{
  if (_loopCnt % 2 == 0)
    checkTemps();

#ifdef LMREMOTE_SERIAL
  Serial.flush(); delay(2);
#endif

  if (_recvLast == 0)
    resetEstimate();
  else
    optimalSleep();
  ++_loopCnt;
}


