Skip to content

E4-5b (band 3): gps, imu, env and battery units #271

Closed

Description

@Strycher

Epic: #212 · Parent: #264 — band 3, second child. Created under the standing grant the owner gave on 2026-09-07; the composition is for review.

The four sensor domains, one unit each. They depend on the storage child only through fram.h (BSEC state and battery logging persist to FRAM) and settings.h (parseNMEA calls mktimeUTC).

unit owns functions
gps gpsData and the twelve GPS timing/debug flags (gpsBuffer, gpsBufferIndex, gpsDebugEnabled, gpsFirstFixTime, gpsFirstReceiveTime, gpsHadFirstFix, gpsHadFirstReceive, gpsLastByteTime, gpsSignalLostTime, gprmcFixThisCycle, lastRmcCycleTime, rtcSyncedFromGPS) initGPS, readGPS, nmeaParse, parseNMEA, getGpsAccuracyMeters
imu imuData, imuAvailable, magAvailable, lis, lsm, the twelve magnetometer calibration variables initIMU, readIMU, loadMagCal, saveMagCal, magLogPrintln
env envData, envSensor, bmeAvailable, sht4, shtData, shtAvailable, bsecState, bsecStateLoaded, bsecStateSaved, lastBsecStateSave initBME688, initSHT41, bsecDataCallback, readBME688, readSHT41, getIaqAccuracyText, getIaqQualityText, hPaToInHg, loadBsecState, saveBsecState, saveBsecToFRAM, loadBsecFromFRAM
battery battery, batteryAvailable initBattery, logBatteryToSD, logBatteryToFRAM, isBatteryConnected

Ten cut-set variables leave here: gpsData, imuData, imuAvailable, magAvailable, envData, bmeAvailable, shtData, shtAvailable, battery, batteryAvailable. The named structs from E4-1 (GPSData, IMUData, EnvData, SHTData) move into the unit headers.

Not moved: updateCompassData, updateEnvData, updateTelemetryData and the OLED draw functions consume this state; they are screens (band 4). logWeatherReading reads three of these domains and belongs to the weather child.

Acceptance

  • scripts/verify_extraction.py PASS for the task
  • Both toolchains build; pytest scripts/ passes
  • nm on src.ino.cpp.o no longer defines any variable the four units own
  • Record appended to docs/god-object-inventory.md

Activity

  1. Strycher commented on Sep 7, 2026

    @Strycher
    OwnerAuthor

    🤖 Auto-promoted to Ready — all dependencies resolved (#270 closed).

  2. added and removed
    board:todoBoard sync: Todo column
    board:readyBoard sync: Ready column
    on Sep 7, 2026
  3. added a commit that references this issue on Sep 7, 2026
  4. Strycher commented on Sep 7, 2026

    @Strycher
    OwnerAuthor

    Merged in #276 (e6465bb) under the owner's standing grant of 2026-09-07. Proof and the two diagnosis corrections are in docs/god-object-inventory.md section 11 and the PR body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions