From aa488c0df45fefc1bf51faaa35a83c21e4614eb6 Mon Sep 17 00:00:00 2001 From: Padreug Date: Fri, 9 Oct 2026 21:42:36 +0200 Subject: [PATCH] fix(hal): widen the GTQ F56 note-length window to match USD/HNL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every quetzal note is 156 x 67 mm — physically the same note as USD and HNL, which the F56 table accepts at 146–166 (±10). GTQ was configured at ±5 (151–161), with Q5 and Q20 further centred on 158 rather than 156. This table was carried byte for byte from lamassu-machine, narrow window included. On a Tejo in GTQ it produced F56 error 82 00 (bill length, long) on every Q100 pick — 5/5 notes rejected, 0 dispensed, a false "out of cash" — byte-identical across transactions days apart, so the BDU was reading >161 mm consistently. The reject tray held single notes, not pairs, which rules out the offset double-pick the narrow window exists to catch. Every denomination now uses 0xa6 0x92 (146–166), identical to USD/HNL. Mirrors lamassu-machine b1cc3622 (2026-09-29), ported with permission as prior art. Verification: tsc clean. packages/hal has no test files (vitest exits 1, "No test files found") — recorded as ADR-005 review finding 10. --- packages/hal/src/dispensers/f56/bills.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/hal/src/dispensers/f56/bills.ts b/packages/hal/src/dispensers/f56/bills.ts index dad459c..299b688 100644 --- a/packages/hal/src/dispensers/f56/bills.ts +++ b/packages/hal/src/dispensers/f56/bills.ts @@ -77,13 +77,20 @@ export const bills: Record = { }, GTQ: { thickness: 0x0c, + // Every quetzal note is 156 x 67 mm — physically the same as USD and + // HNL, which accept 146–166 (±10). This table inherited lamassu's ±5 + // window (151–161) with Q5/Q20 centred on 158, and a Tejo in GTQ rejected + // 5/5 notes on every Q100 dispense with F56 error 82 00 (bill length, + // long): the BDU read >161 mm on every pick, and the reject tray held + // single notes, not pairs — so it was the window, not a double-pick. + // Widened to match USD/HNL, mirroring lamassu-machine b1cc3622. lengths: { - 5: [0xa3, 0x99], - 10: [0xa1, 0x97], - 20: [0xa3, 0x99], - 50: [0xa1, 0x97], - 100: [0xa1, 0x97], - 200: [0xa1, 0x97], + 5: [0xa6, 0x92], + 10: [0xa6, 0x92], + 20: [0xa6, 0x92], + 50: [0xa6, 0x92], + 100: [0xa6, 0x92], + 200: [0xa6, 0x92], }, polymer: false, },