OpenBuilds / OpenBuilds-CONTROL

OpenBuilds CONTROL: Download from https://software.openbuilds.com
https://software.openbuilds.com
GNU General Public License v3.0
169 stars 104 forks source link

grbl settings tab doesnt load after F5 refresh #292

Closed sharmstr closed 1 year ago

sharmstr commented 1 year ago

Low priority issue . Noticed that grbl tab doesnt display when connected to controller after an F5 refresh. This happens via USB and WIFI. Only tested on X32

petervanderwalt commented 1 year ago

Did a quick test and it does display over here. X32 connected. Curious what might be different. Any clues in devtools console on refresh?

issue292

sharmstr commented 1 year ago

Strange. I've tried 3 different computers running win10 and win11. Tried USB and WIFI. Nothing in serial console or chrome console. No macros loaded. Happens on localhost:3000 as well. Clicking disconnect and connect brings it back. Only difference I see is that I'm on .344 since .345 hasnt been released yet. I suppose ignore it for now. Really not worth spending time on.

[11:34:01] [ 3D Viewer ] WebGL Support found! success: this application will work optimally on this device!

[11:34:01] [ websocket ] Bidirectional Websocket Interface Started Succesfully

[11:34:02] [ update ] Checking for Updates

[11:34:03] [ update ] You are already running OpenBuilds CONTROL 1.0.344

image

sharmstr commented 1 year ago

Just tested on my OG BB and it works as expected. Its only happening on X32.

sharmstr commented 1 year ago

Ok. It happens after a firmware flash when "Flash firmware and erase settings" is selected. It works correctly after assigning a machine profile. So it seems to only happen when laststatus.machine.name = ''. Hope that helps.

petervanderwalt commented 1 year ago

Ok. It happens after a firmware flash when "Flash firmware and erase settings" is selected. It works correctly after assigning a machine profile. So it seems to only happen when laststatus.machine.name = ''. Hope that helps.

That mustve been a hard pattern to pick up on - so well done! That would certainly help, as I would never have guessed. Replicated, but not dug in yet - will get on with it! (:

petervanderwalt commented 1 year ago

OK, I could not replicate the I$ connection But did find the bug in https://github.com/OpenBuilds/OpenBuilds-CONTROL/blob/f3bcf217de1d2d669ab88b41b8368cbbe06e6788/index.js#L627-L650 - the safetosend thing was some testing workaround for the Driverminder circuit on the old xPro that could hold Reset pin down on something like that. Commented it out for now, so it just emits the io.sockets.emit('grbl', status.machine.firmware) upon connection (like from a refresh) > which in turn triggers showGrbl() in frontend

petervanderwalt commented 1 year ago

Fixed in V1.0.345

sharmstr commented 1 year ago

Awesome! I'll admit that I got lucky. Thank you!