lw.comm-server icon indicating copy to clipboard operation
lw.comm-server copied to clipboard

Smoothieware List SD and Play SD functionality

Open ghost opened this issue 8 years ago • 19 comments

websocket -> listSD -> runs a http://smoothieware.org/console-commands#ls, (try and get results recursively? even if it means manually going deeper) -> Returns ws event to frontend with array of files.

Frontends displays list of files with a PLAY button Play button sends ws event to lw.comm-server: to http://smoothieware.org/console-commands#play

ghost avatar Jun 01 '17 18:06 ghost

If we do that, we should also make file upload available, even if it is dead slow.

cprezzi avatar Jun 04 '17 11:06 cprezzi

Agreed.

On Jun 4, 2017 1:42 PM, "Claudio Prezzi" [email protected] wrote:

If we do that, we should also make file upload available, even if it is dead slow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/30#issuecomment-306035013, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2xOvDGnW-l1KaS80i1ZWl1eIS_TTks5sAphBgaJpZM4NtX4F .

ghost avatar Jun 04 '17 11:06 ghost

See https://github.com/LaserWeb/deprecated-LaserWeb3/issues/138#issuecomment-253009463

  • in testing it was faster than M28 indeed. If you can, please implement it so it can be used with esp and ethernet too?

On Jun 4, 2017 1:45 PM, "Peter van der Walt (Gmail)" < [email protected]> wrote:

Agreed.

On Jun 4, 2017 1:42 PM, "Claudio Prezzi" [email protected] wrote:

If we do that, we should also make file upload available, even if it is dead slow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/30#issuecomment-306035013, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2xOvDGnW-l1KaS80i1ZWl1eIS_TTks5sAphBgaJpZM4NtX4F .

ghost avatar Jun 04 '17 11:06 ghost

I have started implementing SD support for Smoothieware and MarlinKimbra in branch SD_support :)

cprezzi avatar Jun 06 '17 16:06 cprezzi

Couple checklists to SD implementation

[ ] track progress: https://github.com/openhardwarecoza/CoPrint/blob/gh-pages/public/js/socketcomms.js#L152 (when running sd, same as playing, disable jog, show progress (instead of queue) etc)

[ ] reenable jog etc once done running sd job

[ ] custom icons for gcode, config, firmware (just makes it more user friendly

[ ] upload

[ ] list sd files

[ ] select a file to play it

[ ] ability to abort /pause job while running off sd (existing buttons)

ghost avatar Jul 03 '17 16:07 ghost

Bonus points. Can we also make it work over the Telnet implementation? I am still working on the esp8266 bridge (boards came in last week) (:

ghost avatar Jul 03 '17 16:07 ghost

Cool, i see @cprezzi already has pause, stop, progress, even rm and mv https://github.com/LaserWeb/lw.comm-server/blob/SD_support/server.js#L2157 in backend. So the above notes was more useful for @jorgerobles (; for frontend

ghost avatar Jul 03 '17 16:07 ghost

Sorry I was away. Gonna review all the thread

jorgerobles avatar Jul 03 '17 17:07 jorgerobles

Hehe yeah sorry, some of it happened in #30 too

ghost avatar Jul 03 '17 17:07 ghost

image

jorgerobles avatar Jul 03 '17 18:07 jorgerobles

Basic stub available on https://github.com/LaserWeb/LaserWeb4/tree/filemanager @cprezzi

jorgerobles avatar Jul 03 '17 18:07 jorgerobles

@cprezzi if can prepare the file tree as https://github.com/woodpig07/react-nested-file-tree will be fine Don't worry for nesting. you could do only current directory and will sort out working. @openhardwarecoza I will try to resemble coprint, as this component is very flexible.

jorgerobles avatar Jul 03 '17 18:07 jorgerobles

No problem (: was just mentioning it as a sort of 'did work' UI. (;

Tree looks nice, might just hurt performance since you'd need to get list of current dirz then seperately ls each subdir

On Jul 3, 2017 8:43 PM, "jorgerobles" [email protected] wrote:

@cprezzi https://github.com/cprezzi if can prepare the file tree as https://github.com/woodpig07/react-nested-file-tree will be fine Don't worry for nesting. you could do only current directory and will sort out working. @openhardwarecoza https://github.com/openhardwarecoza I will try to resemble coprint, as this component is very flexible.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/30#issuecomment-312712129, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr21seVwHbwBcK2xQLadP9L9dF_LIeks5sKTZNgaJpZM4NtX4F .

ghost avatar Jul 03 '17 18:07 ghost

I think Peter is right about performance. It could be very slow to recursively scan the whole SD card to build the tree object for the filemanager.

cprezzi avatar Jul 03 '17 22:07 cprezzi

Hmm the component only paint the data sent. Send one folder content and that's all.

El 4 jul. 2017 12:07 a. m., "Claudio Prezzi" [email protected] escribió:

I think Peter is right about performance. It could be very slow to recursively scan the whole SD card to build the tree object for the filemanager.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/30#issuecomment-312741493, or mute the thread https://github.com/notifications/unsubscribe-auth/ABoIYM07fEwLBvEx8AEp2el7ZxSxQGRoks5sKWYsgaJpZM4NtX4F .

jorgerobles avatar Jul 04 '17 05:07 jorgerobles

@jorgerobles Does it make sense to use this lib, if we don't need the tree feature? I don't like unnecessary dependencies (overhead). We just need a list with buttons. I think I'll try to implements Peters list in the modal dialog ;)

cprezzi avatar Jul 04 '17 10:07 cprezzi

@cprezzi this lib does not force be recursive. It's easy to show a single folder contents without recursion, and folderClickHandler could do whatever is needed,

  • as loading the inner folder showing recursion; or
  • wipe painted data and show the inner folder.

In either way, performance will not be a problem. The first way should update the state contents of the opened branch upon loading. The second way will replace all the state data, bringing the same "one folder" appearance.

jorgerobles avatar Jul 04 '17 14:07 jorgerobles

Anyway.. is your call 😄

jorgerobles avatar Jul 04 '17 14:07 jorgerobles

I was concerned about the performance of the serial communication, not the frontend component. We'll see what I can make out of it ;)

cprezzi avatar Jul 04 '17 14:07 cprezzi