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

certain things cause it to send gibberish to the serial terminal #7

Open
baconwaifu opened this issue Jul 23, 2014 · 1 comment
Open
Labels

Comments

@baconwaifu
Copy link

files returns gibberish for the filenames, even 8.3 short filenames
and sometimes the thing just starts spitting out gibberish to the terminal, try loading a file from SD card to see what I mean (just imagine seeing HHHHHHH repeating indefinitely until you hit the reset button on the card)

@AndreNeedham
Copy link

AndreNeedham commented Aug 1, 2016

The gibberish is because the function to output a string was changed to assume the string was in PROGMEM (program memory) but the filename strings coming off the SD card aren't PROGMEM. I fixed the issue for myself by making a version of printmsgNoNL that just outputs a string normally instead of doing pgm_read_byte. Something like:

void printFileNameNoNL(const unsigned char *msg)
{
while( *msg != 0 ) {
outchar( *msg );
msg++;
};
}

Then change the one line (2118?) in cmd_Files from:
printmsgNoNL( (const unsigned char *)entry.name() );
to:
printFileNameNoNL( (const unsigned char *)entry.name() );

I didn't see any other instance where a string was being printed that wasn't from PROGMEM.

@BleuLlama BleuLlama added the bug label Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants