summaryrefslogtreecommitdiffstats
path: root/pid/thermalcontroller.cpp
Commit message (Collapse)AuthorAgeFilesLines
* rename RPMSetPoint to SetPointPatrick Venture2019-07-161-1/+1
| | | | | | | | | | | The PIDs were originally focused on collecting RPM set points from thermal PIDs and then having fan PIDs use the highest value collected, it doesn't need to be strictly an RPM set point. It does however need to be one type of value. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I1d589cf4b2688d7e86030c10496d737dc5bbdadf
* pid: add helper methods for thermal controller typesPatrick Venture2018-11-151-0/+14
| | | | | | | | | 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-9/+24
| | | | | | | | | | | | | 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-7/+7
| | | | | | | | | 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: function names should be lower camelPatrick Venture2018-10-301-1/+1
| | | | | | | 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-7/+7
| | | | | | | 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-2/+3
| | | | | | | | | 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-1/+1
| | | | | | | Apply const to read-only iterators to indicate intent more clearly. Change-Id: Ic14304c69361da203d3d3a900180bd54346acc87 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-08-311-8/+4
| | | | | Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com>
* test: pid: thermalcontrollerPatrick Venture2018-06-221-0/+6
| | | | | | | | | | | | Tests for the pid/thermalcontroller module. Fixes a bug where one could pass an incorrect number of inputs to the thermalcontroller. This can still be side-stepped by calling the constructor directly. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I3153ae4d907d9f90787b03e9d013d4349d911948 Signed-off-by: Patrick Venture <venture@google.com>
* test: pid: zonePatrick Venture2018-06-221-1/+1
| | | | | | | | | | 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-1/+1
| | | | | | | | | | 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/+76
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