Skip to content

Commit

Permalink
Extend documentation of klippy:connect and klippy:read event handlers.
Browse files Browse the repository at this point in the history
Signed-off-by: Rolf Schäuble <[email protected]>
  • Loading branch information
rschaeuble committed Oct 2, 2024
1 parent 96cceed commit 3cdb1d9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/Code_Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3cdb1d9

Please sign in to comment.