summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Caruso <emanuele.caruso@gmail.com>2011-06-06 19:59:47 +0200
committerEmanuele Caruso <emanuele.caruso@gmail.com>2011-06-06 19:59:47 +0200
commit8c4f65709535b76e322516d6d7506eb430ca6d0b (patch)
tree070603d2ffbf3365bff54c58b8fdb31322092deb
parentc475cc2062969380e15358e8c0cd3f7654a64878 (diff)
Added safety feature to DISABLE_CHECK_DURING_TRAVEL feature, which allows to define a max time in milliseconds after which the travel move is not considered so
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde13
-rw-r--r--Tonokip_Firmware/configuration.h4
2 files changed, 16 insertions, 1 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde
index c68fc29..a5630a8 100644
--- a/Tonokip_Firmware/Tonokip_Firmware.pde
+++ b/Tonokip_Firmware/Tonokip_Firmware.pde
@@ -1017,6 +1017,15 @@ void linear_move(unsigned long axis_steps_remaining[]) // make linear move with
axis_previous_micros[i] = start_move_micros * 100;
}
+ #ifdef DISABLE_CHECK_DURING_TRAVEL
+ //If the move time is more than allowed in DISABLE_CHECK_DURING_TRAVEL, let's
+ // consider this a print move and perform heat management during it
+ if(time_for_move / 1000 > DISABLE_CHECK_DURING_TRAVEL) is_print_move = true;
+ #ifdef DEBUG_DISABLE_CHECK_DURING_TRAVEL
+ log_bool("_DISABLE_CHECK_DURING_TRAVEL - is_print_move", is_print_move);
+ #endif
+ #endif
+
#ifdef DEBUG_MOVE_TIME
unsigned long startmove = micros();
#endif
@@ -1459,6 +1468,10 @@ void log_message(char* message) {
Serial.print("DEBUG"); Serial.println(message);
}
+void log_bool(char* message, bool value) {
+ Serial.print("DEBUG"); Serial.print(message); Serial.print(": "); Serial.println(value);
+}
+
void log_int(char* message, int value) {
Serial.print("DEBUG"); Serial.print(message); Serial.print(": "); Serial.println(value);
}
diff --git a/Tonokip_Firmware/configuration.h b/Tonokip_Firmware/configuration.h
index 0d4556e..86c9f39 100644
--- a/Tonokip_Firmware/configuration.h
+++ b/Tonokip_Firmware/configuration.h
@@ -51,7 +51,8 @@ long max_travel_acceleration_units_per_sq_second[] = {500,500,50}; // X, Y, Z ma
#endif
//Uncomment the following line to disable heat management during travel moves, strongly recommended if you are missing steps mid print.
//Probably this should remain commented if are using PID.
-#define DISABLE_CHECK_DURING_TRAVEL
+//It also defines the max milliseconds interval after which a travel move is not considered so for the sake of this feature.
+#define DISABLE_CHECK_DURING_TRAVEL 1000
//Experimental temperature smoothing - only uncomment this if your temp readings are noisy
//#define SMOOTHING 1
@@ -151,6 +152,7 @@ const int Z_MAX_LENGTH = 100;
//#define DEBUG_RAMP_ACCELERATION //Enable this to debug all constant acceleration info
//#define DEBUG_MOVE_TIME //Enable this to time each move and print the result
//#define DEBUG_HEAT_MGMT //Enable this to debug heat management. WARNING, this will cause axes to jitter!
+ //#define DEBUG_DISABLE_CHECK_DURING_TRAVEL //Debug the namesake feature, see above in this file
#endif
#endif