Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Replace calls to enqueue_now_P in anycubic_TFT.cpp with inject_P #4

Open
hub-jba opened this issue Dec 27, 2019 · 1 comment
Open

Comments

@hub-jba
Copy link

hub-jba commented Dec 27, 2019

Bug Description

In your 1.4.6 codebase you use the command enqueue_and_echo_commands_P() to send commands to the printer. From the comments in the code of Marlin 1.1.9 enqueue_and_echo_commands_P() actually aborts the current queue and queues your specified command immediately (see code snippet below). But in your Marlin 2.0 codebase you use the command queue.enqueue_now_P(). But from tracing this funciton it appears that enqueue_now_P() will enqueue this command on the end of the command queue, and if the queue is full (which happens if trying to do anything during an sdcard print) then the function just throws out any commands that don't fit on the queue silently.

The Marlin 2.0 code that does the closest thing to enqueue_and_echo_commands_P() is actually queue.inject_P(). Basically enqueue_now_P() will work for any commands from the TFT executed while the printer is not printing from SDCard (like say performing a bed levelling), but it won't work during an SDcard print.

My Configurations

Unchanged from your repository master

Steps to Reproduce

  1. Install Marlin 2.0 codebase
  2. Do an M502 and M500
  3. Load backed up M92 ,G29, M301, M304 values and store with m500
  4. Feed filament into the extruder but bypass filament sensor
  5. Add a small strip of filament in the filament sensor so that it does indicate filament outage
  6. Start any 3d print
  7. Pull the small strip of filament out of the filament sensor to trigger a filament runout

Expected behavior:

  1. Filament runout beeps
  2. Print head parks
  3. A prompt on screen telling you the filament runout has been triggered

Actual behavior:

  1. Printhead stops moving.
  2. No prompt on screen, no beep and no parked head

Additional Information

Code signature of original call in Marlin 1.1.9

/**
*   Record one or many commands to run from program memory.
*   Aborts the current queue, if any.
*   Note: drain_injected_commands_P() must be called repeatedly to drain the commands afterwards
*/
void enqueue_and_echo_commands_P(const char const pgcode) {
@github-actions
Copy link

github-actions bot commented Jul 6, 2020

This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.

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

No branches or pull requests

2 participants