klippy: Eliminate write_dictionary command line option
The feature is not necessary and it will be difficult to maintain in the future. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d161d66741
commit
7835f50722
|
@ -103,11 +103,6 @@ def read_dictionary(filename):
|
||||||
dfile.close()
|
dfile.close()
|
||||||
return dictionary
|
return dictionary
|
||||||
|
|
||||||
def store_dictionary(filename, printer):
|
|
||||||
f = open(filename, 'wb')
|
|
||||||
f.write(printer.mcu.serial.msgparser.raw_identify_data)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
usage = "%prog [options] <config file>"
|
usage = "%prog [options] <config file>"
|
||||||
opts = optparse.OptionParser(usage)
|
opts = optparse.OptionParser(usage)
|
||||||
|
@ -121,8 +116,6 @@ def main():
|
||||||
help="enable debug messages")
|
help="enable debug messages")
|
||||||
opts.add_option("-d", dest="read_dictionary",
|
opts.add_option("-d", dest="read_dictionary",
|
||||||
help="file to read for mcu protocol dictionary")
|
help="file to read for mcu protocol dictionary")
|
||||||
opts.add_option("-D", dest="write_dictionary",
|
|
||||||
help="file to write mcu protocol dictionary")
|
|
||||||
options, args = opts.parse_args()
|
options, args = opts.parse_args()
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
opts.error("Incorrect number of arguments")
|
opts.error("Incorrect number of arguments")
|
||||||
|
@ -150,8 +143,6 @@ def main():
|
||||||
printer.connect_file(debugoutput, proto_dict)
|
printer.connect_file(debugoutput, proto_dict)
|
||||||
else:
|
else:
|
||||||
printer.connect()
|
printer.connect()
|
||||||
if options.write_dictionary:
|
|
||||||
store_dictionary(options.write_dictionary, printer)
|
|
||||||
printer.run()
|
printer.run()
|
||||||
|
|
||||||
if bglogger is not None:
|
if bglogger is not None:
|
||||||
|
|
Loading…
Reference in New Issue