Commit Graph

8 Commits

Author SHA1 Message Date
Kevin O'Connor 023a985bfc gcode_macro: Use deepcopy() on get_status() results
If a get_status() method returns a mutable object (such as a list or
dict) then it would be possible for a gcode command template to
incorrectly alter the program's internal state.  Perform a deepcopy()
operation on all get_status() return results to avoid that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-20 16:25:25 -05:00
Kevin O'Connor 568393c941 webhooks: Remove "method" parameter from webhook requests
Don't require or use the "method" parameter of requests.  This
simplifies the interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-16 13:20:25 -04:00
Arksine a31dd0ff0e query_endstops: register "query_endstops/status" endpoint
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-06-24 19:07:33 -04:00
Kevin O'Connor 7232014657 query_endstops: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:12 -04:00
Kevin O'Connor 64031ab3d7 gcode: Rename respond() to respond_raw()
Rename the method to make it more clear that it is a low-level call
that should be rarely used.

Also, change gcode_button.py, hall_filament_width_sensor.py, and
tsl1401cl_filament_width_sensor.py to use respond_info() instead of
respond_raw().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 15:54:18 -04:00
Kevin O'Connor 512ad4b3a4 query_endstops: Add get_status() method that reports the last query state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-12 19:32:48 -05:00
Kevin O'Connor b2c778b931 mcu: Integrate query_endstop_wait() into query_endstop()
There is no need to have two separate calls to query an endstop.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-10 10:43:20 -04:00
Kevin O'Connor 89835940f7 query_endstops: Move QUERY_ENDSTOP command to it own extras/ module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-16 10:06:30 -04:00