query_endstops: Add get_status() method that reports the last query state

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-02-12 19:11:40 -05:00
parent 4d9a36b34f
commit 512ad4b3a4
2 changed files with 11 additions and 3 deletions

View file

@ -175,6 +175,11 @@ The following are common printer attributes:
available temperature sensors by their full config section names,
e.g. `["extruder", "heater_bed", "heater_generic my_custom_heater",
"temperature_sensor electronics_temp"]`.
- `printer.query_endstops.last_query["<endstop>"]`: Returns True if
the given endstop was reported as "triggered" during the last
QUERY_ENDSTOP command. Note, due to the order of template expansion
(see above), the QUERY_STATUS command must be run prior to the macro
containing this reference.
The above list is subject to change - if using an attribute be sure to
review the [Config Changes document](Config_Changes.md) when upgrading