Receiving Message When Movement is Done. February 17, 2016 01:59PM |
Registered: 8 years ago Posts: 3 |
Re: Receiving Message When Movement is Done. February 17, 2016 02:38PM |
Registered: 8 years ago Posts: 552 |
Re: Receiving Message When Movement is Done. February 17, 2016 02:51PM |
Registered: 8 years ago Posts: 3 |
Re: Receiving Message When Movement is Done. February 17, 2016 03:43PM |
Registered: 8 years ago Posts: 552 |
Quote
Twistx77
I have written a Java application that can control the Marlin and the Joystick is connected to the PC (Java App). I receive the ok but it seems to me that the ok is received just after the command is sent and not when the command have been executed and finished.
void process_next_command() { current_command = command_queue[cmd_queue_index_r]; ... ok_to_send(); }
FORCE_INLINE bool blocks_queued() { return (block_buffer_head != block_buffer_tail); }
void process_next_command() { current_command = command_queue[cmd_queue_index_r]; ... while( blocks_queued() ) idle(); ok_to_send(); }
Re: Receiving Message When Movement is Done. February 18, 2016 07:26AM |
Registered: 8 years ago Posts: 3 |