exciting-io / printer

Tools for exploring the possibilities of "internet of things" printing.
http://exciting.io/printer
MIT License
481 stars 94 forks source link

Abort if there are problems with the SD Card. #31

Closed chrisroos closed 12 years ago

chrisroos commented 12 years ago

If there are problems opening the SD card for access then there's no point continuing as we can't cache the data.

Slightly controversially, I've chosen the bump the error codes (number of LED flashes) of a DHCP failure and cache failure. I don't think this is too much of a problem, partcularly because I've bumped the version number.

chrisroos commented 12 years ago

I've issued this as a pull request because I wanted to double check that you are happy with this approach, and the bumping of the version number now that I've changed the meaning of the 'error codes'.

chrisroos commented 12 years ago

Can you hold off merging this commit. It works fine if you compile the sketch without debugging but it causes the sketch to continually fail at the point it tries to initialize the printer if debugging is enabled. I'm almost 100% sure this is to do with the additional debug line that I've added to initSD, as removing that line allows the sketch to work with debugging enabled.

I suspect we're hitting some of the limits outlined in http://www.arduino.cc/playground/Main/CorruptArrayVariablesAndMemory, but I'm yet to really get to the bottom of it.

lazyatom commented 12 years ago

Interesting. Holding off.

chrisroos commented 12 years ago

This pull request couldn't be automatically merged so I ended up doing it manually. I'm going to close this pull request and remove the terminal-error-on-sd-card-failure branch from github.

lazyatom commented 12 years ago

Magnificent.