From: Tom Hunger Date: Wed, 4 Feb 2015 16:07:21 +0000 (+0000) Subject: Implement no-face printing and delivery. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=f74ec396fbf94cd3a3ad7cdb4f3e9ca9dfe93568;p=sirius.git Implement no-face printing and delivery. --- diff --git a/sirius/coding/encoders.py b/sirius/coding/encoders.py index 279040a..931ebc7 100644 --- a/sirius/coding/encoders.py +++ b/sirius/coding/encoders.py @@ -117,6 +117,22 @@ def encode_bridge_command(bridge_address, command, command_id, timestamp): 'type': 'DeviceCommand', }) + elif type(command) == messages.SetDeliveryAndPrintNoFace: + return make({ + 'binary_payload': base64.b64encode(_encode_printer_message( + 0x11, _payload_from_pixels(command.pixels), command_id)), + 'device_address': command.device_address, + 'type': 'DeviceCommand', + }) + + elif type(command) == messages.SetDeliveryNoFace: + return make({ + 'binary_payload': base64.b64encode(_encode_printer_message( + 0x12, _payload_from_pixels(command.pixels), command_id)), + 'device_address': command.device_address, + 'type': 'DeviceCommand', + }) + elif type(command) == messages.SetPersonality: payload = ( _payload_from_pixels(command.face_pixels)