diff options
Diffstat (limited to 'Sprinter')
-rw-r--r-- | Sprinter/Sprinter.h | 2 | ||||
-rw-r--r-- | Sprinter/Sprinter.pde | 13 |
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) { |