Problems with SD card

For any Plan B specific topics
User avatar
dragonator
Site Admin
Posts: 491
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Problems with SD card

Post by dragonator »

I have heard this more. Something in the past few years has broken my code, and I no longer poses the hardware to test it.

The only thing that I can imagine is that something in the gcode is not being read properly, either because the gcode used is wrong, or the SD card library is. However what exactly is difficult to say without hardware. I suspect the most likely place of the failure is in the SD_read part of the code, but the code has little in the way of debugging tools.
crisiM
Posts: 3
Joined: Fri Dec 11, 2020 1:59 pm

Re: Problems with SD card

Post by crisiM »

Thanks for the fast respond.
line 13: int temp_buffer[5];
line 733 exceeds buffer size : for (int n = 0; n < 6; n++); changed to n<5
Now it works.
User avatar
dragonator
Site Admin
Posts: 491
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Problems with SD card

Post by dragonator »

You seem to have just found the issue that has been bugging many people. Changing it to 5 will prevent an overflow from happening. I will keep this one in mind for everyone that tries the code, and will try and fix it this week in the downloads. Many thanks for pointing this out to me.

My only personal question is how this managed to work with me, but not later. Clearly something was updated that made this a breaking mistake, where it used to be just a bad mistake.
User avatar
dragonator
Site Admin
Posts: 491
Joined: Fri Aug 14, 2015 4:48 pm
Location: The Nethelands
Contact:

Re: Problems with SD card

Post by dragonator »

It is now updated on the firmware page. Lets hope it helps people.
Post Reply