c4ev3 / ev3duder

The LEGO® EV3 Downloader/UploaDER.
http://c4ev3.github.io/ev3duder/doc/html/globals_func.html
GNU General Public License v3.0
32 stars 12 forks source link

feat: rework ls command #20

Closed JakubVanek closed 4 years ago

JakubVanek commented 4 years ago

It appears that ls and dl should use the same algorithm for fetching data from the brick. Also, as CONTINUE_LIST_FILES is implemented in new EV3 firmwares, it is possible to reuse a the download algorithm for full ls implementation. This PR makes the ls and dl source code almost identical.

I have tested the changes against the stock 1.10E firmware and it seems to work correctly. If there is a regression, it should only trigger on directories with >1012 byte directory listings, as only then the CONTINUE_LIST_FILES command is issued.

Fixes https://github.com/c4ev3/ev3duder/issues/18