@ -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" >
@ -214,14 +248,16 @@
< button class = "btn-command" onclick = "sendCommand('status')"
< button class = "btn-command" onclick = "sendCommand('status')"
style="padding: 5px 15px; cursor: pointer;">Estado< / button >
style="padding: 5px 15px; cursor: pointer;">Estado< / button >
< button class = "btn-command" onclick = "sendCommand('r')"
< 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 >
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 >
< span style = "color: #666; margin: 0 10px;" > |< / span >
< input type = "text" id = "custom-command" placeholder = "Ej: factory, t,25.0, led,1"
< 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;">
style="padding: 5px; width: 200px; background-color: #222; color: #00ffcc; border: 1px solid #444;">
< button class = "btn-command" onclick = "sendCustomCommand()"
< 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 >
style="padding: 5px 15px; background-color: #00ffcc; color: black; font-weight: bold; border: none; border-radius: 4px; cursor: pointer;">Enviar
↵< / button >
< / div >
< / div >
< div id = "terminal-output"
< div id = "terminal-output"
@ -245,18 +281,26 @@
< div style = "margin-bottom: 15px;" >
< div style = "margin-bottom: 15px;" >
< label style = "display: block; margin-bottom: 5px;" > Comandos Globales de Calibración:< / label >
< 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,?')"
< 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 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 >
< / div >
< div style = "background-color: #f5f5f5; padding: 15px; border-radius: 4px;" >
< div style = "background-color: #f5f5f5; padding: 15px; border-radius: 4px;" >
< h4 style = "margin-top: 0; color: #333;" > Calibración Multipunto< / h4 >
< h4 style = "margin-top: 0; color: #333;" > Calibración Multipunto< / h4 >
< p style = "font-size: 0.9em; color: #666;" > Ingresa el valor de referencia físico (ej. solución pH, o temperatura del agua).< / p >
< 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;" >
< 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;" >
< input type = "number" id = "cal-value" placeholder = "Ej: 7.00" step = "0.01"
< 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 >
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 >