Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#6 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
arduino, cpp
Ambito
data, embedded-iot

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C++
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NorthernWidget/Okapi_Library

Tutte le issue di NorthernWidget/Okapi_Library

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.