|
@@ -109,9 +109,9 @@ unsigned char g_uc_extruder_last_move[3] = {0,0,0};
|
|
|
|
|
|
|
|
|
|
|
|
-block_t block_buffer[BLOCK_BUFFER_SIZE];
|
|
|
-volatile unsigned char block_buffer_head;
|
|
|
-volatile unsigned char block_buffer_tail;
|
|
|
+block_t block_buffer[BLOCK_BUFFER_SIZE];
|
|
|
+volatile uint8_t block_buffer_head;
|
|
|
+volatile uint8_t block_buffer_tail;
|
|
|
|
|
|
#ifdef PLANNER_DIAGNOSTICS
|
|
|
|
|
@@ -136,17 +136,17 @@ static bool plan_reset_next_e_sched;
|
|
|
|
|
|
|
|
|
|
|
|
-static inline int8_t next_block_index(int8_t block_index) {
|
|
|
+static inline uint8_t next_block_index(uint8_t block_index) {
|
|
|
if (++ block_index == BLOCK_BUFFER_SIZE)
|
|
|
- block_index = 0;
|
|
|
+ block_index = 0;
|
|
|
return block_index;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
-static inline int8_t prev_block_index(int8_t block_index) {
|
|
|
+static inline uint8_t prev_block_index(uint8_t block_index) {
|
|
|
if (block_index == 0)
|
|
|
- block_index = BLOCK_BUFFER_SIZE;
|
|
|
+ block_index = BLOCK_BUFFER_SIZE;
|
|
|
-- block_index;
|
|
|
return block_index;
|
|
|
}
|
|
@@ -358,14 +358,14 @@ void planner_recalculate(const float &safe_final_speed)
|
|
|
|
|
|
|
|
|
|
|
|
- unsigned char tail = block_buffer_tail;
|
|
|
+ uint8_t tail = block_buffer_tail;
|
|
|
uint8_t block_index;
|
|
|
block_t *prev, *current, *next;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- unsigned char n_blocks = (block_buffer_head + BLOCK_BUFFER_SIZE - tail) & (BLOCK_BUFFER_SIZE - 1);
|
|
|
+ uint8_t n_blocks = (block_buffer_head + BLOCK_BUFFER_SIZE - tail) & (BLOCK_BUFFER_SIZE - 1);
|
|
|
if (n_blocks >= 3) {
|
|
|
|
|
|
block_index = prev_block_index(block_buffer_head);
|
|
@@ -709,7 +709,7 @@ float junction_deviation = 0.1;
|
|
|
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, uint8_t extruder, const float* gcode_target)
|
|
|
{
|
|
|
|
|
|
- int next_buffer_head = next_block_index(block_buffer_head);
|
|
|
+ uint8_t next_buffer_head = next_block_index(block_buffer_head);
|
|
|
|
|
|
|
|
|
|
|
@@ -1475,7 +1475,7 @@ void update_mode_profile()
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-unsigned char number_of_blocks()
|
|
|
+uint8_t number_of_blocks()
|
|
|
{
|
|
|
return (block_buffer_head + BLOCK_BUFFER_SIZE - block_buffer_tail) & (BLOCK_BUFFER_SIZE - 1);
|
|
|
}
|
|
@@ -1505,8 +1505,8 @@ void planner_add_sd_length(uint16_t sdlen)
|
|
|
|
|
|
uint16_t planner_calc_sd_length()
|
|
|
{
|
|
|
- unsigned char _block_buffer_head = block_buffer_head;
|
|
|
- unsigned char _block_buffer_tail = block_buffer_tail;
|
|
|
+ uint8_t _block_buffer_head = block_buffer_head;
|
|
|
+ uint8_t _block_buffer_tail = block_buffer_tail;
|
|
|
uint16_t sdlen = 0;
|
|
|
while (_block_buffer_head != _block_buffer_tail)
|
|
|
{
|