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

Add better support for Printer SD / TFT SD /TFT USB from ESP3D and other extern prog #648

Merged
merged 6 commits into from
May 8, 2020

Conversation

luc-github
Copy link
Contributor

@luc-github luc-github commented May 3, 2020

Description

Add better support for listing files / start print / delete file of TFT SD and TFT USB, uploading file to printer SD and TFT capabilities

Benefits

More features allowing listing files / start print / delete file of TFT SD and TFT USB
by adding a hook when SD: or U: is added in front of file path
e.g.:
M20 SD: List TFT SD files
M20 U:: List TFT USB files

M20 SD:
Begin file list
/MKS.CUR/
End file list
ok
M20 U:
Begin file list
/eclipse/
/Arduino - 1.6.9 -Due 1.6.8/
/GitHub/
/ld5110/
End file list
ok

this apply to:

  • M23 and M24 to print file from TFT SD and TFT USB,
  • M25 to pause print file from TFT SD and TFT USB
  • M27 to get print status from print file from TFT SD and TFT USB
  • M30 to delete file from TFT SD and TFT USB
  • M524 to abort printing from TFT SD and TFT USB

Additional features

  • M115 TFT give TFT capabilities that could be usefull for ESP3D or any other external program connected to Serial2, and informations can be added of course - this is POC
M115 TFT
FIRMWARE_NAME: .26.1 SOURCE_CODE_URL:https://github.com/luc-github/BIGTREETECH-TouchScreenFirmware/tree/esp3d-support
Cap:TOOL_NUM:1
Cap:EXTRUDER_NUM:1
Cap:FAN_NUM:1
ok
  • M28 / M29 now disable/enable TFT polling and so allow to upload files to printer SD card using this protocol

  • M300 TFT to send M300 gcode to TFT only if printer does not support it

Note: I did not added the upload to TFT SD neither TFT USB but it can be added later

Related Issues

#261

@AntoszHUN
Copy link
Contributor

Hi!

This sounds good. Could it be possible to support ESP32-CAM as well? Maybe we can solve it so that we can monitor the printer remotely with the camera?

@luc-github
Copy link
Contributor Author

what the tft must do to support esp32 cam?
anyway this should be another PR

@luc-github luc-github changed the title Add better support forPrinterS / TFT SD /TFT USB from ESP3D and other extern prog Add better support for Printer SD / TFT SD /TFT USB from ESP3D and other extern prog May 4, 2020
@AntoszHUN
Copy link
Contributor

I do not know. I just asked how this could be solved.

@luc-github
Copy link
Contributor Author

luc-github commented May 4, 2020

@AntoszHUN you do not know what kind of support you ask for ? I am sorry I do not understand

I just asked how this could be solved.

But what need to be solved ? You must have an idea of what you expect if you ask for it

it is confusing - I suggest you to post a Feature request explaining what you expect/wish

Note: ESP3D already support ESP32 Cam - but there is not relationship with TFT code and this PR

@AntoszHUN
Copy link
Contributor

AntoszHUN commented May 4, 2020

Sorry! Maybe the translator didn't translate well what I wrote. I started a request but no one has responded to it yet. I started several days ago. #597 There is no answer. Am I just interested in seeing the print from a distance? Could it be programmed into the TFT program?

@luc-github
Copy link
Contributor Author

luc-github commented May 4, 2020

This #597 is not related to this PR at all but bring confusion

you can connect an ESP32-cam or any ESP board to the TFT - you just need to do proper wiring - no need any update in TFT code as the camera do not need to communicate with the TFT

@AntoszHUN
Copy link
Contributor

I understand. So can I still see the camera image from a distance?

Add M300 TFT support to use buzzer
@guruathwal
Copy link
Contributor

@luc-github will it be feasible to use a G-code prefix other than G & M for these TFT Host controllers like C, or H for communication between TFT and ESP3D?
This way it will be easier to communicate between TFT and ESP3D and also avoid g-code confusion among the users.

@luc-github
Copy link
Contributor Author

luc-github commented May 6, 2020

well I have used standard GCODE why introduce new ones ? they are documented and function is identical to original usage
if the target file do not start is with SD: neither U: it is not catched by TFT and go to printer

m20 SD:myfile.gco vs M20 SD:myfile.gco

I feel more confusing to use different gcode for same purpose

and in all case need to put the target source of the file SD: and U: to let tft know which is the target

@guruathwal please explain more your proposal as I do not see the point sorry

Uz45 added a commit to Uz45/BIGTREETECH-TouchScreenFirmware that referenced this pull request May 7, 2020
@bigtreetech bigtreetech merged commit 4d8c1be into bigtreetech:master May 8, 2020
Uz45 added a commit to Uz45/BIGTREETECH-TouchScreenFirmware that referenced this pull request May 8, 2020
@guruathwal
Copy link
Contributor

@luc-github I am not discussing this PR. I was talking about overall functionality. like switching to a specific menu on TFT from ESP, Starting or stopping a function on the TFT like the M105 / M114 polling loops or disconnecting & connecting the serial to the printer etc.

@luc-github
Copy link
Contributor Author

luc-github commented May 8, 2020

@guruathwal ok I understand better, thank you for clarifying

I think any function can be added, it is just a matter of specs ^_^

the key point is the command need to be catched and not forwarded to printer
there are many possible syntax I think :

  • use specific prefix not looking as real GCODE like BTTXXX <param>, FYR I use [ESPXXX] <param> in ESP3D where XXX is a number

  • use unused GCODE where parameter are the commands specific to TFT itself but need to be sure this won't be used by printer
    B1000 AUTOTEMP OFF

  • Use targeted command with extra specific parameter allowing TFT to catch the command
    M155 - Temperature Auto-Report
    M155 BTT S0

  • Use lower case gcode
    IMHO is not best option, betterto keep upper case and keep consistent command, so it should be avoid

  • Use shell command like smoothieware do
    I think it make them to be isolated and catched by TFT more complex when GCODE processor is there already in TFT - should be avoid too

I personnaly think the third one should be used when GCODE exists for consistency to avoid to create new code when function exists for printer
for the specific functions I think any of the 2 first can be used but need to stick to the one chosen

I won't recommand the 2 last as wrote but they are also possible

The limit is your imagination 😸

@guruathwal
Copy link
Contributor

@luc-github I think the first one is well suited for this purpose.

@rozenrod
Copy link

rozenrod commented May 8, 2020

I want to know if it will be possible in the future to send files to TFT SD directly from CURA, approximately like in octoprint or MKS WiFi?

@Wesie
Copy link

Wesie commented Jun 21, 2020

I will be happy, if the possibility to upload a file to the tft SD or USB will be available soon.
Please add the feature into the code

jeffeb3 pushed a commit to jeffeb3/BIGTREETECH-TouchScreenFirmware that referenced this pull request Jul 20, 2020
…her extern prog (bigtreetech#648)

* Broadcast temperatures to Serial 2
* Allow to list TFT SD and TFT USB using GCODE
* Allow Upload to Printer SD by disabling TFT polling during upload
* Revert to original github address in M115
* Fix bad copy/past paste in M115
Add M300 TFT support to use buzzer
@kisslorand
Copy link
Contributor

kisslorand commented Feb 3, 2021

Note: I did not added the upload to TFT SD neither TFT USB but it can be added later

This would be pure awesomeness!
Binary file transfer implemented would be another great addition. It would be usable for firmware updates for both the TFT and the motherboard.

@luc-github
Copy link
Contributor Author

@kisslorand luc-github/ESP3D#575 need to be done first to implement serial upload

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.

7 participants