Merge branch 'master' into devel

master
Gina Häußge 2013-05-20 20:19:26 +02:00
commit 783b3b8166
2 changed files with 9 additions and 3 deletions

View File

@ -541,7 +541,7 @@
{% include 'settings.jinja2' %}
{% include 'dialogs.jinja2' %}
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/modernizr.custom.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/underscore.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/knockout.js') }}"></script>

View File

@ -72,6 +72,8 @@ class gcode(object):
pathType = 'CUSTOM';
startCodeDone = False
currentLayer = []
unknownGcodes={}
unknownMcodes={}
currentPath = gcodePath('move', pathType, layerThickness, pos.copy())
currentPath.list[0].e = totalExtrusion
currentPath.list[0].extrudeAmountMultiply = extrudeAmountMultiply
@ -220,7 +222,9 @@ class gcode(object):
if z is not None:
posOffset.z = pos.z - z
else:
print "Unknown G code:" + str(G)
if G not in unknownGcodes:
print "Unknown G code:" + str(G)
unknownGcodes[G] = True
else:
M = self.getCodeInt(line, 'M')
if M is not None:
@ -267,7 +271,9 @@ class gcode(object):
if s != None:
extrudeAmountMultiply = s / 100.0
else:
print "Unknown M code:" + str(M)
if M not in unknownMcodes:
print "Unknown M code:" + str(M)
unknownMcodes[M] = True
self.layerList.append(currentLayer)
self.extrusionAmount = maxExtrusion
self.totalMoveTimeMinute = totalMoveTimeMinute