From e9282f45c60966da6e0b905387e6b112fd93fe9e Mon Sep 17 00:00:00 2001 From: cuu Date: Sat, 24 Apr 2021 15:30:21 +0800 Subject: [PATCH] thermal_printer bug, feed_pitch1 should not use [FOR/BACK]WORD directly --- Code/thermal_printer/devterm_thermal_printer.c | 4 ++-- Code/thermal_printer/printer.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Code/thermal_printer/devterm_thermal_printer.c b/Code/thermal_printer/devterm_thermal_printer.c index 1f0f626..df04a04 100644 --- a/Code/thermal_printer/devterm_thermal_printer.c +++ b/Code/thermal_printer/devterm_thermal_printer.c @@ -422,7 +422,7 @@ void parse_cmd(CONFIG*cfg,uint8_t *cmd, uint8_t cmdidx){ if(cmd[0] == ASCII_ESC && cmd[1] == 0x4a){ print_lines8(cfg); - feed_pitch1(cmd[2],BACKWARD); + feed_pitch1(cmd[2],cfg->orient); reset_cmd(); } //ESC d n @@ -430,7 +430,7 @@ void parse_cmd(CONFIG*cfg,uint8_t *cmd, uint8_t cmdidx){ print_lines8(cfg); - feed_pitch1(cmd[2]*cfg->font->height,BACKWARD); + feed_pitch1(cmd[2]*cfg->font->height,cfg->orient); reset_cmd(); } //ESC ! n diff --git a/Code/thermal_printer/printer.c b/Code/thermal_printer/printer.c index 4b49ed7..d3ebf00 100644 --- a/Code/thermal_printer/printer.c +++ b/Code/thermal_printer/printer.c @@ -539,7 +539,7 @@ void print_image8(CONFIG*cfg){ if(IsPaper()== IS_PAPER) print_dots_8bit_split(cfg,LinePixels,x); - //feed_pitch1(FEED_PITCH,BACKWARD); + //feed_pitch1(FEED_PITCH,cfg->orient); y++; } //feed_pitch1(cfg->feed_pitch,cfg->orient);