Synchronising duet branch with the mastr branch.

This commit is contained in:
Adrian Bowyer 2013-12-27 15:02:04 +00:00
parent be1a790c47
commit 71c1571c6c
10 changed files with 64 additions and 5 deletions

View file

@ -0,0 +1,11 @@
*.d
*.o
Release/*
<<<<<<< HEAD
!Release/RepRapFirmware.bin
=======
!Release/RepRapFirmware*.bin
>>>>>>> duet
*~
*orig
/Release

View file

View file

@ -0,0 +1,7 @@
*.d
*.o
Release/*
!Release/RepRapFirmware.bin
*~
*orig
/Release

View file

@ -0,0 +1,7 @@
*.d
*.o
Release/*
!Release/RepRapFirmware*.bin
*~
*orig
/Release

View file

@ -24,8 +24,8 @@ Licence: GPL
#define CONFIGURATION_H #define CONFIGURATION_H
#define NAME "RepRapFirmware" #define NAME "RepRapFirmware"
#define VERSION "0.46" #define VERSION "0.48"
#define DATE "2013-12-23" #define DATE "2013-12-27"
#define LAST_AUTHOR "reprappro.com" #define LAST_AUTHOR "reprappro.com"
// Other firmware that we might switch to be compatible with. // Other firmware that we might switch to be compatible with.

View file

@ -382,7 +382,7 @@ bool GCodes::DoFileCannedCycles(char* fileName)
{ {
if(saveFileBeingPrinted != NULL) if(saveFileBeingPrinted != NULL)
{ {
platform->Message(HOST_MESSAGE, "Canned cycle files cannot be recursive!\n"); platform->Message(HOST_MESSAGE, "Canned cycle files cannot be nested!\n");
return true; return true;
} }
saveFileBeingPrinted = fileBeingPrinted; saveFileBeingPrinted = fileBeingPrinted;
@ -422,7 +422,7 @@ bool GCodes::DoFileCannedCycles(char* fileName)
return true; return true;
} }
// Do more of the file // No - Do more of the file
if(!cannedCycleGCode->Finished()) if(!cannedCycleGCode->Finished())
{ {
@ -435,6 +435,29 @@ bool GCodes::DoFileCannedCycles(char* fileName)
return false; return false;
} }
bool GCodes::FileCannedCyclesReturn()
{
if(!doingCannedCycleFile)
return true;
if(!AllMovesAreFinishedAndMoveBufferIsLoaded())
return false;
doingCannedCycleFile = false;
cannedCycleGCode->Init();
if(fileBeingPrinted != NULL)
fileBeingPrinted->Close();
fileBeingPrinted = NULL;
if(saveFileBeingPrinted != NULL)
{
fileBeingPrinted = saveFileBeingPrinted;
saveFileBeingPrinted = NULL;
}
return true;
}
// To execute any move, call this until it returns true. // To execute any move, call this until it returns true.
// moveToDo[] entries corresponding with false entries in action[] will // moveToDo[] entries corresponding with false entries in action[] will
// be ignored. Recall that moveToDo[DRIVES] should contain the feedrate // be ignored. Recall that moveToDo[DRIVES] should contain the feedrate
@ -1375,6 +1398,16 @@ bool GCodes::ActOnGcode(GCodeBuffer *gb)
(int)platform->DriveStepsPerUnit(Z_AXIS), (int)platform->DriveStepsPerUnit(AXES)); // FIXME - needs to do multiple extruders (int)platform->DriveStepsPerUnit(Z_AXIS), (int)platform->DriveStepsPerUnit(AXES)); // FIXME - needs to do multiple extruders
break; break;
case 98:
if(gb->Seen('P'))
result = DoFileCannedCycles(gb->GetString());
break;
case 99:
result = FileCannedCyclesReturn();
break;
case 104: // Depricated case 104: // Depricated
if(gb->Seen('S')) if(gb->Seen('S'))
{ {

View file

@ -84,6 +84,7 @@ class GCodes
bool AllMovesAreFinishedAndMoveBufferIsLoaded(); bool AllMovesAreFinishedAndMoveBufferIsLoaded();
bool DoCannedCycleMove(bool ce); bool DoCannedCycleMove(bool ce);
bool DoFileCannedCycles(char* fileName); bool DoFileCannedCycles(char* fileName);
bool FileCannedCyclesReturn();
bool ActOnGcode(GCodeBuffer* gb); bool ActOnGcode(GCodeBuffer* gb);
bool SetUpMove(GCodeBuffer* gb); bool SetUpMove(GCodeBuffer* gb);
bool DoDwell(GCodeBuffer *gb); bool DoDwell(GCodeBuffer *gb);

View file

@ -398,7 +398,7 @@ void MassStorage::Init()
hsmciPinsinit(); hsmciPinsinit();
// Initialize SD MMC stack // Initialize SD MMC stack
sd_mmc_init(); sd_mmc_init();
delay(5);
int sdPresentCount = 0; int sdPresentCount = 0;
while ((CTRL_NO_PRESENT == sd_mmc_check(0)) && (sdPresentCount < 5)) while ((CTRL_NO_PRESENT == sd_mmc_check(0)) && (sdPresentCount < 5))
{ {

Binary file not shown.