summaryrefslogtreecommitdiffstats
path: root/pid/thermalcontroller.hpp
Commit message (Collapse)AuthorAgeFilesLines
* conf change: s/set-point/setpoint/Patrick Venture2019-02-111-1/+1
| | | | | | | Remove the dash from set-point, such that it's one word: setpoint. Change-Id: I4c3033f3c2432a53d850e8f5defbe2ac1510daf8 Signed-off-by: Patrick Venture <venture@google.com>
* pid: add helper methods for thermal controller typesPatrick Venture2018-11-151-0/+16
| | | | | | | | | 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-3/+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>
* Move all floats to doublesPatrick Venture2018-11-111-5/+5
| | | | | | | | | The code was developed initially around a pid loop implemented using floats. Therefore, the code was converting back and forth between double for sensor values as inputs and outputs from this PID loop. Change-Id: I2d2919e1165103040729c9f16bb84fde3dd6b81b Signed-off-by: Patrick Venture <venture@google.com>
* style: member functions should be lower camelPatrick Venture2018-10-301-4/+4
| | | | | | | Rename member functions to be lower camel instead of snake case. Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: move from copy and pointer to just const referencePatrick Venture2018-10-231-1/+1
| | | | | | | | | Originally code passed the object by value, and then later by pointer to that copy. Convert the code to be more performant by using a const reference at all layers of access for this object. Change-Id: Icdf0dfdb54d8adc29af4d05d841533626a484921 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: apply constness to read-only iteratorsPatrick Venture2018-10-231-2/+3
| | | | | | | 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-1/+1
| | | | | | | | | | | | | | | 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/+22
| | | | | Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com>
* test: pid: zonePatrick Venture2018-06-221-2/+2
| | | | | | | | | | Add unit-tests for the PID zone module. Add zone_mock. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I51185b2d2daacea6ffb687e8f38c4fe2b2a1bed3 Signed-off-by: Patrick Venture <venture@google.com>
* pid: zone split out buildersPatrick Venture2018-06-141-2/+2
| | | | | | | | | | 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>
* PID Objects & AlgoPatrick Venture2018-03-081-0/+39
These are the PID controller implementations for fans, and thermals. This also includes the PID algorithm used. Change-Id: I30471fbf7a8a7ed65f78bf105970d62815fedc56 Signed-off-by: Patrick Venture <venture@google.com>
OpenPOWER on IntegriCloud