-/*
+/*
This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl) with additions from Sungeun K. Jeon (https://github.com/chamnit/grbl)
Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
*/
using namespace std;
// Take the next untaken block on the queue ( the one after the last one )
Block* block = this->queue.get_ref( this->queue.size() );
- // Then clean it up
+ // Then clean it up
if( block->player == this ){
for(unsigned int index=0; index<block->gcodes.size(); index++){
- block->gcodes.pop_back();
- }
+ block->gcodes.pop_back();
+ }
}
- // Create a new virgin Block in the queue
+ // Create a new virgin Block in the queue
this->queue.push_back(Block());
block = this->queue.get_ref( this->queue.size()-1 );
while( block == NULL ){
if( this->current_block != NULL ){ this->looking_for_new_block = false; return; }
- // Return if queue is empty
+ // Return if queue is empty
if( this->queue.size() == 0 ){
- this->current_block = NULL;
- // TODO : ON_QUEUE_EMPTY event
+ this->current_block = NULL;
+ // TODO : ON_QUEUE_EMPTY event
this->looking_for_new_block = false;
- return;
+ return;
}
// Get a new block