diff --git a/CraterLab_camera/.gitignore b/CraterLab_camera/.gitignore
index b9f3806..3b8da3a 100644
--- a/CraterLab_camera/.gitignore
+++ b/CraterLab_camera/.gitignore
@@ -1,2 +1,2 @@
.pio
-.vscode
+.vscode
\ No newline at end of file
diff --git a/CraterLab_camera/include/constants.h b/CraterLab_camera/include/constants.h
index ccab64e..2dca6da 100644
--- a/CraterLab_camera/include/constants.h
+++ b/CraterLab_camera/include/constants.h
@@ -38,5 +38,5 @@
#define sensor_lineal_motor A0
//Definicion de los limites del sensor lineal
-#define LINEAL_MAX 478
+#define LINEAL_MAX 4*478
#define LINEAL_MIN 0
\ No newline at end of file
diff --git a/CraterLab_camera/include/interface.html b/CraterLab_camera/include/interface.html
index ec74d9a..521a883 100644
--- a/CraterLab_camera/include/interface.html
+++ b/CraterLab_camera/include/interface.html
@@ -129,7 +129,8 @@ const char *htmlTemplate = R"rawliteral(
Motor Cámara
-
+
Counter
+
Speed
@@ -158,11 +159,11 @@ const char *htmlTemplate = R"rawliteral(
Shutter
Fade In/Out Frames:
-
% apertura inicial: 50
-
+
% apertura inicial: 0
+
-
Número de frames: 50
-
+
Número de frames: 10
+
Fade Activación:
Activar Fade In
@@ -403,7 +404,7 @@ const char *htmlTemplate = R"rawliteral(
document.getElementById('zoomSlider').addEventListener('input', updateDisplay);
document.getElementById('focusSlider').addEventListener('input', updateDisplay);
- // pide motorSpeed al M7
+ //pide motorSpeed al M7
function updateMotorSpeed() {
fetch('/motorSpeed')
.then(response => response.json())
@@ -413,6 +414,15 @@ const char *htmlTemplate = R"rawliteral(
.catch(error => console.error('Error al obtener motorSpeed:', error));
}
+ function updateFramesCount() {
+ fetch('/framesCount')
+ .then(response => response.json())
+ .then(data => {
+ document.getElementById('frames').value = data.framesCountRead;
+ })
+ .catch(error => console.error('Error al obtener numero de frames:', error));
+ }
+
function updatefadePosition() {
fetch('/fadePercent')
.then(response => response.json())
@@ -435,6 +445,9 @@ const char *htmlTemplate = R"rawliteral(
if (sensorValues.length >= 2) {
document.getElementById('fade').value = sensorValues[1];
}
+ if (sensorValues.length >= 3) {
+ document.getElementById('frames').value = sensorValues[2];
+ }
} else {
console.error('Estructura inesperada:', data);
}
@@ -443,7 +456,7 @@ const char *htmlTemplate = R"rawliteral(
}
// Llama a updateSensors cada 500ms
- setInterval(updateSensors, 500);
+ setInterval(updateSensors, 100);