Skip to content

Commit

Permalink
Reduce max block size to 64 lines (#40)
Browse files Browse the repository at this point in the history
This fixes HL-1210W, maybe other HL printers as well?
  • Loading branch information
pdewacht committed Mar 25, 2019
1 parent 7b4bf38 commit 779f71e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class block {

private:
static const unsigned max_block_size_ = 16350;
static const unsigned max_lines_per_block_ = 128;
static const unsigned max_lines_per_block_ = 64;

std::vector<std::vector<uint8_t>> lines_;
int line_bytes_;
Expand Down
4 changes: 2 additions & 2 deletions test/test_block.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const lest::test specification[] = {
EXPECT(!b.empty());
},

"A block can contain 128 lines",
"A block can contain 64 lines",
[] {
block b;
for (int i = 0; i < 128; ++i) {
for (int i = 0; i < 64; ++i) {
EXPECT(b.line_fits(1));
b.add_line(vec(1));
}
Expand Down

0 comments on commit 779f71e

Please sign in to comment.