Add function to check the UART buffer while arc function is working

This commit is contained in:
midopple 2012-01-29 18:15:58 +01:00
parent 16143bc2cb
commit cedbef50f5
2 changed files with 14 additions and 1 deletions

View file

@ -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);

View file

@ -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)
{