G70/G71 are now interpreted as MOParamStmt.

Got a bunch of metric files with no MOMM but only G71, this
should be pretty mush harmless.
This commit is contained in:
Paulo Henrique Silva 2015-05-21 17:15:54 -03:00
parent aff36a4dca
commit 9e36d7e21d

View file

@ -341,10 +341,12 @@ class GerberParser(object):
line = r
continue
# deprecated codes (parsed but ignored)
# deprecated codes
(deprecated_unit, r) = _match_one(self.DEPRECATED_UNIT, line)
if deprecated_unit:
yield DeprecatedStmt.from_gerber(line)
stmt = MOParamStmt(param="MO", mo="inch" if "G70" in deprecated_unit["mode"] else "metric")
self.settings.units = stmt.mode
yield stmt
line = r
did_something = True
continue