Skip to content

Commit

Permalink
Fixes for allow print code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonsopl committed Jul 25, 2018
1 parent b3fa174 commit 840b619
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ dist
.DS_Store
*.zip

octoprint_astroprint/stoel2-Ultimaker-2-Go-PLA-draft.gcode

octoprint_astroprint/stoel2-Ultimaker-2-Go-PLA-draft.gcode

octoprint_astroprint/stoel2-Ultimaker-2-Go-PLA-draft.gcode
octoprint_astroprint/util/AstroprintGCodeAnalyzerLinux
octoprint_astroprint/util/AstroprintGCodeAnalyzerMac


*.gcode
2 changes: 1 addition & 1 deletion octoprint_astroprint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def getStatus(self):
'paused': self._printer.is_paused(),
'camera': True, #self.cameraManager.cameraActive,
'remotePrint': True,
'capabilities': ['remotePrint', 'multiExtruders'] + self.cameraManager.capabilities
'capabilities': ['remotePrint', 'multiExtruders', 'allowPrintFile'] + self.cameraManager.capabilities
}),
mimetype= 'application/json'
)
Expand Down
5 changes: 3 additions & 2 deletions octoprint_astroprint/boxrouter/handlers/requesthandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def __init__(self, wsClient):
self._settings = self.plugin.get_settings()

def initial_state(self, data, clientId, done):

if not self.astroprintCloud:
self.astroprintCloud = self.plugin.astroprintCloud
dataProfile = self.wsClient.plugin._printer_profile_manager.get_current_or_default()

profile = {
Expand All @@ -41,7 +42,7 @@ def initial_state(self, data, clientId, done):
'camera': True, #self.cameraManager.cameraActive,
'printCapture': self.cameraManager.timelapseInfo,
'profile': profile,
'capabilities': ['remotePrint', 'multiExtruders'],
'capabilities': ['remotePrint', 'multiExtruders', 'allowPrintFile'],
'tool' : self.plugin.currentTool()
}

Expand Down
2 changes: 1 addition & 1 deletion octoprint_astroprint/downloadmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def run(self):
substr = ".gcode"
idx = fileName.index(substr)
fileName = fileName[:idx] + id + fileName[idx:]
image = item['design']['images']['square']
image = item['design']['images']['square'] if item['design'] else None


self.activeDownload = id
Expand Down

0 comments on commit 840b619

Please sign in to comment.