Add the socalled "Babystepping" feature.
It is a realtime control over the head position via the LCD menu system that works _while_ printing. Using it, one can e.g. tune the z-position in realtime, while printing the first layer. Also, lost steps can be manually added/removed, but thats not the prime feature. Stuff is placed into the Tune->Babystep * It is not possible to have realtime control via gcode sending due to the buffering, so I did not include a gcode yet. However, it could be added, but it movements will not be realtime then. Historically, a very similar thing was implemented for the "Kaamermaker" project, while Joris was babysitting his offspring, hence the name. say goodby to fuddling around with the z-axis.
This commit is contained in:
@ -66,6 +66,10 @@ float current_temperature_bed = 0.0;
|
||||
unsigned char fanSpeedSoftPwm;
|
||||
#endif
|
||||
|
||||
#ifdef BABYSTEPPING
|
||||
volatile int babystepsTodo[3]={0,0,0};
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//=============================private variables============================
|
||||
//===========================================================================
|
||||
@ -1252,7 +1256,26 @@ ISR(TIMER0_COMPB_vect)
|
||||
bed_max_temp_error();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BABYSTEPPING
|
||||
for(uint8_t axis=0;axis<3;axis++)
|
||||
{
|
||||
int curTodo=babystepsTodo[axis]; //get rid of volatile for performance
|
||||
|
||||
if(curTodo>0)
|
||||
{
|
||||
babystep(axis,/*fwd*/true);
|
||||
babystepsTodo[axis]--; //less to do next time
|
||||
}
|
||||
else
|
||||
if(curTodo<0)
|
||||
{
|
||||
babystep(axis,/*fwd*/false);
|
||||
babystepsTodo[axis]++; //less to do next time
|
||||
}
|
||||
}
|
||||
#endif //BABYSTEPPING
|
||||
}
|
||||
|
||||
#ifdef PIDTEMP
|
||||
|
Reference in New Issue
Block a user