prusa3d / Prusa-Firmware-MMU

Other
35 stars 19 forks source link

Fix issue where firmware panic error code is overwritten #232

Closed gudnimg closed 2 years ago

gudnimg commented 2 years ago

If QUEUE_FULL error happened, it would be overwritten as INTERNAL and incorrectly display FW_RUNTIME_ERRORon MK3S.

The fix is to add handling for ERRInternal in every StepInner() and forward the error to higher application layer.

Steps to reproduce:

  1. Set blockBufferSize = 1 in config.h
  2. Build and flash the firmware
  3. On the MK3S, click Load To Nozzle and select any filament.
  4. Once the MMU starts feeding to the gears, the issue appears.
  5. Notice how the printer says its FW_RUNTIME_ERROR when it should actually be QUEUE_FULL.

Running the steps above:

BEFORE AFTER
IMG_2582 IMG_2584