From 9179e0abc26fc445819ade76bb3108acdcce182a Mon Sep 17 00:00:00 2001 From: cuu Date: Fri, 14 May 2021 09:24:09 +0800 Subject: [PATCH] bug fix --- Code/thermal_printer/printer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Code/thermal_printer/printer.c b/Code/thermal_printer/printer.c index 6e6d094..2e72e35 100644 --- a/Code/thermal_printer/printer.c +++ b/Code/thermal_printer/printer.c @@ -65,14 +65,14 @@ uint8_t IsPaper() }else { status = printer_vps_last_status; } - printer_vps_last_status = status; tmp = temperature(); if (tmp >= HOT){ PRINTF("Printer too Hot\n"); status |= HOT_PRINTER; } - + + printer_vps_last_status = status; printer_vps_time = millis(); return status; @@ -397,7 +397,7 @@ uint8_t print_lines8(CONFIG*cfg) { pad = i+pad; row = 0; - rv = 0; + rv = IsPaper(); data = (uint8_t*)malloc(sizeof(uint8_t)*(pad+1)); i=0; @@ -526,7 +526,7 @@ uint8_t print_image8(CONFIG*cfg){ y=0; addr = 0; - rv = 0; + rv = IsPaper(); while(y < height ) { x=0; @@ -542,7 +542,7 @@ uint8_t print_image8(CONFIG*cfg){ x++; } - rv = IsPaper(); + rv = IsPaper(); if( rv == IS_PAPER) { print_dots_8bit_split(cfg,LinePixels,x); }