Guðni Már Gilbert
15b41e7348
Optimise autostart_stilltocheck variable
...
Make the variable static within the checkautostart function.
When the function is called for the first time autostart_stilltocheck
is set to true and will continue to live after the function is exited.
After it is set to false within checkautostart() it will continue to be
false forever.
Using static this way is more efficient than using a global variable
Saves 6 bytes of flash and 1 byte of SRAM
2022-04-09 11:10:55 +00:00
Alex Voinea
858984ef35
SD sorting entries instead of positions
2022-02-04 10:47:56 +01:00
Guðni Már Gilbert
9bf45773f9
Merge remote-tracking branch 'upstream/MK3' into rebase-testing-ground-v2
2022-01-30 11:43:16 +00:00
Guðni Már Gilbert
a1abd094dd
Convert autostart_atmillis to ShortTimer
...
Saves 34 bytes of flash and 1 byte of SRAM
2022-01-30 11:39:24 +00:00
Voinea Dragos
9684806e00
Change arduino IO to fastio where possible
2022-01-30 11:22:43 +00:00
Guðni Már Gilbert
be79e3791f
Fixes #3262
...
Make sure to call lcd_timeoutToStatus.start() when the SD card is inserted
into the printer after it was removed beforehand.
(cherry picked from commit 6795843f153aa064f087f80990419a946cdfe857)
2021-11-18 19:23:21 +00:00
Voinea Dragos
ecce6f865f
write_command() no line number handling
2021-06-25 08:12:30 +02:00
DRracer
6188870c2e
Merge pull request #3157 from wavexx/improve_d2
...
Add extra debugging functions & crash analysis
2021-06-22 07:37:30 +02:00
Alex Voinea
30d9faef9d
Minor fixes to SD presence handling ( #3139 )
...
* Remove forgotten function protorypes
* Fix code indentation
* Fix double sorting if SD card is inserted during setup()
* Correctly handle SD removal during sorting
2021-06-21 07:30:47 +02:00
Yuri D'Elia
449510392d
Untangle a bit some recursive include mess
2021-06-12 15:09:03 +02:00
D.R.racer
7011014abb
Save 16 bytes - pass ls_param by value to functions
...
... as ls_param is a 1-byte structure it is more conservative to pass it
to functions by value than by a pointer
2021-04-20 06:50:37 +02:00
Voinea Dragos
2129bcf315
M20 T
2021-04-19 14:48:50 +03:00
Voinea Dragos
b16e1e5235
Invert size and LFN in M20 L output
2021-04-19 13:54:43 +03:00
Voinea Dragos
6d7d8c7c75
Do not show hidden/system dirs with M20 L
2021-04-19 13:31:30 +03:00
Alex Voinea
28f21c8630
Fix bubblesort sorting speed. ShellSort is probably broken
2021-02-26 19:17:14 +02:00
Alex Voinea
c63f92ae52
Invert shellSort logic
2021-02-26 08:57:49 +02:00
Alex Voinea
8821439878
Cardreader progressbar code
2021-02-25 20:25:32 +02:00
Alex Voinea
54b2edbc8c
Update debugging code
2021-02-25 19:26:01 +02:00
Alex Voinea
1c1ff722c0
Move sort_order to stack during ::presort
2021-02-10 18:16:26 +02:00
Alex Voinea
8397dae386
Remove comment
2021-02-10 18:15:18 +02:00
Alex Voinea
b4de57c365
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION
2021-02-10 17:08:28 +02:00
Alex Voinea
a95d497289
Remove commented out code and deprecated comments
2021-02-10 13:45:30 +02:00
Alex Voinea
8a068d4d36
Remove redundant position=0 in ::presort
2021-02-10 13:44:39 +02:00
Alex Voinea
b72ce00183
Reduce reserved space on stack for LONG_FILENAME_LENGTH by 1 in presort
...
LONG_FILENAME_LENGTH already includes a +1 for the \0 string termination
2021-02-10 13:43:46 +02:00
D.R.racer
7ad922e87b
Report fname instead of name
...
looks like being omitted in MK3 upstream fixes
2021-02-10 12:38:04 +01:00
D.R.racer
8d39880abf
Fix compilation against latest MK3 branch
2021-02-10 12:23:02 +01:00
DRracer
7aa4595211
Merge branch 'MK3' into thumbnails2
2021-02-10 12:15:57 +01:00
D.R.racer
c1ead75a73
Remove commented debug code
...
the whole PR is ready for review after successfull tests
2021-02-10 11:18:59 +01:00
Alex Voinea
a830d5b6b7
getfilename_next
2021-02-09 20:31:02 +02:00
Alex Voinea
8d1c5cbb27
Fix position table offset
2021-02-09 20:29:06 +02:00
Alex Voinea
d2a7c62b50
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION
2021-02-09 16:17:43 +02:00
Alex Voinea
4fcbf95db6
apply RAII principle on the lsDive recursion limiter
2021-02-09 15:00:46 +02:00
Alex Voinea
c739aa9003
M23 full path support.
2021-02-07 21:51:44 +02:00
Alex Voinea
f5cde38a7c
Remove duplicit debug line
2021-02-06 21:06:37 +02:00
Voinea Dragos
52f7a71dce
More fixes that were extracted from #2405
2021-02-06 14:59:11 +02:00
Voinea Dragos
f343e6432a
Fix diveSubfolder string termination
2021-02-06 12:55:51 +02:00
Alex Voinea
84d043d41b
Fix WorkDirDepth limit (for good this time)
2021-02-04 17:52:42 +02:00
Alex Voinea
df163066fb
Fix "sorting files" messages for both ShellSort and BubbleSort
2021-02-04 15:44:15 +02:00
Alex Voinea
ffc3a445ca
Remove even more dead code
2021-02-04 11:35:15 +02:00
Alex Voinea
d25b4a6bc9
Remove dead code (SDSORT_GCODE)
2021-02-03 19:18:13 +02:00
Alex Voinea
4c977cc335
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION
2021-02-03 18:28:18 +02:00
Alex Voinea
b6d56bc0f4
Change M27 argument from L to P as that makes more sense (path vs LFN))
2021-02-01 14:54:37 +02:00
Voinea Dragos
6b6205d2f6
M27 refactoring and M27 L initial implementation
2021-01-31 15:06:20 +02:00
D.R.racer
7279de7403
Separate reading G-code files and writing to a file
...
- extract common strings
- cleanup openFileWrite and openFileReadFilteredGcode formatting a bit
Alltogether - code size 400B down
2021-01-28 09:37:58 +01:00
D.R.racer
c3758d350e
Fast skipping of large comment blocks
...
This is an extension/optimization of PR #2956 .
It uses the cached 512B block buffer to avoid heavy-weight read() in SdBaseFile.
Even though this principle allowed the AVR to skip ~600KB of data within ~5 seconds,
the impact on code base is huge, especially into well proven and long-term stable
parts like reading a file from the SD card.
The sole purpose of this PR is to show/verify the possibility of the AVR CPU
in relation to adding thumbnails into MK3 G-codes.
Moreover, this PR shall not be merged unless the missing/commented features
are restored - especially file seeking and M84 search.
PFW-1175
2021-01-27 07:03:51 +01:00
DRracer
891f37a622
Merge pull request #2982 from DRracer/codesize
...
Reduce code size and RAM usage
2021-01-26 12:04:39 +01:00
Voinea Dragos
c6588193ad
Fix some more stuff in cardreader.cpp
...
Saved 4B of flash and 60B of RAM
2021-01-26 09:25:41 +02:00
D.R.racer
783e4bbaf9
Add lcd_putc_at (code down >150B), refactor lcd_selftest_screen_step
...
(RAM down 10B)
2021-01-25 14:58:57 +01:00
Voinea Dragos
2b3729125d
Prevent wdt reset during file listing
2021-01-25 11:46:51 +02:00
Voinea Dragos
ced3d9fa77
"M20 L" support. Print long filenames
2021-01-22 11:13:44 +02:00