repetier / Repetier-Firmware

Firmware for Arduino based RepRap 3D printer.
815 stars 734 forks source link

SdFat V2/exFat support/various SD improvements #1050

Closed AbsoluteCatalyst closed 3 years ago

AbsoluteCatalyst commented 3 years ago

Hey. Finally got some more free time and finished this. I did take some small liberties and added a few things, but should all still run the same.

I slightly redid our sdcard class:

Tell me if I missed anything or removed/changed something I shouldn't have. I think everything is in working order.

repetier commented 3 years ago

Wow, what a big commit. So hard to say if something was forgotten. I like the addition of the enums. Last days did the same on my server code for some parts to make it more easy to read and prevent illegal values.

Also the settling when inserted is a good idea I think. So in total a great job and only testing and time will tell if something is missing.

AbsoluteCatalyst commented 3 years ago

Thanks. And yeah, I had some trouble remembering the sd.mode/active numbers and what they meant sometimes. Enum states help.

I had some worries when I moved around the prints that the hosts look for (eg. sd removed/inserted.) but I corrected this and they seem to be in order again.

There seems to be some very minor bugs with exFat cards right now. eg. It seems we need to use .sync(); even if O_SYNC is enabled. Not really a problem, and still good to be ahead of the curve with exFat. Very few 32gb sd cards on amazon now. In a year people might not even have a choice.

repetier commented 3 years ago

In deed. Didn't realize exFat is something different then fat until someone told me he could not mount exFat usb sticks on server image. Was easy to add support but I needed to add the package. On next debian it might already be a default package.