Exemplo n.º 1
0
void TimeEstimateCalculator::forward_pass()
{
    Block* block[3] = {NULL, NULL, NULL};
    for(unsigned int n=0; n<blocks.size(); n++)
    {
        block[0]= block[1];
        block[1]= block[2];
        block[2] = &blocks[n];
        planner_forward_pass_kernel(block[0], block[1], block[2]);
    }
    planner_forward_pass_kernel(block[1], block[2], NULL);
}
Exemplo n.º 2
0
// planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This
// implements the forward pass.
void planner_forward_pass() {
  uint8_t block_index = block_buffer_tail;
  block_t *block[3] = { NULL, NULL, NULL };

  while (block_index != block_buffer_head) {
    block[0] = block[1];
    block[1] = block[2];
    block[2] = &block_buffer[block_index];
    planner_forward_pass_kernel(block[0], block[1], block[2]);
    block_index = next_block_index(block_index);
  }
  planner_forward_pass_kernel(block[1], block[2], NULL);
}
Exemplo n.º 3
0
// planner_recalculate() needs to go over the current plan twice. Once in reverse and once forward. This 
// implements the forward pass.
void planner_forward_pass()
{
    int8_t block_index = block_buffer_tail;
    block_t *block[3] = { NULL, NULL, NULL };

    while (block_index != block_buffer_head) {
	block[0] = block[1];
	block[1] = block[2];
	block[2] = &block_buffer[block_index];
	planner_forward_pass_kernel(block[0], block[1], block[2]);
	block_index = (block_index + 1) % BLOCK_BUFFER_SIZE;
    }
    planner_forward_pass_kernel(block[1], block[2], NULL);
}