From 130f00a04cf524444c77fa3da2818c8c8c22e3a0 Mon Sep 17 00:00:00 2001 From: Alex H Date: Sun, 8 Mar 2020 23:03:58 -0400 Subject: [PATCH] Fix print problems with HL-L2320D and others - reduce max_lines_per_block from 64 to 32 in block.h, which seems to improve print success rate --- src/block.h | 2 +- test/test_block.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/block.h b/src/block.h index e5dbd8d..bb11a3d 100644 --- a/src/block.h +++ b/src/block.h @@ -59,7 +59,7 @@ class block { private: static const unsigned max_block_size_ = 16350; - static const unsigned max_lines_per_block_ = 64; + static const unsigned max_lines_per_block_ = 32; std::vector> lines_; int line_bytes_; diff --git a/test/test_block.cc b/test/test_block.cc index c476ee7..2e2790a 100644 --- a/test/test_block.cc +++ b/test/test_block.cc @@ -40,7 +40,7 @@ const lest::test specification[] = { "A block can contain 64 lines", [] { block b; - for (int i = 0; i < 64; ++i) { + for (int i = 0; i < 32; ++i) { EXPECT(b.line_fits(1)); b.add_line(vec(1)); }