summaryrefslogtreecommitdiffstats
path: root/backend_mitsu9550.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-09-21 15:20:38 -0400
committerSolomon Peachy <pizza@shaftnet.org>2018-09-21 15:59:20 -0400
commit3e685d2ea0178ba5ccc374e83500a9e0edd53157 (patch)
treef82514e5d09b55d51e1a29dfa5f2725dd5ecae1e /backend_mitsu9550.c
parenta5781ab74da9a77bee376af38bd1f1e82d055286 (diff)
downloadselphy_print-3e685d2ea0178ba5ccc374e83500a9e0edd53157.tar.gz
selphy_print-3e685d2ea0178ba5ccc374e83500a9e0edd53157.tar.bz2
selphy_print-3e685d2ea0178ba5ccc374e83500a9e0edd53157.zip
mitsu9xxx: Support passing media type to test code.
Diffstat (limited to 'backend_mitsu9550.c')
-rw-r--r--backend_mitsu9550.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/backend_mitsu9550.c b/backend_mitsu9550.c
index b2626c5..36aa34c 100644
--- a/backend_mitsu9550.c
+++ b/backend_mitsu9550.c
@@ -564,9 +564,13 @@ static int mitsu9550_attach(void *vctx, struct libusb_device_handle *dev, int ty
if (mitsu9550_get_status(ctx, (uint8_t*) &media, 0, 0, 1))
return CUPS_BACKEND_FAILED;
} else {
+ int media_code = 0x2;
+ if (getenv("MEDIA_CODE"))
+ media_code = atoi(getenv("MEDIA_CODE")) & 0xf;
+
media.max = cpu_to_be16(400);
media.remain = cpu_to_be16(330);
- media.type = 0x02;
+ media.type = media_code;
}
ctx->marker.color = "#00FFFF#FF00FF#FFFF00";