Skip to content

Release 0.3.0: SimpleLineGraph, enum-class migration, examples, cleanup#8

Draft
jonfroehlich wants to merge 2 commits into
mainfrom
feature/simple-line-graph
Draft

Release 0.3.0: SimpleLineGraph, enum-class migration, examples, cleanup#8
jonfroehlich wants to merge 2 commits into
mainfrom
feature/simple-line-graph

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

0.3.0 — SimpleLineGraph, enum-class migration, examples, and cleanup

⚠️ Draft / do not merge yet. Holding for end-to-end hardware validation
on an Uno + OLED. All 13 examples are confirmed to compile on
arduino:avr:uno; runtime behavior is verified by the checklist in
docs/HARDWARE_TEST_PLAN.md. Once that passes,
mark ready and merge, then tag v0.3.0.

Highlights

  • New SimpleLineGraph — the simplest, non-scrolling graph (persistent
    canvas, vertical bars, restarts at x=0; keeps no history buffer).
  • 7 new examples covering previously-uncovered classes: SimpleLineGraphA0,
    ScrollingLineGraphA0, ScrollingLineGraphTwoInputs, ButtonBasic,
    SmoothAnalogInput, ClosestColorMatch, ListSdFiles.
  • Button quality pass — added wasReleased() / wasJustPressed() edge
    detectors, fixed a real -Wreorder warning, documented the debounce strategy.

⚠️ Breaking changes

  • The four public enums are now enum class (ShapeType, PointSymbol,
    JoystickYDirection, GraphPrimitive). Enumerators must be qualified —
    e.g. JoystickYDirection::RIGHT, PointSymbol::CIRCLE. This fixes a latent
    CIRCLE/TRIANGLE collision between ShapeType and PointSymbol that broke
    compilation when Shape.hpp and a graph header were included together.
  • Removed LineGraph.hpp / MultiValueScrollingLineGraph — a superseded,
    unused draft (strict subset of ScrollingLineGraphMultiValue). Verified zero
    consumers in this repo and in makeabilitylab/arduino.

Fixes & housekeeping

  • ScrollingLineGraphMultiValue deletes its copy ctor/assignment (owns heap;
    prevents double-free).
  • Size guards on MovingAverageFilter and ScrollingLineGraph.
  • Standardized on bool (over boolean) and nullptr (over NULL).
  • Shape::distance() uses integer multiplication instead of pow(x, 2).
  • Removed dead code / commented-out debug prints; filled doc stubs; aligned
    example author footers.
  • Added CHANGELOG.md, docs/HARDWARE_TEST_PLAN.md, CLAUDE.md; CI installs
    the SD library.

Issues

🤖 Generated with Claude Code

jonfroehlich and others added 2 commits June 26, 2026 08:41
Features
- Add SimpleLineGraph: simplest non-scrolling graph (persistent canvas,
  vertical bars, restarts at x=0). No history buffer.
- Add 7 examples covering previously-uncovered classes: SimpleLineGraphA0,
  ScrollingLineGraphA0, ScrollingLineGraphTwoInputs, ButtonBasic,
  SmoothAnalogInput, ClosestColorMatch, ListSdFiles.

Breaking
- Scope all four public enums as enum class (ShapeType, PointSymbol,
  JoystickYDirection, GraphPrimitive). Enumerators must now be qualified
  (e.g. JoystickYDirection::RIGHT). Fixes a latent CIRCLE/TRIANGLE collision
  between ShapeType and PointSymbol when Shape.hpp and a graph header were
  included together.
- Remove LineGraph.hpp / MultiValueScrollingLineGraph (superseded, unused;
  strict subset of ScrollingLineGraphMultiValue).

Fixes
- ScrollingLineGraphMultiValue now deletes its copy ctor/assignment
  (owns heap memory; prevents double-free on copy).
- Guard MovingAverageFilter and ScrollingLineGraph against non-positive sizes.

Housekeeping
- Standardize on bool (over boolean) and nullptr (over NULL).
- Shape::distance uses integer multiplication instead of pow(x, 2).
- Remove dead code and commented-out debug prints; fill doc stubs.
- Align example author footers to the shared convention.
- Add CHANGELOG.md, docs/HARDWARE_TEST_PLAN.md, and CLAUDE.md.
- CI installs the SD library (for the FileUtils example).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…bounce

- Reorder constructor initializer list to declaration order (fixes a real
  -Wreorder warning; no behavior change). Verified warning-clean under
  --warnings all.
- Add wasReleased() and wasJustPressed() edge detectors. The legacy
  wasPressed() (which actually fires on RELEASE) is kept for backwards
  compatibility — it now delegates to wasReleased() and is documented as
  release-firing. Several arduino-repo sketches depend on wasPressed(), so
  it is intentionally not renamed.
- Add symmetric timeSinceLastRead() / lastReadTimestamp() so _lastReadTimestamp
  is no longer write-only dead state.
- Read pins explicitly with (digitalRead(pin) == HIGH).
- Document the lockout debounce strategy and its tradeoff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize bool vs boolean and NULL vs nullptr across the library Add example sketches for classes that lack them (also gives them CI coverage)

1 participant