Skip to content

Commit 5980ab4

Browse files
authored
fix(lib): Remove duplicate method binding (instance/static) from python lib for task (#608)
* fix(lib): Remove duplicate method binding (instance/static) from python lib for task * add back removed stubs
1 parent 0cf67fa commit 5980ab4

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

lib/python_bindings/espp/__init__.pyi

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,17 @@ class Logger:
759759
pass
760760

761761

762+
763+
def get_verbosity(self) -> Logger.Verbosity:
764+
"""*
765+
* @brief Get the current verbosity for the logger.
766+
* @return The current verbosity level.
767+
* \sa Logger::Verbosity
768+
*
769+
770+
"""
771+
pass
772+
762773
def set_verbosity(self, level: Logger.Verbosity) -> None:
763774
"""*
764775
* @brief Change the verbosity for the logger. \sa Logger::Verbosity
@@ -2147,7 +2158,6 @@ class Pid:
21472158
"""Auto-generated default constructor with named params"""
21482159
pass
21492160

2150-
21512161
def set_config(self, config: Pid.Config, reset_state: bool = True) -> None:
21522162
"""*
21532163
* @brief Change the gains and other configuration for the PID controller.

lib/python_bindings/pybind_espp.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ void py_init_module_espp(py::module &m) {
421421
} // end of inner classes & enums of Logger
422422

423423
pyClassLogger.def(py::init<const espp::Logger::Config &>())
424+
.def("get_verbosity", &espp::Logger::get_verbosity,
425+
"*\n * @brief Get the current verbosity for the logger.\n * @return The current "
426+
"verbosity level.\n * \\sa Logger::Verbosity\n *\n")
424427
.def("set_verbosity", &espp::Logger::set_verbosity, py::arg("level"),
425428
"*\n * @brief Change the verbosity for the logger. \\sa Logger::Verbosity\n * "
426429
"@param level new verbosity level\n")
@@ -2129,12 +2132,6 @@ void py_init_module_espp(py::module &m) {
21292132
"*\n * @brief Get the ID for this Task's thread / task context.\n * @return ID for "
21302133
"this Task's thread / task context.\n * @warning This will only return a valid id if "
21312134
"the task is started.\n")
2132-
.def_static("get_id", py::overload_cast<const espp::Task &>(&espp::Task::get_id),
2133-
py::arg("task"),
2134-
"*\n * @brief Get the ID for the Task's thread / task context.\n * @param "
2135-
"task Reference to the task for which you want the ID.\n * @return ID for this "
2136-
"Task's thread / task context.\n * @warning This will only return a valid id "
2137-
"if the task is started.\n")
21382135
.def_static("get_current_id", &espp::Task::get_current_id,
21392136
"*\n * @brief Get the ID for the current thread / task context.\n * @return "
21402137
"ID for the current thread / task context.\n");

0 commit comments

Comments
 (0)