1
0
mirror of https://github.com/pdewacht/brlaser synced 2024-12-27 07:48:21 +01:00

Reduce max block size to 64 lines (#40)

This fixes HL-1210W, maybe other HL printers as well?
This commit is contained in:
Peter De Wachter 2019-03-25 20:57:51 +01:00
parent 7b4bf383bd
commit 779f71e80f
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ class block {
private: private:
static const unsigned max_block_size_ = 16350; 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_; std::vector<std::vector<uint8_t>> lines_;
int line_bytes_; int line_bytes_;

View File

@ -37,10 +37,10 @@ const lest::test specification[] = {
EXPECT(!b.empty()); EXPECT(!b.empty());
}, },
"A block can contain 128 lines", "A block can contain 64 lines",
[] { [] {
block b; block b;
for (int i = 0; i < 128; ++i) { for (int i = 0; i < 64; ++i) {
EXPECT(b.line_fits(1)); EXPECT(b.line_fits(1));
b.add_line(vec(1)); b.add_line(vec(1));
} }