diff --git a/.gitignore.BACKUP.5284.gitignore b/.gitignore.BACKUP.5284.gitignore new file mode 100644 index 0000000..4592b2f --- /dev/null +++ b/.gitignore.BACKUP.5284.gitignore @@ -0,0 +1,11 @@ +*.d +*.o +Release/* +<<<<<<< HEAD +!Release/RepRapFirmware.bin +======= +!Release/RepRapFirmware*.bin +>>>>>>> duet +*~ +*orig +/Release diff --git a/.gitignore.BASE.5284.gitignore b/.gitignore.BASE.5284.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore.LOCAL.5284.gitignore b/.gitignore.LOCAL.5284.gitignore new file mode 100644 index 0000000..fee10ee --- /dev/null +++ b/.gitignore.LOCAL.5284.gitignore @@ -0,0 +1,7 @@ +*.d +*.o +Release/* +!Release/RepRapFirmware.bin +*~ +*orig +/Release diff --git a/.gitignore.REMOTE.5284.gitignore b/.gitignore.REMOTE.5284.gitignore new file mode 100644 index 0000000..fccb4e4 --- /dev/null +++ b/.gitignore.REMOTE.5284.gitignore @@ -0,0 +1,7 @@ +*.d +*.o +Release/* +!Release/RepRapFirmware*.bin +*~ +*orig +/Release diff --git a/Configuration.h b/Configuration.h index 52ce9dd..0776c67 100644 --- a/Configuration.h +++ b/Configuration.h @@ -24,8 +24,8 @@ Licence: GPL #define CONFIGURATION_H #define NAME "RepRapFirmware" -#define VERSION "0.46" -#define DATE "2013-12-23" +#define VERSION "0.48" +#define DATE "2013-12-27" #define LAST_AUTHOR "reprappro.com" // Other firmware that we might switch to be compatible with. diff --git a/GCodes.cpp b/GCodes.cpp index 6921a4f..eed8722 100644 --- a/GCodes.cpp +++ b/GCodes.cpp @@ -382,7 +382,7 @@ bool GCodes::DoFileCannedCycles(char* fileName) { 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; } saveFileBeingPrinted = fileBeingPrinted; @@ -422,7 +422,7 @@ bool GCodes::DoFileCannedCycles(char* fileName) return true; } - // Do more of the file + // No - Do more of the file if(!cannedCycleGCode->Finished()) { @@ -435,6 +435,29 @@ bool GCodes::DoFileCannedCycles(char* fileName) 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. // moveToDo[] entries corresponding with false entries in action[] will // 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 break; + + case 98: + if(gb->Seen('P')) + result = DoFileCannedCycles(gb->GetString()); + break; + + case 99: + result = FileCannedCyclesReturn(); + break; + case 104: // Depricated if(gb->Seen('S')) { diff --git a/GCodes.h b/GCodes.h index f7b69b6..e4cebbc 100644 --- a/GCodes.h +++ b/GCodes.h @@ -84,6 +84,7 @@ class GCodes bool AllMovesAreFinishedAndMoveBufferIsLoaded(); bool DoCannedCycleMove(bool ce); bool DoFileCannedCycles(char* fileName); + bool FileCannedCyclesReturn(); bool ActOnGcode(GCodeBuffer* gb); bool SetUpMove(GCodeBuffer* gb); bool DoDwell(GCodeBuffer *gb); diff --git a/Platform.cpp b/Platform.cpp index 811c834..c77d395 100644 --- a/Platform.cpp +++ b/Platform.cpp @@ -398,7 +398,7 @@ void MassStorage::Init() hsmciPinsinit(); // Initialize SD MMC stack sd_mmc_init(); - + delay(5); int sdPresentCount = 0; while ((CTRL_NO_PRESENT == sd_mmc_check(0)) && (sdPresentCount < 5)) { diff --git a/Release/RepRapFirmware-046-23-12-2013.bin b/Release/RepRapFirmware-048-27-12-2013.bin similarity index 73% rename from Release/RepRapFirmware-046-23-12-2013.bin rename to Release/RepRapFirmware-048-27-12-2013.bin index 0b74bd4..c9da656 100755 Binary files a/Release/RepRapFirmware-046-23-12-2013.bin and b/Release/RepRapFirmware-048-27-12-2013.bin differ diff --git a/Release/RepRapFirmware.bin b/Release/RepRapFirmware.bin index 0b74bd4..c9da656 100755 Binary files a/Release/RepRapFirmware.bin and b/Release/RepRapFirmware.bin differ