Open-Acidification / Open-Acidification/TankControllerPico
PID Class Implementation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- Avg merge
- 2h 22m
- Merged PRs (30d)
- 2
Description
The PID class provides a wrapper around the Arduino PID_v1 library. This issue outlines the work needed to complete functionality, improve maintainability, and ensure correct behavior across the device.
Goals
- Fully validate and refine PID functionality provided by PID_TC.
- Ensure proper handling of tunings, modes, and computation flow.
- Confirm compatibility with the Arduino PID_v1 library and target MCU constraints (e.g., 4-byte double on Mega2560).
- Review singleton implementation details for correctness and safety.
Reference: PID_TC Public Operations
computeOutput()
getKd()
getKi()
getKp()
getMode()
logToSerial()
setKd()
setKi()
setKp()
setTunings()
Singleton lifecycle:
instance()
reset()
Internal/Private Components for Review
- Constructor / destructor correctness
input,output, andset_pointvariable handling- PID window size management (
WINDOW_SIZE) - Proper initialization and ownership of the
PID* pPIDinstance - Type limitations on AVR (double being 4 bytes) and impact on tuning precision
Additional Items for Refinement
- Ensure
computeOutput()correctly updatesinput,set_point, andoutputbefore/after PID calculation - Validate PID mode transitions (Automatic vs. Manual)
- Evaluate logging strategy in
logToSerial() - Confirm singleton memory handling and test behavior (
reset() vs. destructor)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PID_TC public operations and its PID_v1 integration, then trace computeOutput(), tuning and mode methods, and the instance()/reset() lifecycle. Review the constructor, destructor, PID* ownership, window sizing, and AVR numeric constraints. Done means the listed operations and singleton lifecycle are validated across the stated modes, calculations, memory behavior, and target MCU constraints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100