Skip to content

Commit 6f4de42

Browse files
committed
Fix checksum generation.
The algorithm used for checksum generation is not explicitly specified in the .goo format spec and was implemented wrong until now. The printer ignores the checksum so this wasn't a problem. This implementation is now equivalent to the one used in UVTools.
1 parent f6f4fb2 commit 6f4de42

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/libslic3r/SLA/RasterBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ EncodedRaster GOORLERasterEncoder::operator()(
226226

227227
// Write checksum
228228
uint8_t checksum =
229-
std::reduce(output_buffer.begin() + 5, output_buffer.end(), 0, std::bit_xor<uint8_t>{});
229+
~std::reduce(output_buffer.begin() + 5, output_buffer.end(), 0, std::plus<uint8_t>{});
230230
output_buffer.push_back(checksum);
231231

232232
// Write delimiter

src/libslic3r/SLAPrintSteps.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,8 +1145,6 @@ void SLAPrint::Steps::merge_slices_and_eval_stats() {
11451145
else
11461146
fast_layers++;
11471147

1148-
BOOST_LOG_TRIVIAL(error) << sliced_layer_cnt << ' ' << total_layer_time;
1149-
11501148
layers_times.push_back(total_layer_time);
11511149
estim_time += total_layer_time;
11521150
}

0 commit comments

Comments
 (0)