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
This commit is contained in:
parent
c475cc2062
commit
8c4f657095
2 changed files with 16 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue