edward0429 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

SD ls function broken #700

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Compile and run File > Examples > SD > CardInfo

What is the expected output? What do you see instead?

Expected output:

Files found on the card (name, date and size in bytes): 
_~1.TRA       2010-10-12 22:48:34 4096
TEST.TXT      2000-01-01 01:00:00 72
TRASHE~1/     2010-10-12 22:48:34
SPOTLI~1/     2010-10-12 22:48:34
  STORE-V1/     2010-10-12 22:48:34
    VOLUME~1.PLI  2010-10-12 22:48:34 348

Actual output:

Files found on the card (name, date and size in bytes): 
9512649.848265       2010-10-12 22:48:34 4096
84698384.848884      2000-01-01 01:00:00 72
84826583726912649/     2010-10-12 22:48:34
83807984767312649/     2010-10-12 22:48:34
  8384798269458649/     2010-10-12 22:48:34
    86797685776912649.807673  2010-10-12 22:48:34 348

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?

1.0-rc2

Please provide any additional information below.

The problem is on 593 in SdFile.cpp.  It uses Serial.print, relying on the 
pre-1.0 behavior to print unsigned char as char.  1.0 changed unsigned char to 
print as decimal integers.

Original issue reported on code.google.com by paul.sto...@gmail.com on 29 Oct 2011 at 5:55

GoogleCodeExporter commented 8 years ago
Here is a patch

Original comment by paul.sto...@gmail.com on 29 Oct 2011 at 6:01

Attachments:

GoogleCodeExporter commented 8 years ago
https://github.com/arduino/Arduino/commit/726acf77de30643ad0363152b416b6296b3bd6
22

Original comment by dmel...@gmail.com on 29 Oct 2011 at 9:32