Marker message should include media type where it's known. (continued)

This commit is contained in:
Solomon Peachy 2016-08-25 08:19:10 -04:00
parent 332c060681
commit 200852270e
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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)