From bfc44dfe161eee20a4d292e81625f9109042e7af Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 9 Nov 2022 09:02:29 -0500 Subject: [PATCH] dnpcitizen: Citizen CX-02 and CX-02W support ribbon rewinding. (Unlike the DNP, where the -A models don't support rewinding) --- backend_dnpds40.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/backend_dnpds40.c b/backend_dnpds40.c index 07d7877..9d058d1 100644 --- a/backend_dnpds40.c +++ b/backend_dnpds40.c @@ -1014,10 +1014,6 @@ static int dnpds40_attach(void *vctx, struct dyesub_connection *conn, uint8_t jo ctx->supports_2x6 = 1; ctx->supports_fullcut = 1; ctx->supports_mqty_default = 1; - if (strchr(ctx->version, 'A')) - ctx->supports_rewind = 0; - else - ctx->supports_rewind = 1; ctx->supports_standby = 1; ctx->supports_keepmode = 1; ctx->supports_iserial = 1; @@ -1030,12 +1026,18 @@ static int dnpds40_attach(void *vctx, struct dyesub_connection *conn, uint8_t jo ctx->supports_adv_fullcut = 1; ctx->supports_advmatte = 1; ctx->supports_luster = 1; + ctx->supports_rewind = 1; if (FW_VER_CHECK(1,01)) ctx->supports_finematte = 1; if (FW_VER_CHECK(1,10)) ctx->supports_6x9 = ctx->supports_6x4_5 = 1; } else { + if (strchr(ctx->version, 'A')) + ctx->supports_rewind = 0; + else + ctx->supports_rewind = 1; + if (FW_VER_CHECK(1,10)) ctx->supports_6x9 = ctx->supports_6x4_5 = 1; if (FW_VER_CHECK(1,20)) @@ -1056,10 +1058,6 @@ static int dnpds40_attach(void *vctx, struct dyesub_connection *conn, uint8_t jo ctx->supports_matte = 1; ctx->supports_fullcut = 1; ctx->supports_mqty_default = 1; - if (strchr(ctx->version, 'A')) - ctx->supports_rewind = 0; - else - ctx->supports_rewind = 1; ctx->supports_standby = 1; ctx->supports_keepmode = 1; ctx->supports_iserial = 1; @@ -1076,8 +1074,14 @@ static int dnpds40_attach(void *vctx, struct dyesub_connection *conn, uint8_t jo ctx->supports_gamma = 1; if (ctx->mfg == MFG_CITIZEN) { /* Citizen and DNP firmware diverge */ + ctx->supports_rewind = 1; ctx->supports_a4x6 = 1; // XXX need to confirm this! } else { + if (strchr(ctx->version, 'A')) + ctx->supports_rewind = 0; + else + ctx->supports_rewind = 1; + if (FW_VER_CHECK(1,06)) ctx->supports_a4x6 = 1; } @@ -3550,7 +3554,7 @@ static const char *dnpds40_prefixes[] = { const struct dyesub_backend dnpds40_backend = { .name = "DNP DS-series / Citizen C-series", - .version = "0.146", + .version = "0.147", .uri_prefixes = dnpds40_prefixes, .cmdline_usage = dnpds40_cmdline, .cmdline_arg = dnpds40_cmdline_arg,