@ -132,9 +132,43 @@
< section class = "trends-panel" aria-label = "Tendencias históricas" >
< section class = "trends-panel" aria-label = "Tendencias históricas" >
< div class = "panel-heading" >
< div class = "panel-heading" >
< h2 > Tendencias Históricas< / h2 >
< h2 > Tendencias Históricas< / h2 >
< p > Las gráficas se actualizan cada < span id = "history-interval" > 10 segundos< / span > < / p >
< / div >
< / div >
< div class = "card config-card" style = "margin-bottom: 20px; padding: 20px; border-left: 4px solid #9c27b0;" >
< h3 > Configuración de Almacenamiento< / h3 >
< div style = "display: flex; gap: 20px; align-items: center; flex-wrap: wrap;" >
< div >
< label style = "display: block; margin-bottom: 5px; font-size: 0.9em; color: #ccc;" > Actualización
de Gráficas (UI):< / label >
< select id = "chart-refresh-rate" onchange = "updateChartRefreshRate()"
style="padding: 8px; background-color: #222; color: white; border: 1px solid #444; border-radius: 4px;">
< option value = "5000" > Cada 5 segundos< / option >
< option value = "10000" selected > Cada 10 segundos< / option >
< option value = "30000" > Cada 30 segundos< / option >
< option value = "60000" > Cada 1 minuto< / option >
< / select >
< / div >
< div >
< label style = "display: block; margin-bottom: 5px; font-size: 0.9em; color: #ccc;" > Frecuencia de
Guardado (Log):< / label >
< select id = "data-logging-rate" onchange = "updateLoggingRate()"
style="padding: 8px; background-color: #222; color: white; border: 1px solid #444; border-radius: 4px;">
< option value = "1" > 1 lectura / segundo< / option >
< option value = "5" > 1 lectura / 5 segundos< / option >
< option value = "10" > 1 lectura / 10 segundos< / option >
< option value = "60" > 1 lectura / 1 minuto< / option >
< / select >
< / div >
< div style = "margin-top: auto;" >
< button class = "btn-command" onclick = "clearHistoricalData()"
style="padding: 8px 15px; background-color: #ff4444; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold;">
Borrar Historial de Datos
< / button >
< / div >
< / div >
< / div >
< div class = "card export-card" >
< div class = "card export-card" >
< h3 > Exportar Historial (CSV / Excel)< / h3 >
< h3 > Exportar Historial (CSV / Excel)< / h3 >
< div class = "button-group" >
< div class = "button-group" >
@ -199,68 +233,78 @@
< div class = "card terminal-card" style = "margin-top: 20px; padding: 20px; border-left: 4px solid #00ffcc;" >
< div class = "card terminal-card" style = "margin-top: 20px; padding: 20px; border-left: 4px solid #00ffcc;" >
< div class = "card terminal-card" style = "margin-top: 20px; padding: 20px; border-left: 4px solid #00ffcc;" >
< div class = "card terminal-card" style = "margin-top: 20px; padding: 20px; border-left: 4px solid #00ffcc;" >
< h3 > Consola de Hardware (Atlas Scientific EZO)< / h3 >
< h3 > Consola de Hardware (Atlas Scientific EZO)< / h3 >
< div style = "display: flex; gap: 10px; margin-bottom: 15px; align-items: center; flex-wrap: wrap;" >
< select id = "terminal-sensor-select" style = "padding: 5px;" >
< option value = "rtd" > Temperatura (RTD)< / option >
< option value = "ph" > Sensor de pH< / option >
< option value = "do" > Oxígeno Disuelto (DO)< / option >
< option value = "ec" > Conductividad (EC)< / option >
< / select >
< button class = "btn-command" onclick = "sendCommand('i')"
style="padding: 5px 15px; cursor: pointer;">Info (i)< / button >
< button class = "btn-command" onclick = "sendCommand('status')"
style="padding: 5px 15px; cursor: pointer;">Estado< / button >
< button class = "btn-command" onclick = "sendCommand('r')"
style="padding: 5px 15px; background-color: #4f46e5; color: white; border: none; border-radius: 4px; cursor: pointer;">Leer (r)< / button >
< span style = "color: #666; margin: 0 10px;" > |< / span >
< input type = "text" id = "custom-command" placeholder = "Ej: factory, t,25.0, led,1"
style="padding: 5px; width: 200px; background-color: #222; color: #00ffcc; border: 1px solid #444;">
< button class = "btn-command" onclick = "sendCustomCommand()"
style="padding: 5px 15px; background-color: #00ffcc; color: black; font-weight: bold; border: none; border-radius: 4px; cursor: pointer;">Enviar ↵< / button >
< / div >
< div id = "terminal-output"
< div style = "display: flex; gap: 10px; margin-bottom: 15px; align-items: center; flex-wrap: wrap;" >
style="background-color: #1e1e1e; color: #00ff00; padding: 15px; height: 150px; overflow-y: auto; font-family: 'Courier New', Courier, monospace; border-radius: 4px;">
< select id = "terminal-sensor-select" style = "padding: 5px;" >
< div style = "color: #888;" > [SISTEMA] Consola I2C iniciada. Esperando comandos...< / div >
< / div >
< / div >
< div class = "card calibration-card" style = "margin-top: 20px; padding: 20px; border-left: 4px solid #ffcc00;" >
< h3 > Panel de Calibración< / h3 >
< div style = "display: grid; grid-template-columns: 1fr 1fr; gap: 20px;" >
< div >
< label style = "display: block; margin-bottom: 5px;" > Seleccionar Sensor a Calibrar:< / label >
< select id = "cal-sensor-select" style = "padding: 8px; width: 100%; margin-bottom: 15px;" >
< option value = "rtd" > Temperatura (RTD)< / option >
< option value = "rtd" > Temperatura (RTD)< / option >
< option value = "ph" > Sensor de pH< / option >
< option value = "ph" > Sensor de pH< / option >
< option value = "do" > Oxígeno Disuelto (DO)< / option >
< option value = "do" > Oxígeno Disuelto (DO)< / option >
< option value = "ec" > Conductividad (EC)< / option >
< option value = "ec" > Conductividad (EC)< / option >
< / select >
< / select >
< div style = "margin-bottom: 15px;" >
< button class = "btn-command" onclick = "sendCommand('i')"
< label style = "display: block; margin-bottom: 5px;" > Comandos Globales de Calibración:< / label >
style="padding: 5px 15px; cursor: pointer;">Info (i)< / button >
< button class = "btn-command" onclick = "sendCalibrationCmd('cal,?')" style = "padding: 5px 10px; margin-right: 5px; cursor: pointer;" > Verificar Estado (?)< / button >
< button class = "btn-command" onclick = "sendCommand('status')"
< button class = "btn-command" onclick = "sendCalibrationCmd('cal,clear')" style = "padding: 5px 10px; background-color: #ff4444; color: white; border: none; border-radius: 4px; cursor: pointer;" > Borrar Memoria (Clear)< / button >
style="padding: 5px 15px; cursor: pointer;">Estado< / button >
< / div >
< button class = "btn-command" onclick = "sendCommand('r')"
style="padding: 5px 15px; background-color: #4f46e5; color: white; border: none; border-radius: 4px; cursor: pointer;">Leer
(r)< / button >
< span style = "color: #666; margin: 0 10px;" > |< / span >
< input type = "text" id = "custom-command" placeholder = "Ej: factory, t,25.0, led,1"
style="padding: 5px; width: 200px; background-color: #222; color: #00ffcc; border: 1px solid #444;">
< button class = "btn-command" onclick = "sendCustomCommand()"
style="padding: 5px 15px; background-color: #00ffcc; color: black; font-weight: bold; border: none; border-radius: 4px; cursor: pointer;">Enviar
↵< / button >
< / div >
< / div >
< div style = "background-color: #f5f5f5; padding: 15px; border-radius: 4px;" >
< div id = "terminal-output"
< h4 style = "margin-top: 0; color: #333;" > Calibración Multipunto< / h4 >
style="background-color: #1e1e1e; color: #00ff00; padding: 15px; height: 150px; overflow-y: auto; font-family: 'Courier New', Courier, monospace; border-radius: 4px;">
< p style = "font-size: 0.9em; color: #666;" > Ingresa el valor de referencia físico (ej. solución pH, o temperatura del agua).< / p >
< div style = "color: #888;" > [SISTEMA] Consola I2C iniciada. Esperando comandos...< / div >
< / div >
< / div >
< div class = "card calibration-card" style = "margin-top: 20px; padding: 20px; border-left: 4px solid #ffcc00;" >
< h3 > Panel de Calibración< / h3 >
< div style = "display: grid; grid-template-columns: 1fr 1fr; gap: 20px;" >
< div >
< label style = "display: block; margin-bottom: 5px;" > Seleccionar Sensor a Calibrar:< / label >
< select id = "cal-sensor-select" style = "padding: 8px; width: 100%; margin-bottom: 15px;" >
< option value = "rtd" > Temperatura (RTD)< / option >
< option value = "ph" > Sensor de pH< / option >
< option value = "do" > Oxígeno Disuelto (DO)< / option >
< option value = "ec" > Conductividad (EC)< / option >
< / select >
< div style = "margin-bottom: 15px;" >
< label style = "display: block; margin-bottom: 5px;" > Comandos Globales de Calibración:< / label >
< button class = "btn-command" onclick = "sendCalibrationCmd('cal,?')"
style="padding: 5px 10px; margin-right: 5px; cursor: pointer;">Verificar Estado
(?)< / button >
< button class = "btn-command" onclick = "sendCalibrationCmd('cal,clear')"
style="padding: 5px 10px; background-color: #ff4444; color: white; border: none; border-radius: 4px; cursor: pointer;">Borrar
Memoria (Clear)< / button >
< / div >
< / div >
< div style = "display: flex; gap: 10px; align-items: center;" >
< div style = "background-color: #f5f5f5; padding: 15px; border-radius: 4px;" >
< input type = "number" id = "cal-value" placeholder = "Ej: 7.00" step = "0.01" style = "padding: 8px; width: 100px; border: 1px solid #ccc; border-radius: 4px;" >
< h4 style = "margin-top: 0; color: #333;" > Calibración Multipunto< / h4 >
< button class = "btn-command" onclick = "calibratePoint()" style = "padding: 8px 15px; background-color: #00ffcc; color: black; font-weight: bold; border: none; border-radius: 4px; cursor: pointer;" > Calibrar Punto< / button >
< p style = "font-size: 0.9em; color: #666;" > Ingresa el valor de referencia físico (ej. solución
pH, o temperatura del agua).< / p >
< div style = "display: flex; gap: 10px; align-items: center;" >
< input type = "number" id = "cal-value" placeholder = "Ej: 7.00" step = "0.01"
style="padding: 8px; width: 100px; border: 1px solid #ccc; border-radius: 4px;">
< button class = "btn-command" onclick = "calibratePoint()"
style="padding: 8px 15px; background-color: #00ffcc; color: black; font-weight: bold; border: none; border-radius: 4px; cursor: pointer;">Calibrar
Punto< / button >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / main >
< / main >