Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

setExtInt() must be called before begin() — undocumented ordering requirement causes silent CSV misalignment

Abierto
#6 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NorthernWidget/Okapi_Library

Todos los issues de NorthernWidget/Okapi_Library

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.