-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added M118 message forwarding #2678
Conversation
@kisslorand Please, have a break with such kind of meaningless complaints. They contribute only to damage the project and the community. Thanks! |
@bigtreetech |
Closing just to avoid any infinite loop. This PR will be eventually submitted/adapted in the future once kisslorand's constraints will be satisfied or rejected |
Reopened after removal/solving all kisslorand's comments from code |
IMPROVEMENTS:
Added M118 message forwarding: Any M118 command read by TFT (e.g. printing from TFT or from remote host (e.g. OctoPrint etc.)) is parsed and forwarded to the provided TFT destination port/s, if enabled.
This feature allowed an easy implementation (just an M118 message) for:
The new
Serial_Forward
function was added to the existingSerialConnection
APIImplemented [FR] Send Pause and Stop Command While Remote Printing #2572: Now, as also reported in README.md, when on Printing menu, pressing on the pause, resume and stop buttons will trigger to the remote host the following notifications, respectively:
//action:notification remote pause
//action:notification remote resume
//action:notification remote cancel
The remote host must properly handle the received notifications. For example, if
//action:notification remote pause
is received then the remote host must effectively pause the print and sendM118 P0 A1 action:pause
in order to trigger the pause action to the TFT.Serial functions
syncL2CacheFromL1
andparseRcvGcode
moved fromparseAck.c
API toSerialConnection.c
API and renamed as the following, respectively:Serial_Get
(retrieve a message)Serial_GetFromUART
(retrieve messages from all the enabled supplementary ports storing them in the command queue (in interfaceCmd.c) for further processing)Serial functions in HAL's
Serial
API properly renamed (common naming convention) as:Serial_Put
(send a message)Serial_PutChar
(send only a char)Beeing part of the main changes of the PR, some code reduction and cleanup has been also provided in
interfaceCmd.c
:infoCmd
data queue renamed tocmdQueue
(by definition the wordcmd
(command) means a set of info). UsedcmdQueue
instead oncmd_queue
due it is not a primitive type (e.g. an array of chars) but a data structure (the use of_
and further.
(for an attribute) would result in a less readable textBeeing part of the main changes of the PR, some code reduction and cleanup has been also provided in
parseAck.c
(e.g.dmaL2Cache
buffer renamed to a more understandableack_cache
(an array of chars) etc.).fixes #2640
resolve #2572
resolve #2618
resolve #2638
PR STATE: Ready for merge