diff options
author | David Crocker <dcrocker@eschertech.com> | 2017-06-11 00:19:50 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2017-06-11 00:23:47 +0300 |
commit | 310b7c0e1ae92d65421276c3779efeddfb6977ff (patch) | |
tree | 56afba8162017646c4f1a47b8da0512482c7f336 /src/PrintMonitor.cpp | |
parent | d026b0e4d2a7d5fda771e843cfca12e0370440d7 (diff) |
Version 1.19beta6
Refactored temperatyure sensor code
Refactored fan control code
Support invisible axes (M584 P parameter)
Supprt user-defined virtual heaters
Support heater names
Support proportional thermostatic fan control
Fix G10 retraction command
Removed delta probe code
Diffstat (limited to 'src/PrintMonitor.cpp')
-rw-r--r-- | src/PrintMonitor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PrintMonitor.cpp b/src/PrintMonitor.cpp index 63de1670..0c821d0e 100644 --- a/src/PrintMonitor.cpp +++ b/src/PrintMonitor.cpp @@ -85,7 +85,7 @@ void PrintMonitor::Spin() { // Check if there are any active heaters bool nozzleAtHighTemperature = false; - for(int heater = 0; heater < HEATERS; heater++) + for (int heater = 0; heater < (int)Heaters; heater++) { if (reprap.GetHeat().GetStatus(heater) == Heat::HS_active && reprap.GetHeat().GetActiveTemperature(heater) > TEMPERATURE_LOW_SO_DONT_CARE) { @@ -307,7 +307,7 @@ bool PrintMonitor::GetFileInfo(const char *directory, const char *fileName, GCod parsedFileInfo.layerHeight = 0.0; parsedFileInfo.numFilaments = 0; parsedFileInfo.generatedBy[0] = 0; - for(size_t extr = 0; extr < DRIVES - MIN_AXES; extr++) + for(size_t extr = 0; extr < MaxExtruders; extr++) { parsedFileInfo.filamentNeeded[extr] = 0.0; } @@ -379,7 +379,7 @@ bool PrintMonitor::GetFileInfo(const char *directory, const char *fileName, GCod // Search for filament usage (Cura puts it at the beginning of a G-code file) if (parsedFileInfo.numFilaments == 0) { - parsedFileInfo.numFilaments = FindFilamentUsed(buf, sizeToScan, parsedFileInfo.filamentNeeded, DRIVES - reprap.GetGCodes().GetNumAxes()); + parsedFileInfo.numFilaments = FindFilamentUsed(buf, sizeToScan, parsedFileInfo.filamentNeeded, DRIVES - reprap.GetGCodes().GetTotalAxes()); headerInfoComplete &= (parsedFileInfo.numFilaments != 0); } @@ -519,7 +519,7 @@ bool PrintMonitor::GetFileInfo(const char *directory, const char *fileName, GCod // Search for filament used if (parsedFileInfo.numFilaments == 0) { - parsedFileInfo.numFilaments = FindFilamentUsed(buf, sizeToScan, parsedFileInfo.filamentNeeded, DRIVES - reprap.GetGCodes().GetNumAxes()); + parsedFileInfo.numFilaments = FindFilamentUsed(buf, sizeToScan, parsedFileInfo.filamentNeeded, DRIVES - reprap.GetGCodes().GetTotalAxes()); if (parsedFileInfo.numFilaments == 0) { footerInfoComplete = false; @@ -779,7 +779,7 @@ float PrintMonitor::EstimateTimeLeft(PrintEstimationMethod method) const // Sum up the filament usage and the filament needed float totalFilamentNeeded = 0.0; const float extrRawTotal = gCodes.GetTotalRawExtrusion(); - for (size_t extruder = 0; extruder < DRIVES - reprap.GetGCodes().GetNumAxes(); extruder++) + for (size_t extruder = 0; extruder < DRIVES - reprap.GetGCodes().GetTotalAxes(); extruder++) { totalFilamentNeeded += printingFileInfo.filamentNeeded[extruder]; } |