gsender icon indicating copy to clipboard operation
gsender copied to clipboard

Mi 759 delay machine connection status until grbl instance is created

Open ssamal2801 opened this issue 1 year ago • 3 comments

Changes made:

  • User gets a feedback when GRBL is loading. Machine connection says ‘Loading firmware...'

  • Machine disconnects with toast message if GRBL is not ready in 5 seconds

Toast message: 'Unable to fetch firmware details in time'

ssamal2801 avatar Aug 26 '22 06:08 ssamal2801

As mentioned in discussions "Loading" is the incorrect term since we're not loading anything, it's "Connecting" which should be the term used.

Forcing disconnect is also not functionality we want - we want to alert the user (error in machine status area, toast as well) but keep the connection active and just inform the user.

kglovern avatar Aug 26 '22 14:08 kglovern

Done!

ssamal2801 avatar Aug 26 '22 15:08 ssamal2801

All requested changes have been pushed. Bug fixed: Machine status shows 'disconnected' while connecting instead of 'Invalid firmware response'.

ssamal2801 avatar Aug 26 '22 19:08 ssamal2801

I'm a little confused where you actually check whether the firmware exists.

As far as I can tell:

inside initController, we send "$$" to fetch settings - and you immediately send a "grbl:ready" event. At no point do you check to see if the firmware sent a response.

"grbl:ready" is listened to inside controllerSagas and ALWAYS sends true along with the "grblExists:update". Where is it possible to send "false" as a value? So at this point it both a) never checks for a response and b) can never send anything but "true" as a value.

This means the check timeout will always evaluate to true and notification is never sent.

The goal was to verify whether the device we (successfully) connect to actually contains a firmware instance and update the machine status area accordingly instead of leaving it saying "disconnected" while the connection area says "connected". Where is this check actually run - since as far as I can tell there is no logic to do so.

kglovern avatar Sep 26 '22 19:09 kglovern