Corrijio 'reanudar'
This commit is contained in:
parent
a2ca4cb087
commit
2f31f1f4f0
@ -1,6 +1,6 @@
|
||||
/*****************************************
|
||||
* Dosificador_LCD2004_4buttons *
|
||||
* 15/03/2021 *
|
||||
* 18/12/2021 *
|
||||
* Versión 0.1.0 *
|
||||
* koneko.mx *
|
||||
*****************************************/
|
||||
@ -14,7 +14,7 @@
|
||||
* PINOUT / MEMORY ADDRESS
|
||||
**************************************************/
|
||||
#define LCD_I2C_ADDRESS 0x27
|
||||
#define RELAY_PIN 2
|
||||
#define RELAY_PIN 4
|
||||
#define SETTINGS_BUTTONS_PIN A2
|
||||
|
||||
/**************************************************
|
||||
@ -170,6 +170,7 @@
|
||||
// Leemos valor analogo del botón
|
||||
uint16_t button_value = analogRead(SETTINGS_BUTTONS_PIN);
|
||||
|
||||
|
||||
// Comprobamos el valor obtenido con un rago de tolerancia SETTING_BUTTON_TOLERANCE_READ
|
||||
for (uint8_t i = 0; i < sizeof button_values / sizeof button_values[0]; i++) {
|
||||
if(button_values[i] >= (button_value - SETTING_BUTTON_TOLERANCE_READ) && button_values[i] <= (button_value + SETTING_BUTTON_TOLERANCE_READ))
|
||||
@ -232,11 +233,12 @@
|
||||
|
||||
default:
|
||||
confirmation_repeats_millis = 0;
|
||||
|
||||
/*
|
||||
_bt[0] = 0;
|
||||
_bt[1] = 0;
|
||||
_bt[2] = 0;
|
||||
_bt[3] = 0;
|
||||
*/
|
||||
}
|
||||
|
||||
// Verificamos y salimos del menú si a pasan AUTO_EXIT_MENU_MILLIS
|
||||
|
@ -390,6 +390,9 @@ Timer_lite::~Timer_lite()
|
||||
EEPROM.write(_eeprom_address_timer_detenido, 0);
|
||||
|
||||
_fin_de_periodo_seg = _now.unixtime() + _restante_del_periodo_seg;
|
||||
|
||||
if((_periodo == TIMER_ARRANQUE || _periodo == TIMER_ENCENDIDO) && _fin_de_periodo_seg)
|
||||
setRelaySatus(RELAY_ON);
|
||||
}
|
||||
|
||||
void Timer_lite::reiniciar()
|
||||
@ -399,3 +402,4 @@ Timer_lite::~Timer_lite()
|
||||
_periodo = TIMER_INICIO_ESPERA;
|
||||
_fin_de_periodo_seg = _now.unixtime() + getTiempoInicioEspera();
|
||||
}
|
||||
|
||||
|
@ -36,8 +36,8 @@
|
||||
#define serialBeginWhile(a) do{}while(0)
|
||||
#endif
|
||||
|
||||
#define RELAY_OFF HIGH
|
||||
#define RELAY_ON LOW
|
||||
#define RELAY_OFF LOW
|
||||
#define RELAY_ON HIGH
|
||||
|
||||
#define TIMER_DETENIDO 0
|
||||
#define TIMER_INICIO_ESPERA 1
|
||||
@ -151,3 +151,4 @@ class Timer_lite
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user