grblHAL / ESP32

grblHAL driver for ESP32
Other
70 stars 42 forks source link

[ESP32 WebUI] Missing Axis control in UI. #18

Closed dianlight closed 1 year ago

dianlight commented 2 years ago

Hi, I note that only X ,Y axis control is present in WebUI but the ESP3D project is ready to control up to 6 axis. I check the code ( also the WebUI code ) and I find that the problem is a missing axis data on initial string.

With a simple add on the webui/commands.c I was able to view the other axis control and I don't found any issue using its.

image

This is the patch ( too small for a PR ).

diff --git a/main/webui/commands.c b/main/webui/commands.c
index 732cf09..be89b81 100644
--- a/main/webui/commands.c
+++ b/main/webui/commands.c
@@ -399,6 +399,19 @@ static bool get_firmware_spec (void)
     strcat(buf,"(AP mode)");
     #endif
     #endif
+    
+    strcat(buf, "# axis:");
+    #ifdef C_STEP_PIN
+    strcat(buf, "6");
+    #elif defined B_STEP_PIN
+    strcat(buf, "5");
+    #elif defined A_STEP_PIN
+    strcat(buf, "4");
+    #elif defined Z_STEP_PIN
+    strcat(buf, "3");
+    #elif
+    strcat(buf, "2");
+    #endif

     webui_print(buf);

Also I see it's missing in the webui plugin for non ESP32 boards.

L.

terjeio commented 2 years ago

Fix is up, I have used the N_AXIS setting from the core as the pins definitions may not always be available. Thanks for reporting.