mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Review feedback on #2691: `state` is bit-packed like its sibling `range` (end << 16 | start), and Bambu Studio decodes it with get_flag_bits(state, 0, 8). Masking with & 0xFF before clamping means a packed value decodes to the real percentage instead of clamping to 100. Also moves the uses_exhaust_fan_label import to the top of printers.py with the other imports. Tests: packed value (60 << 16 | 45) decodes to 45, and plain 0-100 values round-trip unchanged.