summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-09-21 18:20:40 -0400
committerSolomon Peachy <pizza@shaftnet.org>2018-09-21 18:20:40 -0400
commitc817f9e2cadfdea5dfe232db4f5920b7a93fd45e (patch)
tree8f87d9343413f879afea14eeb995aca7d0b39775
parentf071aeb0c9e97c84776bb764da6eacd47f62c19a (diff)
downloadselphy_print-c817f9e2cadfdea5dfe232db4f5920b7a93fd45e.tar.gz
selphy_print-c817f9e2cadfdea5dfe232db4f5920b7a93fd45e.tar.bz2
selphy_print-c817f9e2cadfdea5dfe232db4f5920b7a93fd45e.zip
shinko: Add support for media forcing to all shinko models.
-rw-r--r--backend_shinkos1245.c8
-rw-r--r--backend_shinkos2145.c8
-rw-r--r--backend_shinkos6145.c8
-rw-r--r--backend_shinkos6245.c9
-rw-r--r--regression.csv15
5 files changed, 34 insertions, 14 deletions
diff --git a/backend_shinkos1245.c b/backend_shinkos1245.c
index fc82e26..f34f840 100644
--- a/backend_shinkos1245.c
+++ b/backend_shinkos1245.c
@@ -1307,7 +1307,11 @@ static int shinkos1245_attach(void *vctx, struct libusb_device_handle *dev, int
return CUPS_BACKEND_FAILED;
}
} else {
- ctx->media_8x12 = 1;
+ int media_code = 1;
+ if (getenv("MEDIA_CODE"))
+ media_code = atoi(getenv("MEDIA_CODE"));
+
+ ctx->media_8x12 = media_code;
ctx->num_medias = 0;
}
ctx->marker.color = "#00FFFF#FF00FF#FFFF00";
@@ -1691,7 +1695,7 @@ static const char *shinkos1245_prefixes[] = {
struct dyesub_backend shinkos1245_backend = {
.name = "Shinko/Sinfonia CHC-S1245/E1",
- .version = "0.24",
+ .version = "0.25",
.uri_prefixes = shinkos1245_prefixes,
.cmdline_usage = shinkos1245_cmdline,
.cmdline_arg = shinkos1245_cmdline_arg,
diff --git a/backend_shinkos2145.c b/backend_shinkos2145.c
index b3f47b8..334d4f1 100644
--- a/backend_shinkos2145.c
+++ b/backend_shinkos2145.c
@@ -1431,8 +1431,12 @@ static int shinkos2145_attach(void *vctx, struct libusb_device_handle *dev, int
}
}
} else {
+ int media_code = PRINT_MEDIA_6x9;
+ if (getenv("MEDIA_CODE"))
+ media_code = atoi(getenv("MEDIA_CODE"));
+
media_prints = 680;
- ctx->media_code = PRINT_MEDIA_6x9;
+ ctx->media_code = media_code;
}
ctx->marker.color = "#00FFFF#FF00FF#FFFF00";
@@ -1797,7 +1801,7 @@ static const char *shinkos2145_prefixes[] = {
struct dyesub_backend shinkos2145_backend = {
.name = "Shinko/Sinfonia CHC-S2145/S2",
- .version = "0.53",
+ .version = "0.54",
.uri_prefixes = shinkos2145_prefixes,
.cmdline_usage = shinkos2145_cmdline,
.cmdline_arg = shinkos2145_cmdline_arg,
diff --git a/backend_shinkos6145.c b/backend_shinkos6145.c
index 7277980..68a3ce1 100644
--- a/backend_shinkos6145.c
+++ b/backend_shinkos6145.c
@@ -1944,7 +1944,11 @@ static int shinkos6145_attach(void *vctx, struct libusb_device_handle *dev, int
}
memcpy(&ctx->media, resp, sizeof(*resp));
} else {
- ctx->media.ribbon = RIBBON_6x8;
+ int media_code = RIBBON_6x8;
+ if (getenv("MEDIA_CODE"))
+ media_code = atoi(getenv("MEDIA_CODE"));
+
+ ctx->media.ribbon = media_code;
}
ctx->marker.color = "#00FFFF#FF00FF#FFFF00";
@@ -2566,7 +2570,7 @@ static const char *shinkos6145_prefixes[] = {
struct dyesub_backend shinkos6145_backend = {
.name = "Shinko/Sinfonia CHC-S6145/CS2",
- .version = "0.28",
+ .version = "0.29",
.uri_prefixes = shinkos6145_prefixes,
.cmdline_usage = shinkos6145_cmdline,
.cmdline_arg = shinkos6145_cmdline_arg,
diff --git a/backend_shinkos6245.c b/backend_shinkos6245.c
index 36f5ab0..5dd0c9f 100644
--- a/backend_shinkos6245.c
+++ b/backend_shinkos6245.c
@@ -1500,7 +1500,12 @@ static int shinkos6245_attach(void *vctx, struct libusb_device_handle *dev, int
return CUPS_BACKEND_FAILED;
}
} else {
- ctx->media.ribbon_code = 0x12;
+ int media_code = 0x12;
+ if (getenv("MEDIA_CODE"))
+ media_code = atoi(getenv("MEDIA_CODE"));
+
+
+ ctx->media.ribbon_code = media_code;
}
ctx->marker.color = "#00FFFF#FF00FF#FFFF00";
@@ -1913,7 +1918,7 @@ static const char *shinkos6245_prefixes[] = {
struct dyesub_backend shinkos6245_backend = {
.name = "Shinko/Sinfonia CHC-S6245",
- .version = "0.12WIP",
+ .version = "0.13WIP",
.uri_prefixes = shinkos6245_prefixes,
.cmdline_usage = shinkos6245_cmdline,
.cmdline_arg = shinkos6245_cmdline_arg,
diff --git a/regression.csv b/regression.csv
index 82f110a..39f0bcc 100644
--- a/regression.csv
+++ b/regression.csv
@@ -72,21 +72,24 @@ kodak605,0x040a,0x402e,kodak_605_8x6.raw,0xb
#
# 'shinkos1245'
#
-shinkos1245,0x10ce,0x0007,shinko_s1245_8x10.raw,
+shinkos1245,0x10ce,0x0007,shinko_s1245_8x10.raw,0x0
#
# 'shinkos2145'
#
-shinkos2145,0x10ce,0x000e,shinko_s2145_4x6.raw,
+shinkos2145,0x10ce,0x000e,shinko_s2145_4x6.raw,0x1
+shinkos2145,0x10ce,0x000e,shinko_s2145_4x6.raw,0x5
#
# 'shinkos6145'
#
-shinkos6145,0x10ce,0x0019,shinko_s6145_4x6.raw,
-brava21,0x10ce,0x001e,shinko_s6145_4x6.raw,
+shinkos6145,0x10ce,0x0019,shinko_s6145_4x6.raw,1
+shinkos6145,0x10ce,0x0019,shinko_s6145_4x6.raw,4
+brava21,0x10ce,0x001e,shinko_s6145_4x6.raw,1
#
# 'shinkos6245'
#
-shinkos6245,0x10ce,0x001d,shinko_s6245_8x10.raw,
-hitip910,0x0d16,0x000e,shinko_s6245_8x10.raw,
+shinkos6245,0x10ce,0x001d,shinko_s6245_8x10.raw,0x11
+shinkos6245,0x10ce,0x001d,shinko_s6245_8x10.raw,0x12
+hitip910,0x0d16,0x000e,shinko_s6245_8x10.raw,0x11
#
# 'sonyupdr150'
#