// Calculate applied wattage, based on the distance from the target temperature
if(overTemperature){
// turn it off
wattage=0.0;
}else{
iPumpSpeed=PUMP_SPEED_STOP_MOSFET;
//if(difference <= 0.1) {
// turn it off
// wattage = 0.0;
//} else {
if(difference<=0.5){
// pulse lightly at 500 watt
if(cookTemperature>99.0){
wattage=2000.0;
}
analogWrite(PUMP_PIN,iPumpSpeed);
backToStatus();
break;
else{
if(cookTemperature>70.0){
wattage=1000.0;
}
caseeSettingsMenu_PT100_Element:{
// Stuff
backToStatus();
break;
else{
wattage=500.0;
}
caseeSettingsMenu_PT100_Up:{
// Stuff
backToStatus();
break;
}
caseeSettingsMenu_PT100_Down:{
// Stuff
backToStatus();
break;
}else{
if(difference<=1.0){
// pulse moderately at 1000 watt
if(cookTemperature>99.0){
wattage=2000.0;
}
else{
wattage=1000.0;
}
caseeSettingsMenu_Back:{
eMenuType=eMenuType_Main;
repaint=true;
// reset operation state | INPUT : eRotaryEncoderMode newMode, int newPosition, int newMaxPosition, int newMinPosition, int newSingleStep, int newMultiStep
//pulse constantly at HEATING_ELEMENT_MAX_WATTAGE watt
wattage=HEATING_ELEMENT_MAX_WATTAGE;
}
default:{
}
}
eSettingsMenuSelection=eSettingsMenu_NULL;
}
voidrunMaltSelection(){
switch(eMaltMenuSelection){
caseeMaltMenu_CastleMalting_Chteau_Pilsen_2RS:{
// Stuff
backToStatus();
break;
//}
}
caseeMaltMenu_CastleMalting_Wheat_Blanc:{
// Stuff
backToStatus();
break;
// Update the recorded time for the begining of the window, if the previous window has passed
while((millis()-windowStartTime)>iWindowSize){// Check if it's time to vary the pulse width modulation and if so do it by shifting the "Relay in ON" Window
windowStartTime+=iWindowSize;
}
caseeMaltMenu_Back:{
eMenuType=eMenuType_Main;
repaint=true;
// reset operation state | INPUT : eRotaryEncoderMode newMode, int newPosition, int newMaxPosition, int newMinPosition, int newSingleStep, int newMultiStep
// reset operation state | INPUT : eRotaryEncoderMode newMode, int newPosition, int newMaxPosition, int newMinPosition, int newSingleStep, int newMultiStep
// reset operation state | INPUT : eRotaryEncoderMode newMode, int newPosition, int newMaxPosition, int newMinPosition, int newSingleStep, int newMultiStep
xWarnCookEnded();// Warn the user that the cooking is done
break;
}
// Update the recorded time for the begining of the window, if the previous window has passed
while((millis()-windowStartTime)>iWindowSize){// Check if it's time to vary the pulse width modulation and if so do it by shifting the "Relay in ON" Window
// reset operation state | INPUT : eRotaryEncoderMode newMode, int newPosition, int newMaxPosition, int newMinPosition, int newSingleStep, int newMultiStep