<font face="Arial, Verdana">I use CamBam, and yes, I can configure the G0 move to something like "G0 F2000", but CamBam would not add an F to its G1 moves, so all subsequent G1's would run at max speed. In Repetier firmware, the last feedrate is always stored in "Printer::feedrate", and it is used in any G0 or G1 moves if there is no F in the command. In CamBam, I could even change G1 to something like "G1 {cut feedrate}", but sometimes G1 moves are not cuts, but plunges (Z axis move), and it wouldn't be good to plunge with cut rate. CamBam only adds F, if there is a change in G1 speed.</font>
I implemented a simple (and probably ugly) hack, though. If it's a G0 move, I just backup the current feedrate (in g1_feedrate_backup), and restore it after the move is queued.
void Commands::processGCode(GCode *com)
{
uint32_t codenum; //throw away variable
volatile float g1_feedrate_backup;
switch(com->G)
{
case 0: // G0 -> G1
case 1: // G1
if(com->hasS()) Printer::setNoDestinationCheck(com->S != 0);
if(Printer::setDestinationStepsFromGCode(com)) // For X Y Z E F
#if NONLINEAR_SYSTEM
if (!PrintLine::queueDeltaMove(ALWAYS_CHECK_ENDSTOPS, true, true))
{
Com::printWarningFLN(PSTR("executeGCode / queueDeltaMove returns error"));
}
#else
if ( com->G == 0 )
{
g1_feedrate_backup = Printer::feedrate;
Printer::feedrate = Printer::maxFeedrate[X_AXIS];
PrintLine::queueCartesianMove(ALWAYS_CHECK_ENDSTOPS, true);
Printer::feedrate = g1_feedrate_backup;
}
else
{
PrintLine::queueCartesianMove(ALWAYS_CHECK_ENDSTOPS, true);
}
#endif