From 200852270e30752060a1086b16fab6b16f8cd8c5 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 25 Aug 2016 08:19:10 -0400 Subject: [PATCH] Marker message should include media type where it's known. (continued) --- backend_shinkos6145.c | 5 ++++- backend_shinkos6245.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend_shinkos6145.c b/backend_shinkos6145.c index b32aa96..f7f18a1 100644 --- a/backend_shinkos6145.c +++ b/backend_shinkos6145.c @@ -279,6 +279,7 @@ struct shinkos6145_ctx { uint16_t last_donor; uint16_t last_remain; + uint16_t last_ribbon; uint8_t *eeprom; size_t eepromlen; @@ -2189,6 +2190,8 @@ static int shinkos6145_main_loop(void *vctx, int copies) { return CUPS_BACKEND_HOLD; } + ctx->last_ribbon = media->ribbon; + /* Tell CUPS about the consumables we report */ ATTR("marker-colors=#00FFFF#FF00FF#FFFF00\n"); ATTR("marker-high-levels=100\n"); @@ -2242,7 +2245,7 @@ top: remain = le32_to_cpu(sts->count_ribbon_left); if (remain != ctx->last_remain) { ctx->last_remain = remain; - ATTR("marker-message=\"%d prints remaining on ribbon\"\n", remain); + ATTR("marker-message=\"%d prints remaining on '%s' ribbon\"\n", remain, print_ribbons(media->ribbon)); } if (sts->hdr.result != RESULT_SUCCESS) diff --git a/backend_shinkos6245.c b/backend_shinkos6245.c index 94f9637..13e407a 100644 --- a/backend_shinkos6245.c +++ b/backend_shinkos6245.c @@ -1746,7 +1746,7 @@ top: remain = le32_to_cpu(sts->count_ribbon_left); if (remain != ctx->last_remain) { ctx->last_remain = remain; - ATTR("marker-message=\"%d prints remaining on ribbon\"\n", remain); + ATTR("marker-message=\"%d prints remaining on '%s' ribbon\"\n", remain, ribbon_sizes(ctx->ribbon_code)); } if (sts->hdr.result != RESULT_SUCCESS)