summaryrefslogtreecommitdiffstats
path: root/pid/builder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Expand conf namespaceJames Feist2019-02-261-4/+4
| | | | | | | | | Put rest of conf.hpp in the conf namespace. This is largely a sed replace, and wrapping from_json in conf namespace as it failed to build. Change-Id: I9fe5c7b2fface44618c43af2367035afc39bcb64 Signed-off-by: James Feist <james.feist@linux.intel.com>
* s/minThermalRPM/minThermalOutputJames Feist2019-02-261-1/+1
| | | | | | | | | | The minThermalRPM is only an RPM by the fact that that is the units of the PID. As the PID units can be anything, change this to minThermalOutput to allow for different units (i.e. percent). Change-Id: Ic53fef1159ade5a413e5d519d407947f3023d8e3 Signed-off-by: James Feist <james.feist@linux.intel.com>
* conf change: rename zone variablesPatrick Venture2019-02-111-2/+2
| | | | | | | | | | | Rename the zone variables to make them camelCase as a step towards making all configuration variables camelCase for consistency. Note: This patchset requires a change to your yaml configuration if you're using it, or libconfig if you're using it. Change-Id: If9cf1d7eb8227d305a1625275f2f7082c0d6905a Signed-off-by: Patrick Venture <venture@google.com>
* pid: add helper methods for thermal controller typesPatrick Venture2018-11-151-12/+2
| | | | | | | | | Add helper methods for thermal controller types, such as checking if a string is a supported thermal type and which type that string corresponds to. Change-Id: I3c782f5825e7726f264dd186df583bde0a0dc861 Signed-off-by: Patrick Venture <venture@google.com>
* Allow multiple inputs to thermal and stepwise controllersJames Feist2018-11-151-1/+12
| | | | | | | | | | | | | Use std::max to determine which input value to apply. Also start throwing when inputs are empty as otherwise there will be a nullptr dereference. Tested-by: Added multiple inputs and application no longer segfaults and verifed max was being used. Also added unit tests. Change-Id: I7c8eda45b99247b8e92e629f036c9a46c98d9fe2 Signed-off-by: James Feist <james.feist@linux.intel.com>
* style: s/getZoneId/getZoneID/gPatrick Venture2018-10-301-1/+1
| | | | | | | | Acronyms are meant to be in the same case within their part of the camel case name. Change-Id: I9e55d4419617a35b0f3a85f3d55543c8fc9bd76f Signed-off-by: Patrick Venture <venture@google.com>
* style: function names should be lower camelPatrick Venture2018-10-301-3/+3
| | | | | | | Fix function names to be lower camel. Change-Id: I145e1f4c03d7740bc1525dcffbdce2f78fd61075 Signed-off-by: Patrick Venture <venture@google.com>
* style: member functions should be lower camelPatrick Venture2018-10-301-3/+3
| | | | | | | Rename member functions to be lower camel instead of snake case. Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5 Signed-off-by: Patrick Venture <venture@google.com>
* style: fixup naming of structuresPatrick Venture2018-10-301-3/+3
| | | | | | | Fixup naming of structures to UpperCamel. Change-Id: I6a9bf0b954298089c85d3362e86cd95b3fc5b944 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: rename variable per openbmc stylePatrick Venture2018-10-231-2/+2
| | | | | | | Rename PIDConfig to pidConfig per OpenBMC style guide. Change-Id: I41c431b7162af6c49f4a43adb548f0b6ed04e3dc Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: apply constness to read-only iteratorsPatrick Venture2018-10-231-8/+8
| | | | | | | Apply const to read-only iterators to indicate intent more clearly. Change-Id: Ic14304c69361da203d3d3a900180bd54346acc87 Signed-off-by: Patrick Venture <venture@google.com>
* Add stepwise controllerJames Feist2018-09-121-2/+16
| | | | | | | | | | | | | | | This adds the ability to use stepwise curves alongside pid control. This creates a base controller class that pidcontroller and stepwise controller inherit from. Note: Hysteresis to come in follow-on patch Tested-by: Created a stepwise controller and noticed that when it crossed a threshold that it contributed to the pwm setting. Change-Id: I6cf842f80eaccafc905d620970afe91e2092d568 Signed-off-by: James Feist <james.feist@linux.intel.com>
* add .clang-formatPatrick Venture2018-08-311-26/+14
| | | | | Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com>
* pid: zone split out buildersPatrick Venture2018-06-141-0/+133
To enable unit-testing, split the builders into their own object files. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I92168ec9ae4946d12328e9c0b94a36bb89d0f718 Signed-off-by: Patrick Venture <venture@google.com>
OpenPOWER on IntegriCloud