QiTech-Industries / Winder

Filament winding machine powererd by ESPdruino
GNU General Public License v3.0
27 stars 7 forks source link

Winding-stats (length, layers) do not update at all #14

Open happybrick opened 2 years ago

happybrick commented 2 years ago

Describe the bug When winding, the stats for layers / length wound (and resulting weight) don't update

To Reproduce Steps to reproduce the behavior:

  1. Start the winder
  2. Connect and open in browser
  3. Switch to control view
  4. Start winding
  5. Observe the stats in the lower section

Expected behavior The mentioned stats should update at all (and frequently) or the cards should be completely removed.

Screenshots / Logs N/A

happybrick commented 2 years ago

Currently the backend is supposed to provide stats on windings and layers, which has yet to be implemented: https://github.com/QiTech-Industries/Winder/blob/a333f743f68a83dbed4d938a98187a8aa299d0cc/esp/src/QiMachineWinder.cpp#L399-L400 The correspending part in the webfrontend would be https://github.com/QiTech-Industries/Winder/blob/a333f743f68a83dbed4d938a98187a8aa299d0cc/client/src/utils/StatsProvider.js#L44-L45 ...and the display itself: https://github.com/QiTech-Industries/Winder/blob/a333f743f68a83dbed4d938a98187a8aa299d0cc/client/src/components/Spool.js#L11-L33

In my opinion, measuring the length based on the puller-speed and the layers based on ferrari-position would yield way better results than trying to used "windings". This however would require an adjustment of the json-field-name or a redefinition of how "w" suddenly means "length in meters".