예제 #1
0
def printersetState1():
	state, port, baudrate, printer_profile = printer.get_current_connection()
	printer.csvflag = 0
	current = {
		"layert": settings().get(["printerset", "layert"]),
		"spec": settings().get(["printerset", "spec"]),
	}
	
	return jsonify({"current": current})
예제 #2
0
def connectionState():
	state, port, baudrate, printer_profile = printer.get_current_connection()
	current = {
		"state": state,
		"port": port,
		"baudrate": baudrate,
		"printerProfile": printer_profile["id"] if printer_profile is not None and "id" in printer_profile else "_default"
	}

	return jsonify({"current": current, "options": _get_options()})
예제 #3
0
def connectionState():
	state, port, baudrate, printer_profile = printer.get_current_connection()
	current = {
		"state": state,
		"port": port,
		"baudrate": baudrate,
		"printerProfile": printer_profile["id"] if printer_profile is not None and "id" in printer_profile else "_default"
	}

	return jsonify({"current": current, "options": _get_options()})
예제 #4
0
def printersetState():
	state, port, baudrate, printer_profile = printer.get_current_connection()
	current = {
		"blayer": settings().get(["printerset", "blayer"]),
		"xpx": settings().get(["printerset", "xpx"]),
		"layert": settings().get(["printerset", "layert"]),
		"ypx": settings().get(["printerset", "ypx"]),
		"prox": settings().get(["printerset", "prox"]),
		"offx": settings().get(["printerset", "offx"]),
		"offy": settings().get(["printerset", "offy"]),
		"nres": settings().get(["printerset", "nres"]),
		"spec": settings().get(["printerset", "spec"]),
		"shutter": settings().get(["printerset", "shutter"]),
		"mask": settings().get(["printerset", "mask"])
	}
	return jsonify({"current": current})