From 746a378c185473e189cae987e991238fa8ac4b7b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 19 Mar 2019 10:48:33 -0400 Subject: 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 --- src/endstop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/endstop.c') diff --git a/src/endstop.c b/src/endstop.c index 0f6aac89..1d8bcd6e 100644 --- a/src/endstop.c +++ b/src/endstop.c @@ -1,6 +1,6 @@ // Handling of end stops. // -// Copyright (C) 2016,2017 Kevin O'Connor +// Copyright (C) 2016-2019 Kevin O'Connor // // This file may be distributed under the terms of the GNU GPLv3 license. @@ -134,18 +134,18 @@ end_stop_report(uint8_t oid, struct end_stop *e) e->flags &= ~ESF_REPORT; irq_enable(); - sendf("end_stop_state oid=%c homing=%c pin=%c" + sendf("end_stop_state oid=%c homing=%c pin_value=%c" , oid, !!(eflags & ESF_HOMING), gpio_in_read(e->pin)); } void -command_end_stop_query(uint32_t *args) +command_end_stop_query_state(uint32_t *args) { uint8_t oid = args[0]; struct end_stop *e = oid_lookup(oid, command_config_end_stop); end_stop_report(oid, e); } -DECL_COMMAND(command_end_stop_query, "end_stop_query oid=%c"); +DECL_COMMAND(command_end_stop_query_state, "end_stop_query_state oid=%c"); void end_stop_task(void) -- cgit v1.2.3-70-g09d2