]> git.aero2k.de Git - sirius.git/commitdiff
Implement no-face printing and delivery.
authorTom Hunger <tehunger@gmail.com>
Wed, 4 Feb 2015 16:07:21 +0000 (16:07 +0000)
committerTom Hunger <tehunger@gmail.com>
Wed, 4 Feb 2015 16:07:21 +0000 (16:07 +0000)
sirius/coding/encoders.py

index 279040a9e13d8e259a1ba9aa01fff92adc06a42f..931ebc73c68c5b50029edbc0e0d06b5f1d9c11cd 100644 (file)
@@ -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)