Add function to check the UART buffer while arc function is working
This commit is contained in:
parent
16143bc2cb
commit
cedbef50f5
2 changed files with 14 additions and 1 deletions
|
|
@ -100,6 +100,8 @@ void plan_set_position(float x, float y, float z, float e);
|
||||||
void st_wake_up();
|
void st_wake_up();
|
||||||
void st_synchronize();
|
void st_synchronize();
|
||||||
|
|
||||||
|
void check_buffer_while_arc();
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void log_message(char* message);
|
void log_message(char* message);
|
||||||
|
|
|
||||||
|
|
@ -724,11 +724,22 @@ void loop()
|
||||||
manage_inactivity(1);
|
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
|
//READ COMMAND FROM UART
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
inline void get_command()
|
void get_command()
|
||||||
{
|
{
|
||||||
while( Serial.available() > 0 && buflen < BUFSIZE)
|
while( Serial.available() > 0 && buflen < BUFSIZE)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue