aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Bradley <wmb@firmworks.com>2018-03-31 19:14:56 -1000
committerMitch Bradley <wmb@firmworks.com>2018-03-31 19:14:56 -1000
commit53f21185eea62392f832e4962c8322dffdf52dc9 (patch)
treec363ab257424f16508dd13ff70a80dea7ceb5fa2
parent2d5eb11bdd4c65706af83fa4f933b00f35030988 (diff)
downloadcforth-53f21185eea62392f832e4962c8322dffdf52dc9.tar.gz
Fixed bug in response handled; led to stalls
-rw-r--r--src/app/grbl/grbl.fth6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app/grbl/grbl.fth b/src/app/grbl/grbl.fth
index 2d633b4..80c6bf9 100644
--- a/src/app/grbl/grbl.fth
+++ b/src/app/grbl/grbl.fth
@@ -72,6 +72,7 @@ defer handle-ui-events
0 value time0 \ Start time in milliseconds
\ Show some statistics
+: .q ." q " #queued-lines 0 ?do linelens i na+ @ .d loop ;
defer show-stats
: type-stats ( -- )
show-line#? if executed-line# .d sent-line# executed-line# - .d then
@@ -127,7 +128,7 @@ defer show-stats
type cr ( tail$ )
else ( tail$ head$ )
\ Show ok acks only if asked to
- show-ack? if type cr else 2drop then ( tail$ )
+ show-ack? if cr type cr else 2drop then ( tail$ )
then ( tail$ )
else ( tail$ )
2drop ( )
@@ -144,7 +145,8 @@ defer show-stats
\ Handle GRBL response if available
: handle-rx ( -- )
- response-buf /rxbuf #response - #1 comport timed-read-com dup 0< if ( actual | -1 )
+ response-buf /rxbuf #response /string ( adr len )
+ #1 comport timed-read-com dup 0< if ( actual | -1 )
drop ( )
else ( actual )
#response + to #response ( )