summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-03-08 15:36:53 -0800
committerPatrick Venture <venture@google.com>2018-03-08 15:36:53 -0800
commite620656cf1761bb2d997a4d249b6c18d059ffb81 (patch)
treea5da99bc21bd3ebdcdd22052340d5bf7763efe1c /examples
parent391b8b0fc41891b5d1c2ccfb997ef53133092302 (diff)
downloadphosphor-pid-control-e620656cf1761bb2d997a4d249b6c18d059ffb81.tar.gz
phosphor-pid-control-e620656cf1761bb2d997a4d249b6c18d059ffb81.zip
Scripts and main daemon
This includes the scripts for the YAML parsing and the main execution point. Change-Id: If42154c621353b23370b63d4e58f6c75bca8b356 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/set-point1
-rw-r--r--examples/swampd.conf97
2 files changed, 98 insertions, 0 deletions
diff --git a/examples/set-point b/examples/set-point
new file mode 100644
index 0000000..a77fd92
--- /dev/null
+++ b/examples/set-point
@@ -0,0 +1 @@
+6000
diff --git a/examples/swampd.conf b/examples/swampd.conf
new file mode 100644
index 0000000..c17a75c
--- /dev/null
+++ b/examples/swampd.conf
@@ -0,0 +1,97 @@
+
+sensors = (
+ { name = "fan1"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan1"
+ writepath = "/sys/class/hwmon/hwmon0/pwm0"
+ min = 0
+ { name = "fan2"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan2"
+ writepath = "/sys/class/hwmon/hwmon0/pwm1"
+ min = 0
+ max = 255
+ timeout = 0 },
+ { name = "fan3"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan3"
+ writepath = "/sys/class/hwmon/hwmon0/pwm2"
+ min = 0
+ max = 255
+ timeout = 0 },
+ { name = "fan4"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan4"
+ writepath = "/sys/class/hwmon/hwmon0/pwm3"
+ min = 0
+ max = 255
+ timeout = 0 },
+ { name = "fan5"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan5"
+ writepath = ""
+ min = 0
+ max = 0
+ timeout = 0 },
+ { name = "fan6"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan6"
+ writepath = ""
+ min = 0
+ max = 0
+ timeout = 0 },
+ { name = "fan7"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan7"
+ writepath = ""
+ min = 0
+ max = 0
+ timeout = 0 },
+ { name = "fan8"
+ type = "fan"
+ readpath = "/xyz/openbmc_project/sensors/fan_tach/fan8"
+ writepath = ""
+ min = 0
+ max = 0
+ timeout = 0 }
+);
+
+zones = (
+ { id = 0x01
+ minthermalrpm = 3000.0
+ failsafepwm = 90.0
+ pids = (
+ { name = "allfans"
+ type = "fan"
+ inputs = (
+ "fan1",
+ "fan2",
+ "fan3",
+ "fan4",
+ "fan5",
+ "fan6",
+ "fan7",
+ "fan8"
+ )
+ set-point = 90.0
+ pid = {
+ sampleperiod = 0.1
+ p_coefficient = 0.01
+ i_coefficient = 0.001
+ ff_off_coefficient = 0.0
+ ff_gain_coefficient = 0.0
+ i_limit = {
+ min: 0.0
+ max: 100.0
+ }
+ out_limit = {
+ min: 0.0
+ max: 100.0
+ }
+ slew_neg = 0.0
+ slew_pos = 0.0
+ }
+ }
+ )
+ }
+);
OpenPOWER on IntegriCloud