-
Notifications
You must be signed in to change notification settings - Fork 0
Open
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels