File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,17 @@ class XBee {
826826 * XBee class, so there is no need to do so directly (though it should
827827 * not mess with this class if you do, it would only mean some callbacks
828828 * aren't called).
829+ *
830+ * Inside callbacks, you should generally not be blocking / waiting.
831+ * Since callbacks can be called from inside waitFor() and friends, a
832+ * callback that doesn't return quickly can mess up the waitFor()
833+ * timeout.
834+ *
835+ * Sending packets is not a problem inside a callback, but avoid
836+ * receiving a packet (e.g. calling readPacket(), loop() or waitFor()
837+ * and friends) inside a callback (since that would overwrite the
838+ * current response, messing up any pending callbacks and waitFor() etc.
839+ * methods already running).
829840 */
830841class XBeeWithCallbacks : public XBee {
831842public:
You can’t perform that action at this time.
0 commit comments