Arduino-PID-Library icon indicating copy to clipboard operation
Arduino-PID-Library copied to clipboard

Modify the code (PID_v1.h) with these improvements for better efficiency

Open maphineth opened this issue 1 year ago • 0 comments

The file defines a PID class for a control system, including several functions and variables that handle PID calculations, configurations, and mode settings. It includes: - Constants for configuration. - Public methods for setting modes, computing PID outputs, setting output limits, tuning parameters, etc. - Private member variables for storing PID parameters and tracking the state.

I have modified the file to enhance its efficiency by: - Replacing #define macros with constexpr for better type safety. - Using initializer lists in constructors for improved performance. - Making getter methods inline to optimize frequently accessed functions. PID

maphineth avatar Nov 13 '24 21:11 maphineth