From f74ec396fbf94cd3a3ad7cdb4f3e9ca9dfe93568 Mon Sep 17 00:00:00 2001 From: Tom Hunger Date: Wed, 4 Feb 2015 16:07:21 +0000 Subject: [PATCH] Implement no-face printing and delivery. --- sirius/coding/encoders.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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) -- 2.47.3