added counter for planner steps
This commit is contained in:
parent
dba26eff91
commit
87864cce19
@ -34,6 +34,8 @@
|
|||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include "motion_control.h"
|
#include "motion_control.h"
|
||||||
|
|
||||||
|
uint32_t planner_steps_counter;
|
||||||
|
|
||||||
#define SOME_LARGE_VALUE 1.0E+38 // Used by rapids and acceleration maximization calculations. Just needs
|
#define SOME_LARGE_VALUE 1.0E+38 // Used by rapids and acceleration maximization calculations. Just needs
|
||||||
// to be larger than any feasible (mm/min)^2 or mm/sec^2 value.
|
// to be larger than any feasible (mm/min)^2 or mm/sec^2 value.
|
||||||
|
|
||||||
@ -210,6 +212,7 @@ static uint8_t planner_recalculate()
|
|||||||
block_t *curr_block = &block_buffer[current_block_idx];
|
block_t *curr_block = &block_buffer[current_block_idx];
|
||||||
uint8_t plan_unchanged= 1;
|
uint8_t plan_unchanged= 1;
|
||||||
|
|
||||||
|
planner_steps_counter= 0;
|
||||||
if(current_block_idx!=block_buffer_tail) { // we cannot do anything to only one block
|
if(current_block_idx!=block_buffer_tail) { // we cannot do anything to only one block
|
||||||
float max_entry_speed_sqr;
|
float max_entry_speed_sqr;
|
||||||
float next_entry_speed_sqr= 0.0;
|
float next_entry_speed_sqr= 0.0;
|
||||||
@ -219,6 +222,7 @@ static uint8_t planner_recalculate()
|
|||||||
planned_block_tail= current_block_idx;
|
planned_block_tail= current_block_idx;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
planner_steps_counter++;
|
||||||
|
|
||||||
// TODO: Determine maximum entry speed at junction for feedrate overrides, since they can alter
|
// TODO: Determine maximum entry speed at junction for feedrate overrides, since they can alter
|
||||||
// the planner nominal speeds at any time. This calc could be done in the override handler, but
|
// the planner nominal speeds at any time. This calc could be done in the override handler, but
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#ifndef planner_h
|
#ifndef planner_h
|
||||||
#define planner_h
|
#define planner_h
|
||||||
|
|
||||||
|
extern uint32_t planner_steps_counter;
|
||||||
|
|
||||||
// The number of linear motions that can be in the plan at any give time
|
// The number of linear motions that can be in the plan at any give time
|
||||||
#ifndef BLOCK_BUFFER_SIZE
|
#ifndef BLOCK_BUFFER_SIZE
|
||||||
#define BLOCK_BUFFER_SIZE 18
|
#define BLOCK_BUFFER_SIZE 18
|
||||||
|
@ -157,7 +157,8 @@ void printBlock() {
|
|||||||
else block_position[2]+= b->steps_z;
|
else block_position[2]+= b->steps_z;
|
||||||
fprintf(block_out_file,"%d, ", block_position[2]);
|
fprintf(block_out_file,"%d, ", block_position[2]);
|
||||||
|
|
||||||
fprintf(block_out_file,"%f", b->entry_speed_sqr);
|
fprintf(block_out_file,"%f, ", b->entry_speed_sqr);
|
||||||
|
fprintf(block_out_file,"%d", planner_steps_counter);
|
||||||
fprintf(block_out_file,"\n");
|
fprintf(block_out_file,"\n");
|
||||||
|
|
||||||
last_block= b;
|
last_block= b;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user