From 140a6660f63f88d05ba9aae0bf1c4b401bb6574d Mon Sep 17 00:00:00 2001 From: cirakg Date: Sun, 25 Oct 2026 14:17:45 +0100 Subject: fix(codes): encoding progress follows the work The QR percentage counted phases and the display froze at 90 % once encoding ended, so the first opening sat at 90 % while the slow stages ran. Each 2D symbology now weights its phases by measured cost, interpolates inside the long ones, and the display splits encode, pack and runs; a cached code counts its runs from 0. Co-Authored-By: Claude Opus 5.5 --- source/codes/ReedSolomon.mc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/codes/ReedSolomon.mc') diff --git a/source/codes/ReedSolomon.mc b/source/codes/ReedSolomon.mc index 58339ae..5fc75aa 100644 --- a/source/codes/ReedSolomon.mc +++ b/source/codes/ReedSolomon.mc @@ -171,6 +171,11 @@ module ReedSolomon { } } + // Progress 0-100 through the data symbols. + function percent() as Number { + return _data.size() > 0 ? 100 * _i / _data.size() : 100; + } + // Up to `symbols` more data symbols; true when all are in. function step(symbols as Number) as Boolean { var rem = remainder; -- cgit v1.2.3