summaryrefslogtreecommitdiffstats
path: root/pid/zone.hpp
Commit message (Collapse)AuthorAgeFilesLines
* rename away from RPMPatrick Venture2019-07-161-6/+6
| | | | | | | | | | The SetPoint output from a thermal PID is likely RPM, and that value is then fed into a fan controller PID as the set-point (unit: RPM). This does not have to be RPM, however. Continue renaming variables and methods to remove the explicit unit-naming. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I570dee0c688338f9a458cac7123314717bee2b42
* rename RPMSetPoint to SetPointPatrick Venture2019-07-161-4/+4
| | | | | | | | | | | 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
* explicitly expect a directory for loggingPatrick Venture2019-05-081-1/+1
| | | | | | | | Verify the logging parameter is explicitly a directory. Treat the path as a directory for creating the logging files. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I84d6be79780df3f52deeb1ff1b7a50de6175c055
* split parameters for logging and tuningPatrick Venture2019-05-081-2/+2
| | | | | | | | | add a flag to enable/disable tuning: default off add an option for specifying a folder for outputting logs. Closes: #10 Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I43864768f1dee8672f13288d3cf5a0c87c373aed
* pid: zone: add zone id to log namePatrick Venture2019-03-181-1/+1
| | | | | | | | When a log path is provided, append the zone id to the log so that each zone will have its own log file. Change-Id: I56f92669eda23148127f53fd50e119912a24200b Signed-off-by: Patrick Venture <venture@google.com>
* add tuning enable variablePatrick Venture2019-02-281-7/+5
| | | | | | | | | | | Add a variable that when set, enables tuning logging. This variable is set to false. Tuning can be enabled via "-t" "--tuning" on the command line. With a parameter is the path where to write the logging information. Change-Id: I6eb8035d56cc3301face21e9375c02fc9fcc5b31 Signed-off-by: Patrick Venture <venture@google.com>
* s/minThermalRPM/minThermalOutputJames Feist2019-02-261-3/+4
| | | | | | | | | | 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>
* stepwise: Add ceiling typeJames Feist2019-02-261-0/+4
| | | | | | | | | | | Add a stepwise ceiling type, this is used as a upper clipping curve to limit the max output based on a temperature sensor. This is commonly used for quiet fan mode where CPU throttling is allowed to preserve a max fan noise. Change-Id: I181d5913c92e5498a34e6d3f67cf99b67471479c Signed-off-by: James Feist <james.feist@linux.intel.com>
* Move all floats to doublesPatrick Venture2018-11-111-12/+12
| | | | | | | | | 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: s/getMinThermalRpmSetPt/getMinThermalRPMSetpoint/gPatrick Venture2018-10-301-1/+1
| | | | | | | Rename method per openbmc style guide. Change-Id: Ia861028452020ccefd463415093b5fb11f929ea4 Signed-off-by: Patrick Venture <venture@google.com>
* zone: use const reference consistentlyPatrick Venture2018-10-301-2/+2
| | | | | | | | | In this case, the string is copied and placed into the vector's pointer list, so it's not necessary to be passed by const reference. However, for consistency it's a harmless change. Change-Id: I5c02e98b4789e18bc9a6756bdd8c5184ad12a232 Signed-off-by: Patrick Venture <venture@google.com>
* performance: fixup missing const reference in zonePatrick Venture2018-10-301-2/+2
| | | | | | | | | Zone::getSensor is passed directly to the Sensor Manager getSensor which takes the parameter by reference. Make it use an explicit const reference at both layers. Change-Id: I4895ea2935d20b73b88d33972e44b9ac557cd988 Signed-off-by: Patrick Venture <venture@google.com>
* style: use system path for dbus headersPatrick Venture2018-10-301-1/+1
| | | | | | | Use system path for dbus headers. Change-Id: I08088eb0932de738fc410104c28847aaf78d95bd Signed-off-by: Patrick Venture <venture@google.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: member functions should be lower camelPatrick Venture2018-10-301-2/+2
| | | | | | | Rename member functions to be lower camel instead of snake case. Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5 Signed-off-by: Patrick Venture <venture@google.com>
* Add stepwise controllerJames Feist2018-09-121-4/+5
| | | | | | | | | | | | | | | 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-88/+78
| | | | | Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com>
* test: pid: zonePatrick Venture2018-06-221-7/+20
| | | | | | | | | | 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-11/+0
| | | | | | | | | | 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>
* enable unit-tests: enable for SensorManagerPatrick Venture2018-06-141-5/+5
| | | | | | | | | | | | | Enabled unit-tests in general for the project, and more specifically started with a benign construction test for the SensorManager object. Tested: Verified continues to build and link, and unit-test passes. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I4ad9a0c57efd0b9ccc37d26faa0cc1b82026b8d7 Signed-off-by: Patrick Venture <venture@google.com>
* s/Control.FanCtrl.Mode/Control.Mode/Patrick Venture2018-05-101-2/+2
| | | | | | | | The interface for a Mode is generic enough for objects beyond strictly fan control. Change-Id: I3cb7e7564f841e680dc34743908644be9639267d Signed-off-by: Patrick Venture <venture@google.com>
* PID Objects & AlgoPatrick Venture2018-03-081-0/+124
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