| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It didn't make much sense to have the ILimit and OutLimit
be their own interface. Entity Manager change to be submitted
shortly.
Tested-By: Used configuration from review
https://gerrit.openbmc-project.xyz/#/c/12082/ and verified swampd
still controlled fans properly.
Change-Id: Id183cd09eba43f65fb80c9a4af7092f5e2e0cc08
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Before reading the message, check if there's an error. The bus call
will fail dramatically but differently than the message.
Change-Id: I3ab54cc4a4590e0cf5f3eb15dcbf045a7b8bd075
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: I979a1afd51cb51cc38506a12321bbc4cbab76b8c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Now sdbusplus call and call_noreply can throw an SdBusError exception.
This code changes from checking .is_method_error() to catching the
exception.
Issue: 4
Change-Id: I07bbe5dbbd91d72ca75eeb14861d56aae5f3afed
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: Id433d0ecc10c62807594b3a637e591045223faa6
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
To better match the defined openbmc style.
Change-Id: I27b8d9563b5b55a3b4150c1cc46caf40b482463d
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: I8633300650d1f40d9d5b880ebee3be51236db3c5
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Watch for dbus interface changes and stop the daemon
when they happen. Systemd should restart us if we have
the correct service file written.
Tested-by: Used new add object entity-manager interface
and noticed daemon restart when new config was added.
Change-Id: I708447dbb6ed2ab23b60036d310606ef7a1a7d3b
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Add support for reading sensors that produce a double
as the value. Use a visitor to pull out the sensor value
so type doesn't matter.
Change-Id: I37c05e7077ead6f3084ab9704a1b2c62becb5e19
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables building the OEM IPMI handler for fan control. This
includes the ability to set it in manual mode, or check if it's in
fail-sade mode.
Tested: Verified that using host-side tool I was able to get and set the
mode for a zone, as well as check if a zone had fallen into failsade
mode.
Change-Id: I995407c089610692c7f6442f6e22f76689f4da1c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
The script allows running different rpm set-points and verifying whether
the coefficients behave as intended.
Change-Id: I7bc2e5328299ee14349550edb119279c143f4a1b
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows configuration of PID control from dbus using
entity manager. Sample configuration will be pushed to
entity-manager repo shortly.
Tested-by: Used yaml configuration and dbus / entity-manager
based configuration and pid seemed to work the same.
Verified printout of configuration matched generated
cpp files.
Change-Id: Ia7b016e53262791ffcccdb9b21c1ccddae2926bc
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
Add initial unit-tests.
Change-Id: Id62894faf56a645dc44c51a173a67185ea5d9cd6
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Added basic unit-tests and added a factory for creating the
DbusPassive read interface so that it can be nicely error checked. This
is handled via a valid type check where the only valid types are 'fan'
and 'temp'.
Change-Id: I558ed09bf509d26f20c6e431bb0789074e9aa841
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
To make testing easier, the dbus objects now receive a
helper interface to use instead of calling into a helper module.
Tested: Ran on quanta-q71l board and it behaved as expected.
Change-Id: I2521d9c75aec76e92d2e26dc044d01011e44d552
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Moved the sensor value handler into a sub routine to enable testing.
Tested: Ran on quanta-q71l board and it behaved as expected.
Change-Id: I4873558cfc1a48a92fb60cd173dc69e237813683
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Update configure.ac and test/Makefile.am to properly handle
newer googletest, per gerrit/11203.
Change-Id: Idcef3d81ff834457fcdc6e0aa1be76b98c64b54c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
relocation R_X86_64_32 against `.bss' can not be used when making a
shared object.
Change-Id: I9ca43820c9644f4b238ac44f8eaac29c4b2fd52c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Start write tests and fix a missing header inclusion.
Change-Id: I4e56323f972b1358dc83a4cb61c25f98cda2a479
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Tests for sensors/host
Change-Id: I760825c666c711d6f9c394ceefe35f8151383785
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Adds a mock sensor for use in future tests, as well as
adds a unit-test to sensor_manager_unittest to check that the
type of a sensor added is not validated against anything.
Change-Id: I684ec71c02f427cfa7a414a6a4162beaba2269da
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Tests for pluggable sensors. Pluggable sensors themselves do nothing
but hold min/max values, and call into Read and Write interfaces.
Change-Id: I8991d22d77172fb9b2f897c02603e5ab5747ac12
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Comparing ReadReturns where we have perfect knowledge should just use
an equality operation.
Change-Id: I93ee5d911e2e1f15330734031666edb2c9ef5457
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To increase testability, split out the building of sensors
from the sensor manager. And this further splits out building
from a configuration file.
Tested: Verified code continued to build and link.
Tested: Ran on quanta-q71l board and it behaved as expected.
Change-Id: Ib63a11e1107b1864c3c370bba2bd9ef2effa42f3
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.
Change-Id: I1de3fdd00d0c132987b1eeb78b2945f30d3ab538
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
| |
Add controller mock.
Change-Id: I7341b26281571c91039f05e049cf54c50f9fccdb
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
The pluggable sensor object receives a reader and writer
interface. These are now mocked to enable some testing that
involves Pluggable Sensors.
Change-Id: If2d121ab47a2c044b0f3fd3465bfe45cf26c4f98
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
This CL simply enables unit-tests.
Change-Id: I4ea62005566e2aa42fc29258559654fe2745f726
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: I8cc427f5a99a11aaae0f18f0ddf5269e2142c33f
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Added unit test logs, etc, to .gitignore.
Change-Id: Iff5f70038a2de2f35015588150971eef46298088
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add more items to clean up git.
Change-Id: I5c99b15ebe21d248d0853d84a505605e1da9b9c3
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Tested: git status is cleaner.
Change-Id: I3629dc8195547215d28683957397fc99da132cc1
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Adds a comment for future clean-up where the code needs to
have a parameter removed to prevent an early call to emit_object_added
before the properties are properly configured.
Change-Id: I18f15e933a19793597e2cd3da183f33a94e7511c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
The tuning logging now includes the thermal inputs and whether
the zone is in failsafe mode.
Tested: Ran on quanta-q71l and verified the log looked correct.
Change-Id: I2ee8d3128d7d969e63cb6b8728dc6698a4f54aae
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: I2a6680a94ba32ca278263c641205c6546fb84120
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
The dbus interface can have new properties added, and
it's improbable to have the three we care about removed.
Therefore, let's remove the explicit count check on the
number of properties returned.
Change-Id: Ia292c73dc889a33a4b1f334585bbce910f20a580
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Variable became obsolete and was left in although unused.
Change-Id: I2953c1eea836fb96812a8834f1776aff16b76745
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
The pthread library is added to the appropriate places during
bitbake but not autotools, which hid this issue.
Change-Id: I7aa250e382a447c41f9484822a1d19030d5fb872
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Phosphor-pid-control uses libconfig++ at present for run-time
configuration parsing. Therefore it should verify its presence.
Change-Id: Ia5819750aa74963746461518786f1dcf6c04a556
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Disable the OEM IPMI library until an OEM registration is
available.
Change-Id: I64f657224879eba71cec2778f6f6a6abd81cee5b
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: Ie70bda87dbc23121b0b5967a64bb1b5aa5a35ba6
Signed-off-by: Patrick Venture <venture@google.com>
|