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

Added file upload feature + code optimization + bug fixes #2431

Merged
merged 16 commits into from
Mar 21, 2022

Conversation

digant73
Copy link
Contributor

@digant73 digant73 commented Mar 6, 2022

IMPROVEMENTS:

  • Added file upload feature in interfaceCmd.c: It's now possible to upload files (with M28 and M29) from a remote host connected to TFT (e.g. ESP3D, OctoPrint etc...) to a TFT media (TFT SD card or TFT USB disk). Use M28 SD:<file path> or M28 U:<file path> to select and open the target file. Use M29 to close the file. Any command between M28 and M29 will be written on the file. Commands with checksum are also allowed although the TFT will simply skip it (checksum is currently not used/supported by TFT). Obviously, checksum (if any) is always removed when the command is written in the file (e.g. N0 M106*36 -> M106). When in writing mode (both the TFT or onboard media), the reminder message TFT in Listening Mode! is displayed (see picture below) until the writing is completed (M29 received). That message means also that all the commands generated by the TFT are discarded (neither processed by TFT nor sent to mainboard).
  • Code optimization in parseAck.c and interfaceCmd.c:
  • Added getChecksum and validateChecksum functions in my_mish.c/h: They are currently not used (so no extra FLASH space). They will be available for further PRs.

BUGFIXES:

  • Fixed cmd_start_with function in interfaceCmd.c: It didn't work on M117 in case checksum was present in the gcode. Furthermore, fixed a possible out of buffer in M117 message
  • Fixed missing assignment of style in addToast function. That bug caused a random style (typically Info style was used) and sound when a toast message was displayed.
  • Fixed file upload towards onboard media: Previously, the commands were also processed by the TFT causing a lot of errors during the file transfer. Now any command received by the TFT between M28 and M29 is not processed by TFT (it is simply forwarded to onboard). Note: Marlin requires that all the commands (between M28 and M29) to save on the file are provided with checksum (used as CRC during the command transfer).
  • Fixed wrong Switching menu displayed when aborting a print in Marlin mode with infoSettings.serial_always_on enabled.

PR STATE: Ready for merge

Ready_0

@digant73 digant73 changed the title Code optimization + bug fixes Added file upload feature + code optimization + bug fixes Mar 8, 2022
@bigtreetech bigtreetech merged commit 65da9d7 into bigtreetech:master Mar 21, 2022
mehmetsutas pushed a commit to mehmetsutas/BIGTREETECH-TouchScreenFirmware that referenced this pull request May 24, 2022
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.

2 participants