luc-github / ESP3D-WEBUI

A Web UI for ESP8266 or ESP32 based boards connected to 3D printers / CNC
GNU General Public License v3.0
751 stars 305 forks source link

Auto Macro #34

Closed ModMike closed 5 years ago

ModMike commented 5 years ago

Started playing with macros and they are very cool.

I need to send a G-Code every time the host starts, is there any way to do that?

Also is there a list of all the ESP commands I can put in a macro?

luc-github commented 5 years ago

the macro are part of webUI so not sure it is best way what do you call the "host start" the printer FW ? the remote host? the public commands are : https://github.com/luc-github/ESP3D/blob/master/docs/Commands.txt

Azteeg WiFi has more commands releated to its features

ModMike commented 5 years ago

Isn't it 4:00 am for you? You sure are dedicated!

One of the limitations of the Marlin implementation is that the SD card is not auto mounted, making Auto power off resume impossible. I want to send an M21 code every time the board has finished booting. Can I stick it in somewhere?

luc-github commented 5 years ago

Nope I am in Taiwan now so 10:50 am ^_^ Yes I see the discussion. Does not Marlin has a auto sd filename ? Also are you sure the SD detect pin does not go to also to main mcu. As it should be a shared pin between azteeg and esp

ModMike commented 5 years ago

I checked the schematics on dip trace and it goes straight to ESP8266, so no SD detect, that I know of, unfortunately.

I will recheck dip trace.

luc-github commented 5 years ago

the SD detect tel smoothieware to read SD content again if modified but I do not have azteeg wifi so I cannot confirm sorry

luc-github commented 5 years ago

this should be a part of Marlin FW - that said adding an auto macro file when esp3D start is possible but also dangerous if happen when no expected like during a print

ModMike commented 5 years ago

I am not sure I understand, how can the machine be printing if the controller is rebooting?

luc-github commented 5 years ago

It is not what I wrote - I wrote ESP3D can restart for unexpected reason : ESP crash then restart / manual restart of ESP / short in power of ESP (this one is unlikly possible on Azteeg WiFi/ etc... So adding an auto macro to ESP instead of Marlin could be a problem - but this is a risk management

ModMike commented 5 years ago

Je comprends vite si tu me l'explique longtemps!

Well the worst it would do is mount SD card, no harm there. I wrote Roy to ask him about shared SD detect. Let's wait for his response.

Have a good trip!

luc-github commented 5 years ago

but you can add custom init in Marlin 2.X it should solve your problem in your HAL :

#define HAL_INIT 1
void HAL_init(void);

and in your HAL_init() in cpp do what you need to do auto mount

ModMike commented 5 years ago

I could but it would never be merged, meaning future users will be in the cold. If we do it via WEB UI, every X5 Mini customer has it.

luc-github commented 5 years ago

if you add a #define for the board it limit to the board targeted

IMHO you could push a solution like :

FORCE_SDMOUNT 1

in configuration.h

and force SD mount at boot if define is set

Not only Azteeg board should have this problem

I am surprised this not already available

luc-github commented 5 years ago

anyway I have added it in todo list https://github.com/luc-github/ESP3D/issues/270

that said there is already an option at start for azteeg wifi to check update on SD - so just need to add M21 before doing it - it is quick and dirty but should be ok

luc-github commented 5 years ago

As I moved issue to ESP3D I guess this topic can be closed

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.