Closed mrv96 closed 3 years ago
This PR needs still a little bit of tuning. Please don't merge it yet.
Done. Now IMHO it is ready to be merged.
Is it necessary to call release()
and mount()
every time the menu is opened? Can't we just call mount()
if isMediaInserted()
returns false?
No. If you see the commits history i tried. Once first card.mount() is performed, isMediaInserted() returns Always true. Hence at least mount() must be executed each time. I called also release() method due to this: https://marlinfw.org/docs/gcode/M022.html that suggests to call M22 before M21
Da: Desuuuumailto:notifications@github.com Inviato: domenica 10 gennaio 2021 18:47 A: Desuuuu/Marlinmailto:Marlin@noreply.github.com Cc: mrv96mailto:marione96@live.it; Authormailto:author@noreply.github.com Oggetto: Re: [Desuuuu/Marlin] Support for board without SD_DETECT_PIN (#14)
Is it necessary to call release() and mount() every time the menu is opened? Can't we just call mount() if isMediaInserted() returns false?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Desuuuu/Marlin/pull/14#issuecomment-757515134, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADD27VSNHSY3WI6EIMX24CDSZHR2DANCNFSM4VZE6LTQ.
I realize isMediaInserted()
will always return true until the card is manually released, but does this cause any issue? Does the SD card not work after being re-plugged in this case?
IMHO mount() is sufficient, but i followed https://marlinfw.org/docs/gcode/M022.html because it is the recommended procedure if the sd is in an unknow status. If SD_DETECT_PIN is not valid I consider that sd is always in an unknow status
Da: Desuuuumailto:notifications@github.com Inviato: domenica 10 gennaio 2021 19:00 A: Desuuuu/Marlinmailto:Marlin@noreply.github.com Cc: mrv96mailto:marione96@live.it; Authormailto:author@noreply.github.com Oggetto: Re: [Desuuuu/Marlin] Support for board without SD_DETECT_PIN (#14)
I realize isMediaInserted() will always return true until the card is manually released, but does this cause any issue? Does the SD card not work after being re-plugged in this case?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Desuuuu/Marlin/pull/14#issuecomment-757517024, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADD27VXKBDYPJJBH65UYDT3SZHTMJANCNFSM4VZE6LTQ.
I understood your comment only right now (https://github.com/Desuuuu/Marlin/pull/14#issuecomment-757517024). During my tests, if you mount a SD, then you remove and re-insert it, you must mount it again. Otherwise the SD is not correctly read.
Thanks for the details! I made a few changes (the release()
call wasn't really doing anything, as you thought).
This should be ready to merge.
It seems ok. What does card.cdroot() do?
It navigates to the root directory of the SD card. That way the user should always be at the root of the SD card when the menu is opened.
Ok. Perfect. For me merging is fine
This PR allows your fw to works with board without SD_DETECT_PIN. This is also helpful in case of SD external cable. With theese kind of cables the mechanic insertion of sd cards is not detected.