case 42://---------------------------------------- Configurar coolers ----------------------------
if ((x>=volT[0]) && x<=volT[2] && (y>=volT[1]) && (y<=volT[3])) // volta a tela configurar leds
{
//waitForIt(volT[0], volT[1], volT[2], volT[3]);
dispScreen=40;
clearScreen();
config_leds();
}
else if ((x>=salV[0]) && (x<=salV[2]) && (y>=salV[1]) && (y<=salV[3])) //Função salvar
{
//waitForIt(salV[0], salV[1], salV[2], salV[3]);
HtempMin = HtempMin_temp;
HtempMax = HtempMax_temp;
dispScreen=40;
salvar_coolersEEPROM();
clearScreen();
config_leds();
}
else if ((x>=temM[0]) && (x<=temM[2]))
{
if ((y>=temM[1]) && (y<=temM[3])) // Temperatura para velocidade mÃnima -
{
//waitForIt(temM[0], temM[1], temM[2], temM[3]);
HtempMin_temp -= 0.1;
if (HtempMin_temp < 68) // 20 C
{
HtempMin_temp = 84; // 35 C
}
myGLCD.setColor(0, 0, 0);
myGLCD.fillRect (128, 40, 180, 56); // Limpar texto
configurar_coolers();
}
else if ((y>=almM[1]) && (y<=almM[3])) // Temperatura para velocidade máxima -
{
//waitForIt(almM[0], almM[1], almM[2], almM[3]);
HtempMax_temp -= 0.1;
if (HtempMax_temp < 85) //36 C
{
HtempMax_temp =99; //50 C
}
myGLCD.setColor(0, 0, 0);
myGLCD.fillRect (128, 140, 180, 156);// Limpar texto
configurar_coolers();
}
}
else if ((x>=temP[0]) && (x<=temP[2]))
{
if ((y>=temP[1]) && (y<=temP[3])) // Temperatura para velocidade mÃnima +
{
//waitForIt(temP[0], temP[1], temP[2], temP[3]);
HtempMin_temp += 0.1;
if (HtempMin_temp > 84) //35 C
{
HtempMin_temp = 68; //20 C
}
myGLCD.setColor(0, 0, 0);
myGLCD.fillRect (128, 40, 180, 56); //Limpar texto
configurar_coolers();
}
else if ((y>=almP[1]) && (y<=almP[3])) // Temperatura para velocidade máxima +
{
//waitForIt(almP[0], almP[1], almP[2], almP[3]);
HtempMax_temp += 0.1;
if (HtempMax_temp >99) //50 C
{
HtempMax_temp = 85; //36 C
}
myGLCD.setColor(0, 0, 0);
myGLCD.fillRect (128, 140, 180, 156);//Limpar texto
configurar_coolers();
}
}
else if ((x>=menU[0]) && x<=menU[2] && (y>=menU[1]) && (y<=menU[3])) // volta ao menu 1
{
//waitForIt(menU[0], menU[1], menU[2], menU[3]);
dispScreen=1;
clearScreen();
menuScreen();
}
break;
case 43://---------------------------------------- Reduziir potência dos leds ----------------------------
if ((x>=menU[0]) && x<=menU[2] && (y>=menU[1]) && (y<=menU[3])) // volta ao menu 1
{
//waitForIt(menU[0], menU[1], menU[2], menU[3]);
dispScreen=1;
clearScreen();
menuScreen();
}
else if ((x>=volT[0]) && x<=volT[2] && (y>=volT[1]) && (y<=volT[3])) // volta a tela configurar leds
{
//waitForIt(volT[0], volT[1], volT[2], volT[3]);
dispScreen=40;
clearScreen();
config_leds();
}
else if ((x>=salV[0]) && (x<=salV[2]) && (y>=salV[1]) && (y<=salV[3])) //Função salvar
{
//waitForIt(salV[0], salV[1], salV[2], salV[3]);
tempHR = tempHR_t;
potR = potR_t;
dispScreen=40;
salvar_tempPotEEPROM();
clearScreen();
config_leds();
}
else if ((x>=tempeC[0]) && (x<=tempeC[2]) && (y>=tempeC[1]) && (y<=tempeC[3])) //Temperatura +
{
//waitForIt(tempeC[0], tempeC[1], tempeC[2], tempeC[3]);
tempHR_t += 1;
if (tempHR_t >99)//99 C /******************************************************** changed for Fahrenheit *******************************************************************/
{
tempHR_t = 86; //30 C
}
reduzir_potencia();
}
else if ((x>=tempeB[0]) && (x<=tempeB[2]) && (y>=tempeB[1]) && (y<=tempeB[3])) //Temperatura -
{
//waitForIt(tempeB[0], tempeB[1], tempeB[2], tempeB[3]);
tempHR_t -= 1;
if (tempHR_t < 86) //30 C
{
tempHR_t =99; //99 C
}
reduzir_potencia();
}
else if ((x>=potC[0]) && (x<=potC[2]) && (y>=potC[1]) && (y<=potC[3])) //Potência +
{
//waitForIt(potC[0], potC[1], potC[2], potC[3]);
potR_t += 1;
if (potR_t >99) //99 C
{
potR_t = 1;
}
reduzir_potencia();
}
else if ((x>=potB[0]) && (x<=potB[2]) && (y>=potB[1]) && (y<=potB[3])) //Potência -
{
//waitForIt(potB[0], potB[1], potB[2], potB[3]);
potR_t -= 1;
if (potR_t < 1)
{
potR_t =99; //99 C
}
reduzir_potencia();
}
break; ;