From 0b1423c303c6d7eef7d9f8f04666dd1a1a529bb7 Mon Sep 17 00:00:00 2001
From: Erik van der Zalm <erik@vdzalm.eu>
Date: Tue, 18 Oct 2011 19:13:30 +0200
Subject: [PATCH] Fixed crashes.
---
Marlin/Marlin.pde | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
index 97c120d5a4..c1ece44cbc 100644
--- a/Marlin/Marlin.pde
+++ b/Marlin/Marlin.pde
@@ -33,7 +33,7 @@
#include "Marlin.h"
#include "speed_lookuptable.h"
-char version_string[] = "0.9.9";
+char version_string[] = "0.9.10";
#ifdef SDSUPPORT
#include "SdFat.h"
@@ -1286,19 +1286,17 @@ void planner_reverse_pass_kernel(block_t *previous, block_t *current, block_t *n
// implements the reverse pass.
void planner_reverse_pass() {
char block_index = block_buffer_head;
- block_t *block[3] = {
- NULL, NULL, NULL };
- while(block_index != block_buffer_tail) {
+ block_index--;
+ block_t *block[3] = { NULL, NULL, NULL };
+ while(block_index != block_buffer_tail) {
+ block_index--;
+ if(block_index < 0) block_index = BLOCK_BUFFER_SIZE-1;
block[2]= block[1];
block[1]= block[0];
block[0] = &block_buffer[block_index];
planner_reverse_pass_kernel(block[0], block[1], block[2]);
- block_index--;
- if(block_index < 0) {
- block_index = BLOCK_BUFFER_SIZE-1;
- }
}
-// planner_reverse_pass_kernel(NULL, block[0], block[1]);
+ planner_reverse_pass_kernel(NULL, block[0], block[1]);
}
// The kernel called by planner_recalculate() when scanning the plan from first to last entry.
@@ -1428,7 +1426,6 @@ void check_axes_activity() {
// mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
// calculation the caller must also provide the physical length of the line in millimeters.
void plan_buffer_line(float x, float y, float z, float e, float feed_rate) {
-
// The target position of the tool in absolute steps
// Calculate target position in absolute steps
long target[4];
@@ -1519,7 +1516,7 @@ void plan_buffer_line(float x, float y, float z, float e, float feed_rate) {
// Compute the acceleration rate for the trapezoid generator.
float travel_per_step = block->millimeters/block->step_event_count;
if(block->steps_x == 0 && block->steps_y == 0 && block->steps_z == 0) {
- block->acceleration = ceil( (retract_acceleration)/travel_per_step); // convert to: acceleration steps/sec^2
+ block->acceleration_st = ceil( (retract_acceleration)/travel_per_step); // convert to: acceleration steps/sec^2
}
else {
block->acceleration_st = ceil( (acceleration)/travel_per_step); // convert to: acceleration steps/sec^2
--
GitLab