summaryrefslogtreecommitdiffstats
path: root/pid/fancontroller.cpp
Commit message (Collapse)AuthorAgeFilesLines
* rename away from RPMPatrick Venture2019-07-161-1/+1
| | | | | | | | | | 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
* 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
* add tuning enable variablePatrick Venture2019-02-281-6/+8
| | | | | | | | | | | 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>
* DBusConfiguration: Fix scalingJames Feist2019-02-151-6/+0
| | | | | | | | | | | | Revert the removal of the /100 because that caused 90% to be passed as 90 instead of .9. To counter-act this multiply the stepwise controller by 100 so that setting 50 is 50%. Tested-by: Used sensor override to make stepwise jump threshold and got desired pwm result. Change-Id: I629bf0d4b0b3bc77660c09fccae82b1bdac4c578
* [dbus-configuration] Back out divide by 100James Feist2019-02-041-0/+6
| | | | | | | | | | In the entity-manager configuration files having a outlimitmax of 10000 is confusing as this looks like a tach reading, but is actually 100 percent * 100. Back this out when dealing with dbusconfiguration. Change-Id: I13609573fcf1c9da50afd270ea9aad0411b5768b Signed-off-by: James Feist <james.feist@linux.intel.com>
* Move all floats to doublesPatrick Venture2018-11-111-8/+8
| | | | | | | | | 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-8/+8
| | | | | | | 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/+2
| | | | | | | | | 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/+2
| | | | | | | Apply const to read-only iterators to indicate intent more clearly. Change-Id: Ic14304c69361da203d3d3a900180bd54346acc87 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: reduce scope of variablesPatrick Venture2018-10-131-8/+1
| | | | | | | Various things caught by cppcheck that are non-critical. Change-Id: I495453c84bc15788b85036a163ee36b0ac601fa1 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-08-311-10/+9
| | | | | Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f Signed-off-by: Patrick Venture <venture@google.com>
* test: pid: fancontrollerPatrick Venture2018-06-221-0/+6
| | | | | | | | | Adds unit-tests for the fancontroller. Bugfix: set point not initialized to 0, although bug has no impact. Tested: Ran on quanta-q71l board and it behaved as expected. Change-Id: I516833d8c9ed806b765ff9333801f3d57932a17b 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-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>
* fancontroller: remove percentage log entryPatrick Venture2018-06-011-4/+0
| | | | | | | | | This log entry was just to debug something and also didn't have a corresponding header in the log file. It is no longer necessary. Tested: Ran on quanta-q71l and verified the log looked as expected. Change-Id: I4a433cf8181c7d28977bf60ca932d25a4b307c84 Signed-off-by: Patrick Venture <venture@google.com>
* PID Objects & AlgoPatrick Venture2018-03-081-0/+146
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