Skip to content

Add sandbox-verified fix bundle for customisable QidiBox firmware (9 fixes) — coded by Hermes AI, NOT hardware-tested - #128

Open
kgrames wants to merge 2 commits into
qidi-community:mainfrom
kgrames:fixes/sandbox-verified-2026-08-05
Open

Add sandbox-verified fix bundle for customisable QidiBox firmware (9 fixes) — coded by Hermes AI, NOT hardware-tested#128
kgrames wants to merge 2 commits into
qidi-community:mainfrom
kgrames:fixes/sandbox-verified-2026-08-05

Conversation

@kgrames

@kgrames kgrames commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Adds customisable_qidibox_firmware/sandbox-fixes-2026-08-05/ — a patch set on top of the community .so → .py swap with 9 fixes (6 fork-independent + 3 mainline-drift shims).

⚠️ IMPORTANT — testing status & authorship

  • Coded by: Hermes, an AI coding assistant, with human review (2026-08-05).
  • NOT tested on a physical QIDI Plus 4 printer. All fixes were verified in a Klipper software sandbox only (Klipper's CI file-output debug mode, virtual MCUs, no serial/hardware). The sandbox runs mainline Klipper; the real printer runs QIDI's fork (1.8.1), so fork-only API calls were guarded but not exercised on hardware.
  • Use at your own risk. Keep your *.so backups, follow the install checklist, and test one change at a time. Community testing reports are very welcome.

Fix inventory

# File Fix Class
1 aht20_f.py 4× None-guards on i2c reads (connect/CCP/AFE paths) — connect crash when a read returns None fork-independent
2 box_extras.py accept buffer_pin config option (auto-generated box.cfg always emits it; without this the .py swap fails to boot) fork-independent
3 box_extras.py E_UNLOAD: get_temp_by_num() None → 190 °C default (front-panel unload crash) fork-independent
4 box_stepper.py note_kinematic_activity()get_last_move_time() (removed from mainline) mainline-drift
5 filament_motion_sensor.py QIDI-fork sensor + note_filament_present(eventtime, bool) signature mainline-drift
6 box_extras.py set_box_temp: box_max_temps KeyError + temp_info None guards (BOX_TEMP_SET crash with no box detected) fork-independent
7 box_extras.py TRY_MOVE_AGAIN: _00-suffix int-normalization + 2× None-temp guards (retry-button crash) fork-independent
8 box_extras.py heater.set_can_wait() guarded with hasattr (QIDI-fork-only API — TOOL_CHANGE_START crashes mainline) mainline-drift
9 box_extras.py filament_list_path config option (hardcoded /home/mks/... path broke non-QIDI hosts) + 3× None-guards (button_extruder_load ×2, QDE_004_009 retry path) fork-independent
box.cfg macro G1 E25 F300G1 E-25 F300 in UNLOAD_FILAMENT (stock unload extruded 25 mm instead of retracting — verified against QIDI's own generated template) fork-independent

Install checklist (all items verified REQUIRED in sandbox)

  1. box_macros.cfg must be present — registered CLEAR_FLUSH runs BOX_CLEAR_FLUSH; without it flushing silently no-ops (clogged nozzle / color bleed risk).
  2. officiall_filas_list.cfg + filament_list_path in [box_extras] — temp lookups read this file; the hardcoded default path only exists on QIDI printers.
  3. [filament_switch_sensor fila] section must exist (macros reference SENSOR=fila; missing → SET_FILAMENT_SENSOR error → shutdown).
  4. [box_extras] pins (real, from QIDI's own template): b_button_pin: ^mcu_box1:PB1, b_endstop_pin: mcu_box1:PA9, e_endstop_pin: mcu_box1:PA10, buffer_pin: ^mcu_box1:PB0.
  5. Box includes load AFTER heaters/extruder (box includes at the END of printer.cfg).

Full checklist + verification method: see the branch README.

What was NOT fixed (stock-firmware side)

  • QDE_004_024 / M104 S0 temp-stability (issue I-12): emitted by the stock .so module, not the community .py. Sandbox confirmed the .py path handles M104 S0 + re-heat cleanly, but the .so behavior needs QIDI.
  • Purge amounts (issue I-06): EXTRUSION_AND_FLUSH hardcodes ~180 mm of purge per change — separate config-level change.

How it was verified (reproducible)

  • Klipper file-output debug mode (-d dict -o out -i gcode), synthesized STM32-pin dictionary, 3 virtual MCUs.
  • 9 test files, all exit 0 with clean "Exiting" markers: boot, box command surface, unload macro (E-25 A/B), auto-reload + retry, tool change (TOOL_CHANGE_START/END + BOX_CHANGE_FILAMENT), purge (EXTRUSION_AND_FLUSH), temp stability (M104 S0 + re-heat), misc batch (RELOAD_ALL / CLEAR_RUNOUT_NUM / TIGHTEN_FILAMENT).
  • Fork-only command warnings observed on mainline (fine on the real fork): QIDI_PROBE_PIN_2, BED_MESH_CLEAR, CLEAR_MOTION_DATA.

@kgrames

kgrames commented Sep 7, 2026

Copy link
Copy Markdown
Author

Hi @vega-d (and any other maintainers) — gentle bump on this one, since the repo has been quiet for a few weeks.

Confirming it is ready for review from our side:

Happy to adjust code style, split the PR, add docs, or provide detail on any individual fix. Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant