Commit graph

111 commits

Author SHA1 Message Date
Bob-the-Kuhn 76da81c1de minimize SD card reads when using SDCARD_SORT_ALPHA (Re-ARM board)
Because of the Re-ARM card's pinout there is only one SPI connected to
the RepRap Discount Full Graphic LCD display.  The LCD responds to ANY
SCK transitions no matter if it's enable is inactive.  The result is
garbage (usually bars) on the LCD display whenever there is SD card
activity.

This code minimizes this by only accessing the SD card when changing
directory levels if :
SDCARD_SORT_ALPHA is enabled
SDSORT_USES_RAM is true
SDSORT_CACHE_NAMES is true

The code changes result in file names being pulled from the ALPHA SORT
memory array rather than the SD card.

The code also gives the file count and file index functions their own
variables.  When they shared a common variable the index function
sometimes resulted in the file count being short by 1.

=======================================================================

cardreader.cpp & pins_RAMPS_RE_ARM.h changes

Added another condition to cardreader.cpp to enable getting file names
only from RAM.

pins_RAMPS_RE_ARM.h :
Added comments about the SD card accesses and the LCD display
Combined all versions into this one.
2017-08-31 18:23:44 -05:00
Christopher Pepper 44b0c186a6 HAL for Re:ARM (LPC1768) architecture 2017-08-31 18:21:38 -05:00
Scott Lahteine e94f79ccea Patch some serial macros 2017-06-09 17:17:23 -05:00
Scott Lahteine 081bf1f879 Patch #else / #endif comments 2017-05-09 12:37:23 -05:00
Scott Lahteine 1196e3ca59 SDCard print completion can use "M0" 2017-05-03 22:24:03 -05:00
Scott Lahteine c12bc51a59 cardreader.cpp spacing tweak 2017-04-30 22:27:47 -05:00
Bob-the-Kuhn 1b12fea0fa simplified M20 with size 2017-04-13 04:56:58 -05:00
Scott Lahteine e244399766 Additional cleanup of UBL code 2017-03-22 20:51:10 -05:00
Scott Lahteine 47f9883b0f Dynamic allocation for SDCARD_SORT_ALPHA 2017-02-14 21:37:25 -06:00
Scott Lahteine a561bd5e3a New feature: SDCARD_SORT_ALPHA 2017-02-14 21:37:24 -06:00
AnHardt fa26767efe Replace all remaining 'boolean' with 'bool' 2017-01-13 13:03:52 +01:00
Scott Lahteine 4cd73e183d Hide hidden files and folders 2016-11-26 06:26:28 -06:00
Scott Lahteine 5f5a55a0de Add a ZERO macro to clear arrays 2016-10-22 10:07:18 -05:00
Scott Lahteine d963020532 Sort out some header dependencies 2016-10-10 17:14:03 -05:00
Scott Lahteine 192ac2dfd7 Squish some CardReader code 2016-08-12 03:32:42 -07:00
Scott Lahteine 61932b859e Fix bug in CardReader::stopSDPrint
If the SD print is paused, it cannot be stopped
2016-08-12 03:21:10 -07:00
Scott Lahteine b63d70b186 Fix serial output for MBL, M303 2016-08-10 18:49:52 -07:00
Scott Lahteine 704ae1b737 Merge pull request #4516 from thinkyhead/rc_short_prints_quiet
Only report finished prints longer than 1 min
2016-08-02 21:14:30 -07:00
Scott Lahteine 229f70f194 Only report finished prints longer than 1 min 2016-08-02 19:58:12 -07:00
Scott Lahteine b73203a0b7 Move some includes around to uncover missing deps 2016-08-02 19:37:46 -07:00
Scott Lahteine 34da77dad3 Simply run M31 at the end of an SD print 2016-07-14 11:39:58 -07:00
AnHardt 87957c7b44 Finalalize MSG_SD_WRITE_TO_FILE message with a \n
Finalalize MSG_SD_WRITE_TO_FILE message with a \n
else RH hangs.
2016-07-12 13:13:04 +02:00
Scott Lahteine bd491818d6 Reduce storage requirements for strings, make some PGM 2016-06-27 20:36:18 -07:00
Scott Lahteine bbf5b486c3 Add an SD Card stop function, use in ultralcd 2016-06-17 18:27:14 -07:00
Scott Lahteine 084f6b5b44 Temperature singleton class 2016-05-04 19:42:12 -07:00
Scott Lahteine 5e4e535ce8 Stepper and Endstops as singleton objects 2016-04-30 17:26:50 -07:00
Scott Lahteine 386140f361 Test time difference in safe way 2016-04-10 18:09:31 -07:00
esenapaj f9e1a0ee6c suppress warnings 2016-04-04 06:48:53 +09:00
Scott Lahteine ce0a9d3dc6 A picky fix of indentation in cardreader.cpp 2016-03-29 16:23:12 -07:00
Scott Lahteine 4ed8351e3d Revert use of enqueue_and_echo_command_now 2016-03-29 16:23:12 -07:00
Scott Lahteine 70d1d4de5f Small code spacing adjustments 2016-03-29 03:19:27 -07:00
Scott Lahteine 0385acea7a Fix workDirParents -> getAbsFilename relationship 2016-03-29 03:18:53 -07:00
Scott Lahteine 27d70599d4 Change openFile default to "not-push" instead of "do-replace" 2016-03-29 03:16:35 -07:00
Scott Lahteine 372f93cc7a Rename "filenames" to "proc_filenames" 2016-03-29 03:15:01 -07:00
Scott Lahteine 6b01cf07c2 Use only as much stack as needed for the M23 command 2016-03-29 02:34:33 -07:00
Scott Lahteine 0da744b7b0 Further cleanup of comments, partial Doxygen-style
Following up on #3231
2016-03-25 00:45:56 -07:00
jbrazio 5e5d250832 Added gplv3 header to all Marlin files 2016-03-24 18:01:20 +00:00
Scott Lahteine 04fa9d4f47 Make Autotune options into Menu Edit Items 2016-03-24 02:00:08 -07:00
Scott Lahteine 8fe7420310 Use a separate serial line buffer 2016-03-18 16:46:20 -07:00
esenapaj 609c0d46d9 Fix CardReader::lsDive()
If comparison between signed char(-128 ~ +127) and DIR_NAME_DELETED(uint8_t const 0XE5, it's +229),
it makes incorrect result.
2016-03-16 02:47:58 +09:00
Scott Lahteine f9ded2a7c4 Wrap macros to prevent bad expansions 2016-03-12 22:38:55 -08:00
Ruwan J Egoda Gamage b58083b0fa Getting rid of SDEXTRASLOW, SDSLOW variables. 2016-02-07 07:58:52 -06:00
Ruwan J Egoda Gamage 1b7c443628 Adding SDULTRASLOW variable.
Instead of changing SDEXTRASLOW variable to a slower speed,  the new
SDULTRASLOW is used for rigidbot panel.
2016-02-07 07:58:52 -06:00
Ruwan J Egoda Gamage becbfe1065 Fixing Rigidbot LCD Panel Support 2016-02-07 07:58:52 -06:00
Scott Lahteine 0c7f7ebcfb Styling adjustments (PR#2668 & PR#2670)
Keep "astyled" reformatting
2015-10-03 22:02:45 -05:00
Mike Cochrane 5e36b64635 SDEXTRASLOW for some SD card readers (PR#176)
Add SDEXTRASLOW which runs the SD card at SPI_QUARTER_SPEED. Quarter speed is needed for RIGIDBOT_PANEL
2015-09-14 07:58:08 -05:00
Richard Wackerbarth 35afea1c0e Restore test
PR#2572 Changed this because of faulty Boolean Logic

NOT(A OR (NOT B) OR (NOT C)) !=

(NOT A) AND ((NOT B) OR C))


Besides, the compiler should be smart enough to
optimize this without help from the programmer
2015-08-04 15:22:56 -05:00
Scott Lahteine 0f5ada8cbd Group the fail case in one negation (PR#2572) 2015-08-01 18:55:50 -05:00
Scott Lahteine 58cfcd4239 Overridable Options - Part 5
Apply `ENABLED` / `DISABLED` macros to files needing only a small
number of changes.
2015-07-31 01:24:20 -05:00
Scott Lahteine 944090c19c Optimize lsDive logic 2015-07-19 10:13:40 -05:00