Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD Card won't update in UI? #243

Closed
emccarron opened this issue Sep 3, 2013 · 5 comments
Closed

SD Card won't update in UI? #243

emccarron opened this issue Sep 3, 2013 · 5 comments

Comments

@emccarron
Copy link

Files seem to upload to the SD card. Even after hitting "init SD card" the newly uploaded files don't show up.

The moment I do a M20 via the terminal, the files show up in the UI. I can see the file names parsed out in the serial log, but nothing seems to show up in any of the logs. No errors seem to be reported.

Branch: devel, Commit: 715dea7

@emccarron
Copy link
Author

Playing around, I notice that when you click INIT SD it shows the proper M21 in the terminal. Oddly enough, even if I M22 (release sd) and then M20, the UI file list seems to populate.

@emccarron
Copy link
Author

In my local comm.py, I added

    self.refreshSdFiles()

into the init code like so:

def initSdCard(self):
    if not self.isOperational():
        return
    self.sendCommand("M21")
            self.refreshSdFiles()

which forces the list of files to update. That worked, but I suspect the "isSdReady()" flag is never going true -- I never see the other options listed in index.jinja2 (release card, refresh sd files)

@emccarron
Copy link
Author

This is starting to look like Repetier again. When I do a M20, I don't receive "SD card ok" like comm.py is looking for, and so self._sdAvailable is never being set true.

Back to the drawing board.

@emccarron
Copy link
Author

Adding:

OUT_P_LN("SD card ok");

into the following chunk of code in SDCard.cpp:

void SDCard::initsd() {
sdactive = false;
#if SDSS >- 1
/if(dir[0].isOpen())
dir[0].close();
/
if(!fat.begin(SDSS,SPI_FULL_SPEED)) {
OUT_P_LN("SD init fail");
return;
}
fat.setStdOut(&out);
sdactive = true;
OUT_P_LN("SD card ok");
#endif
}

Seems to have solved that. Is there a list of standard 'responses' anywhere? I'm hesitant to bring this up over on the Repetier side of things...

@emccarron
Copy link
Author

Oh, when I changed the Repetier code, I took out the: self.refreshSdFiles() I had added into comm.py.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant