From 5acebbef9f8caee6d23b7d1183d18c7227bba782 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 1 Oct 2020 00:34:59 +0200 Subject: [PATCH] pytec: doc set_param --- README.md | 2 +- pytec/pytec/client.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ae41e3..fed7d7b 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ The scope of this setting is per TCP session. | `pid <0/1> integral_min ` | Set integral lower bound | | `pid <0/1> integral_max ` | Set integral upper bound | | `s-h` | Show Steinhart-Hart equation parameters | -| `s-h <0/1> ` | Set Steinhart-Hart parameter for a channel | +| `s-h <0/1> ` | Set Steinhart-Hart parameter for a channel | | `postfilter` | Show postfilter settings | | `postfilter <0/1> off` | Disable postfilter | | `postfilter <0/1> rate ` | Set postfilter output data rate | diff --git a/pytec/pytec/client.py b/pytec/pytec/client.py index 03014e7..0098386 100644 --- a/pytec/pytec/client.py +++ b/pytec/pytec/client.py @@ -131,6 +131,17 @@ class Client: pass def set_param(self, topic, channel, field="", value=""): + """Set configuration parameters + + Examples:: + tec.set_param("pwm", 0, "max_v", 2.0) + tec.set_param("pid", 1, "output_max", 2.5) + tec.set_param("s-h", 0, "t0", 20.0) + tec.set_param("center", 0, "vref") + tec.set_param("postfilter", 1, 21) + + See the firmware's README.md for a full list. + """ if type(value) is float: value = "{:f}".format(value) if type(value) is not str: