Snapmaker2-Controller icon indicating copy to clipboard operation
Snapmaker2-Controller copied to clipboard

Improvement: Set system status to started when print timer started (M75)

Open nivekmai opened this issue 1 year ago • 4 comments

Add an event to be sent to systemservice when a job is marked as started with M75.

Motivation: Currently, when a print is started from octoprint (or anything not the HMI), the SystemService.cur_status_ is not updated. This then causes us to not handle filament runout, since there's a conditional check that the status must be SYSTAT_WORK: https://github.com/Snapmaker/Snapmaker2-Controller/blob/main/Marlin/src/feature/runout.h#L100

Additionally, M75 and M77 are currently "unsupported". I'm assuming that this is just that they are not actually upgraded to work with Snapmaker's cusotmiztions.

We can use M75 and M77 to update the system service status so that runout detection is activated when a print job is "started".

This diff will add the necessary SystemService calls to make sure that SystemService status is set to SYSTAT_WORK when a job is in progress (after M75) and back to SYSTAT_IDLE when the job finishes.

By itself, this will have no influence on the operation of the machine, since luban and the HMI do not ever use M75 or M77. However, in combination with some configuration in octoprint, this diff enables the ability for runout detection to be triggered when printing via octoprint.

nivekmai avatar Jan 16 '25 04:01 nivekmai

Thank you for your contribution. We will carefully review and consider them for inclusion in the next iteration.

huang-w-y avatar Jan 17 '25 03:01 huang-w-y

@huang-w-y what is the time frame for reviewing this PR? This is a needed item for some that are not using luban.

johnwc avatar Jan 19 '25 20:01 johnwc

I would also like to see this reviewed and included. Any updates?

jvilhuber avatar Aug 07 '25 07:08 jvilhuber

@parachvte @zauguin @kai-waang You all seem to be the few that are still active in GH, who can help with this PR?

johnwc avatar Aug 07 '25 16:08 johnwc