   
 }
 
-
-void temperatureWarningCheck(float temperature){
+//Returns true if temperature threshold has been reached
+bool temperatureWarningCheck(float temperature){
 
   if(temperature >= TEMP_MAX){
     nextState = STATE_TEMP_MAX;
+    return true;
   
   } else if(temperature >= TEMP_WARN){
     static unsigned long lastTempAlert = 0;

          break;
       }

       char valueBuff[10];
       char fullBuff[30];
        

      lastTempAlert = currentTime;
      shortBeepXTimesNoDelay(5); 
    }

    return true;
    
  }

  return false;
}

