From d6d02f4732c3c7a3d77301e951351708e4c73f44 Mon Sep 17 00:00:00 2001 From: William Emfinger Date: Sat, 28 Feb 2026 14:50:30 -0600 Subject: [PATCH 1/2] fix(lib): Remove duplicate method binding (instance/static) from python lib for task --- lib/python_bindings/espp/__init__.pyi | 41 +++++++-------------------- lib/python_bindings/pybind_espp.cpp | 9 ++---- 2 files changed, 14 insertions(+), 36 deletions(-) diff --git a/lib/python_bindings/espp/__init__.pyi b/lib/python_bindings/espp/__init__.pyi index b7f0b6bf3..97d9d12d4 100644 --- a/lib/python_bindings/espp/__init__.pyi +++ b/lib/python_bindings/espp/__init__.pyi @@ -759,6 +759,17 @@ class Logger: pass + + def get_verbosity(self) -> Logger.Verbosity: + """* + * @brief Get the current verbosity for the logger. + * @return The current verbosity level. + * \sa Logger::Verbosity + * + + """ + pass + def set_verbosity(self, level: Logger.Verbosity) -> None: """* * @brief Change the verbosity for the logger. \sa Logger::Verbosity @@ -2148,36 +2159,6 @@ class Pid: pass - def set_config(self, config: Pid.Config, reset_state: bool = True) -> None: - """* - * @brief Change the gains and other configuration for the PID controller. - * @param config Configuration struct with new gains and sampling time. - * @param reset_state Reset / clear the PID controller state. - - """ - pass - - def clear(self) -> None: - """* - * @brief Clear the PID controller state. - - """ - pass - - def update(self, error: float) -> float: - """* - * @brief Update the PID controller with the latest error measurement, - * getting the output control signal in return. - * - * @note Tracks invocation timing to better compute time-accurate - * integral/derivative signals. - * - * @param error Latest error signal. - * @return The output control signal based on the PID state and error. - - """ - pass - def __call__(self, error: float) -> float: """* * @brief Update the PID controller with the latest error measurement, diff --git a/lib/python_bindings/pybind_espp.cpp b/lib/python_bindings/pybind_espp.cpp index e579b8a35..8b40a2e23 100644 --- a/lib/python_bindings/pybind_espp.cpp +++ b/lib/python_bindings/pybind_espp.cpp @@ -421,6 +421,9 @@ void py_init_module_espp(py::module &m) { } // end of inner classes & enums of Logger pyClassLogger.def(py::init()) + .def("get_verbosity", &espp::Logger::get_verbosity, + "*\n * @brief Get the current verbosity for the logger.\n * @return The current " + "verbosity level.\n * \\sa Logger::Verbosity\n *\n") .def("set_verbosity", &espp::Logger::set_verbosity, py::arg("level"), "*\n * @brief Change the verbosity for the logger. \\sa Logger::Verbosity\n * " "@param level new verbosity level\n") @@ -2129,12 +2132,6 @@ void py_init_module_espp(py::module &m) { "*\n * @brief Get the ID for this Task's thread / task context.\n * @return ID for " "this Task's thread / task context.\n * @warning This will only return a valid id if " "the task is started.\n") - .def_static("get_id", py::overload_cast(&espp::Task::get_id), - py::arg("task"), - "*\n * @brief Get the ID for the Task's thread / task context.\n * @param " - "task Reference to the task for which you want the ID.\n * @return ID for this " - "Task's thread / task context.\n * @warning This will only return a valid id " - "if the task is started.\n") .def_static("get_current_id", &espp::Task::get_current_id, "*\n * @brief Get the ID for the current thread / task context.\n * @return " "ID for the current thread / task context.\n"); From 688b382b5226494d278fab2e63922149787d9c34 Mon Sep 17 00:00:00 2001 From: William Emfinger Date: Sat, 28 Feb 2026 14:58:39 -0600 Subject: [PATCH 2/2] add back removed stubs --- lib/python_bindings/espp/__init__.pyi | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lib/python_bindings/espp/__init__.pyi b/lib/python_bindings/espp/__init__.pyi index 97d9d12d4..2794ffa61 100644 --- a/lib/python_bindings/espp/__init__.pyi +++ b/lib/python_bindings/espp/__init__.pyi @@ -2158,6 +2158,35 @@ class Pid: """Auto-generated default constructor with named params""" pass + def set_config(self, config: Pid.Config, reset_state: bool = True) -> None: + """* + * @brief Change the gains and other configuration for the PID controller. + * @param config Configuration struct with new gains and sampling time. + * @param reset_state Reset / clear the PID controller state. + + """ + pass + + def clear(self) -> None: + """* + * @brief Clear the PID controller state. + + """ + pass + + def update(self, error: float) -> float: + """* + * @brief Update the PID controller with the latest error measurement, + * getting the output control signal in return. + * + * @note Tracks invocation timing to better compute time-accurate + * integral/derivative signals. + * + * @param error Latest error signal. + * @return The output control signal based on the PID state and error. + + """ + pass def __call__(self, error: float) -> float: """*