summaryrefslogtreecommitdiff
path: root/Sprinter
diff options
context:
space:
mode:
authormidopple <mdoppler@gmx.at>2012-01-29 18:15:58 +0100
committermidopple <mdoppler@gmx.at>2012-01-29 18:15:58 +0100
commitcedbef50f5519da1704a24177daa2b5497344957 (patch)
tree0eb0f91c7c22fae418b0f868952891324d1c66aa /Sprinter
parent16143bc2cbb22123050437875e06e9b5a3c19507 (diff)
Add function to check the UART buffer while arc function is working
Diffstat (limited to 'Sprinter')
-rw-r--r--Sprinter/Sprinter.h2
-rw-r--r--Sprinter/Sprinter.pde13
2 files changed, 14 insertions, 1 deletions
diff --git a/Sprinter/Sprinter.h b/Sprinter/Sprinter.h
index b90738c..844fc34 100644
--- a/Sprinter/Sprinter.h
+++ b/Sprinter/Sprinter.h
@@ -100,6 +100,8 @@ void plan_set_position(float x, float y, float z, float e);
void st_wake_up();
void st_synchronize();
+void check_buffer_while_arc();
+
#ifdef DEBUG
void log_message(char* message);
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde
index b08dc55..8cfe691 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -724,11 +724,22 @@ void loop()
manage_inactivity(1);
}
+//------------------------------------------------
+//Check Uart buffer while arc function ist calc a circle
+//------------------------------------------------
+
+void check_buffer_while_arc()
+{
+ if(buflen < (BUFSIZE-1))
+ {
+ get_command();
+ }
+}
//------------------------------------------------
//READ COMMAND FROM UART
//------------------------------------------------
-inline void get_command()
+void get_command()
{
while( Serial.available() > 0 && buflen < BUFSIZE)
{