aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/mcu.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-03-19 10:48:33 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-03-19 10:48:33 -0400
commit746a378c185473e189cae987e991238fa8ac4b7b (patch)
treed9e86e7819f8f6b4268c9e4b537a8b6f424bfbef /klippy/mcu.py
parentea0f2313432d2d9afa82835c34ebf5fa8b525622 (diff)
downloadkutter-746a378c185473e189cae987e991238fa8ac4b7b.tar.gz
kutter-746a378c185473e189cae987e991238fa8ac4b7b.tar.xz
kutter-746a378c185473e189cae987e991238fa8ac4b7b.zip
endstop: Use "pin_value" instead of "pin" when querying endstop state
Now that enumerations are available, any variable named "pin" can only be used to describe a gpio pin. Rename the end_stop_state "pin" parameter to "pin_value". Also, rename "end_stop_query" command to "end_stop_query_state" to notify users to upgrade both host and mcu code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/mcu.py')
-rw-r--r--klippy/mcu.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/mcu.py b/klippy/mcu.py
index a5b97557..3414ede5 100644
--- a/klippy/mcu.py
+++ b/klippy/mcu.py
@@ -175,8 +175,8 @@ class MCU_endstop:
self._home_cmd = self._mcu.lookup_command(
"end_stop_home oid=%c clock=%u sample_ticks=%u sample_count=%c"
" rest_ticks=%u pin_value=%c", cq=cmd_queue)
- self._query_cmd = self._mcu.lookup_command("end_stop_query oid=%c",
- cq=cmd_queue)
+ self._query_cmd = self._mcu.lookup_command(
+ "end_stop_query_state oid=%c", cq=cmd_queue)
self._mcu.register_msg(self._handle_end_stop_state, "end_stop_state"
, self._oid)
def home_prepare(self):
@@ -238,7 +238,7 @@ class MCU_endstop:
eventtime = self._mcu.monotonic()
while self._check_busy(eventtime):
eventtime = self._mcu.pause(eventtime + 0.1)
- return self._last_state.get('pin', self._invert) ^ self._invert
+ return self._last_state.get('pin_value', self._invert) ^ self._invert
class MCU_digital_out:
def __init__(self, mcu, pin_params):