setExtInt() must be called before begin() — undocumented ordering requirement causes silent CSV misalignment
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- arduino, cpp
- Área
- data, embedded-iot
Línea de trabajo
Start by reading the implementations of begin(), setExtInt(), and getExtIntCount(), then trace how the SD-card header and data rows are assembled. Done means the ordering requirement is documented and enforced, or the header is rebuilt when needed, with ext-int values and CSV labels remaining aligned.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug
begin() checks ExtIntPin at call time to decide whether to append ext_int_header_entry to the log file header. If setExtInt() is called after begin() — a natural usage pattern, since setExtInt() is a public function with no documented ordering requirement — the interrupt itself works, but the header written to the SD card lacks the ext-int column label. Data rows will include the count value (appended by the user's Update() function via getExtIntCount()), producing silent CSV column misalignment from the first row onward.
Example
void setup() {
logger.begin("SensorData,"); // header written: "SensorData,..."
logger.setExtInt(2); // too late — ext_int column not in header
}
Every data row will have one extra column with no header, breaking downstream CSV parsing.
Fix
Either: (a) document that setExtInt() must be called before begin() (and enforce with an assert or early return in begin() if called afterward), or (b) separate header initialization from begin() so the header can be rebuilt when setExtInt() is called.
Severity
Medium — silent data integrity issue; no runtime error.
🤖 Generated with Claude Code
- Lenguaje dominante
- C++
- Estrellas
- 1
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NorthernWidget/Okapi_Library
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Todos los issues de NorthernWidget/Okapi_Library
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NVIDIA-RTX/NRI#277 ·
Los mantenedores suelen responder en 1 día
-
os:Linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
acceptable_buffer_backends: unknown backend names are silently ignoredPosiblemente ocupada @mini-1235 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
ros2/rmw_fastrtps#945 ·
Los mantenedores suelen responder en 1 día