Beispiel #1
0
def getConnectedPrinter():

	if printer is not None:
		printer_name = printer.get_printer_name()
	else:
		printer_name = ''

	profile = printer.getCurrentProfile()

	return jsonify({
		"printer": printer_name,
		"profile": profile
	})
Beispiel #2
0
def getConnectedPrinter():

	if printer is not None:
		printer_name = printer.get_printer_name()
	else:
		printer_name = ''

	profile = printer.getCurrentProfile()

	return jsonify({
		"printer": printer_name,
		"profile": profile
	})
Beispiel #3
0
def getLatestFirwareVersion():

	version = '0.0.0' # default base version
	firmware_path = settings().getBaseFolder('firmware')
	if printer is not None:
		printer_name = printer.get_printer_name()

		if printer_name:
			printer_name = printer_name.replace(' ','')
			firmware_files = [f for f in listdir(firmware_path) if isfile(join(firmware_path, f))]

			for ff in firmware_files:
				file_parts = ff.split('-')
				if file_parts[1] == printer_name:
					version = file_parts[2].replace('.BIN', '')
					break

	return jsonify({
		"version": version
	})
Beispiel #4
0
def getLatestFirwareVersion():

	version = '0.0.0' # default base version
	firmware_path = settings().getBaseFolder('firmware')
	if printer is not None:
		printer_name = printer.get_printer_name()

		if printer_name:
			printer_name = printer_name.replace(' ','')
			firmware_files = [f for f in listdir(firmware_path) if isfile(join(firmware_path, f))]

			for ff in firmware_files:
				file_parts = ff.split('-')
				if file_parts[1] == printer_name:
					version = file_parts[2].replace('.BIN', '')
					break

	return jsonify({
		"version": version
	})