From 3cdb1d95db7c4c9e0cddf150a2a249159dfc995d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rolf=20Sch=C3=A4uble?= Date: Wed, 2 Oct 2024 17:56:13 +0200 Subject: [PATCH] Extend documentation of klippy:connect and klippy:read event handlers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rolf Schäuble --- docs/Code_Overview.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Code_Overview.md b/docs/Code_Overview.md index 0e4836acf5ec..08291e6696ae 100644 --- a/docs/Code_Overview.md +++ b/docs/Code_Overview.md @@ -277,11 +277,15 @@ The following may also be useful: * klippy:connect - This event is generated after all printer objects are instantiated. It is commonly used to lookup other printer objects, to verify config settings, and to perform an initial - "handshake" with printer hardware. + "handshake" with printer hardware. + Event handlers may pause the reactor (e.g. due to asynchronous + communication with MCUs) and raise exceptions (e.g. for + configuration errors). * klippy:ready - This event is generated after all connect handlers have completed successfully. It indicates the printer is transitioning to a state ready to handle normal operations. Do not - raise an error in this callback. + raise an error or pause the reactor (e.g. communicating with an + MCU) in this callback. * If there is an error in the user's config, be sure to raise it during the `load_config()` or "connect event" phases. Use either `raise config.error("my error")` or `raise printer.config_error("my