endstop: Report trigger time in endstop_query response
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
470b1e2e46
commit
edea52863a
|
@ -53,8 +53,8 @@ class MCU_endstop:
|
||||||
"endstop_query_state oid=%c", cq=cmd_queue)
|
"endstop_query_state oid=%c", cq=cmd_queue)
|
||||||
self._query_cmd = self._mcu.lookup_query_command(
|
self._query_cmd = self._mcu.lookup_query_command(
|
||||||
"endstop_query_state oid=%c",
|
"endstop_query_state oid=%c",
|
||||||
"endstop_state oid=%c homing=%c pin_value=%c", oid=self._oid,
|
"endstop_state oid=%c homing=%c next_clock=%u pin_value=%c",
|
||||||
cq=cmd_queue)
|
oid=self._oid, cq=cmd_queue)
|
||||||
def home_start(self, print_time, sample_time, sample_count, rest_time,
|
def home_start(self, print_time, sample_time, sample_count, rest_time,
|
||||||
triggered=True):
|
triggered=True):
|
||||||
clock = self._mcu.print_time_to_clock(print_time)
|
clock = self._mcu.print_time_to_clock(print_time)
|
||||||
|
|
|
@ -132,10 +132,11 @@ endstop_report(uint8_t oid, struct endstop *e)
|
||||||
irq_disable();
|
irq_disable();
|
||||||
uint8_t eflags = e->flags;
|
uint8_t eflags = e->flags;
|
||||||
e->flags &= ~ESF_REPORT;
|
e->flags &= ~ESF_REPORT;
|
||||||
|
uint32_t nextwake = e->nextwake;
|
||||||
irq_enable();
|
irq_enable();
|
||||||
|
|
||||||
sendf("endstop_state oid=%c homing=%c pin_value=%c"
|
sendf("endstop_state oid=%c homing=%c next_clock=%u pin_value=%c"
|
||||||
, oid, !!(eflags & ESF_HOMING), gpio_in_read(e->pin));
|
, oid, !!(eflags & ESF_HOMING), nextwake, gpio_in_read(e->pin));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue