Skip to content

Commit fa08017

Browse files
committed
tunable: Add warnings about callback usage
1 parent a56077e commit fa08017

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

magicbot/magic_tunable.py

+8
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ class Component:
114114
@kP.set_callback
115115
def set_kP(self, value: float) -> None:
116116
self.pid.setP(value)
117+
118+
.. note::
119+
The callback will be called on the NetworkTables I/O thread
120+
(not the main robot thread).
121+
122+
.. warning::
123+
This only supports instance methods on the same object as the tunable.
124+
117125
"""
118126
self._update_cb = callback
119127

0 commit comments

Comments
 (0)