Compare commits

..

1953 Commits

Author SHA1 Message Date
Scott Lahteine
dd00f8b1a8 🔖 Marlin 1.1.9.2 2023-07-18 20:31:39 -05:00
Scott Lahteine
b0a091e632 🔨 PlatformIO 6 compatibility 2023-07-18 20:30:54 -05:00
Jason Pepas
4dd14704dc 📌 Fixed versions for library, toolchain (#24784) 2022-09-26 16:22:12 -05:00
Scott Lahteine
02dcc0b80e 🔨 Update TMC26XStepper link
See #23874
2022-04-26 03:43:50 -05:00
Scott Lahteine
1314b31d97 Update Version.h 2020-06-20 23:02:29 -05:00
Scott Lahteine
fcbf55eb6d Add missing thermistor names
Fixes #17903

Co-Authored-By: SantinoDnepr <santinodnepr@users.noreply.github.com>
2020-05-10 05:04:20 -05:00
Scott Lahteine
9b555f2fee Merge bugfix-1.1.x into 1.1.x 2020-03-18 15:43:28 -05:00
Alan T
10b332f944 Fix Z position after ABL bilinear G29 with fade (#17174) 2020-03-15 18:17:28 -05:00
Scott Lahteine
430adce327 Change DUMMY_PID_VALUE to NAN (#17079) 2020-03-06 14:12:27 -06:00
Scott Lahteine
957f707629 Disable integration testing 2020-01-08 16:19:56 -06:00
Walt Sorensen
0bc929aae7 Enable DUAL_NOZZLE_DUPLICATION_MODE (#16436) 2020-01-02 21:17:22 -06:00
n4d01
5d270d271c [1.1.x] Polish language UTF8 (#16141) 2019-12-11 02:09:04 -06:00
Scott Lahteine
f4bf94f7b2 Links for the "New Issue" page 2019-11-30 09:19:33 -06:00
portalab
aec18898ee Add Korean language (#15918) 2019-11-19 23:43:55 -06:00
ellensp
289b65ab75 [1.1.x] MKS_GEN_L_V2 controller (#15805) 2019-11-06 16:07:02 -06:00
Chris Pepper
014ec3e81c Update bug_report.md
Make the configs zip file requirement more prominent
2019-11-03 21:04:33 +00:00
Leo Lima
bfa578f0d4 [1.1.x] Fix autostart w/out SD_DETECT_PIN (#15667) 2019-11-02 07:16:30 -05:00
Axel
8c9318c5a3 [1.1.x] RAMPS + Viki1 LCD compatibility (#15736) 2019-10-31 14:04:23 -05:00
Dirk O. Kaar
e068f66c26 [1.1.x] Fix compiler warning (#15642) 2019-10-24 12:32:45 -05:00
Ed Williams
5754472b8f [1.1.x] Fix for G2/G3 rounding error (#15546) 2019-10-13 17:48:34 -05:00
stevh22
1d44b1009d Let MINIPANEL use SW SPI if needed (#15246) 2019-09-14 06:50:03 -05:00
Fabio B. Silva
3b4ae17e36 Fix BLTouch debugging (#15232) 2019-09-12 16:50:43 -05:00
Scott Lahteine
0110faa717 Fix Creality bed thermistor
Co-Authored-By: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
2019-09-02 05:38:25 -05:00
David Souza
909c01554a Fix PT-BR strings (#15023) 2019-09-02 05:38:25 -05:00
David Souza
f3faaed243 Fix #else extra tokens (#15013) 2019-09-02 05:38:25 -05:00
Bob Kuhn
e5a4f19e5b [1.1.x] Autobuild formatting (#14858) 2019-09-02 05:38:25 -05:00
InsanityAutomation
37bfc5ab9f [1.1.x] BLTouch 3.0 - 3.1 (#14839) 2019-09-02 05:38:25 -05:00
Bob-the-Kuhn
1ab59d6cd9 Revert "move PR #14857 Autobuild update into bugfix 1.1.x"
This reverts commit 73f4027e39.
2019-09-02 05:38:25 -05:00
Bob-the-Kuhn
fb276f677f move PR #14857 Autobuild update into bugfix 1.1.x
see PR #14857 for details
2019-09-02 05:38:25 -05:00
InsanityAutomation
65ff80411f [1.1.x] BLTOUCH_V3 parity with 2.0.x (#13682)
Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com>
2019-09-02 05:38:25 -05:00
Scott Lahteine
a5fe0ed158 Reduce XY homing feedrate in Creality configs
Counterpart to #13595

Co-Authored-By: swilkens <stefanwilkens@gmail.com>
2019-09-02 05:38:25 -05:00
Damien Martin-Guillerez
f73829318f Add support for the V3 of the BlTouch (#13596)
V3 of the BLTouch has an [Alarm Release & Touch mode](https://docs.wixstatic.com/ugd/f5a1c8_77037f55e5d542309d9fc178165c9f3f.pdf) to activate after the probe is deployed. If this mode isn't activated, the BLTouch keeps deploying, ends up detecting a collision and gets itself in error mode.

Tested on a Creality Ender-3.
2019-09-02 05:38:25 -05:00
Ludy
5f783b4fe9 [1.1.x] Fix German language (#13438) 2019-09-02 05:38:25 -05:00
Ludy
8d9380be71 Fix missing quotation marks (#13424) 2019-09-02 05:38:25 -05:00
mbm60
cc6d7812c9 Fix pin assignment to KILL_PIN in MKS_MINI_12864 (#13397) 2019-09-02 05:38:25 -05:00
Scott Lahteine
9180235ad2 German patch
Followup to #13136 by @Ludy87
2019-09-02 05:38:24 -05:00
Scott Lahteine
6a45d52bb4 Remove dead code in get_pid_output, consolidate
See #12981
2019-09-02 05:38:24 -05:00
Kit Adams
2ecd75c14a UBL G29 T current position fix (#12845) 2019-09-02 05:38:24 -05:00
FernandoVelcic
9ede2cfe00 Fix spanish translations (#13235) 2019-09-02 05:38:24 -05:00
AnHardt
8899b5804f [1.1.x] Fix autotemp_factor menu setting (#13227) 2019-09-02 05:38:24 -05:00
Scott Lahteine
951ed3fd64 Fix PSU pin initialization 2019-09-02 05:38:24 -05:00
7eggert
7aedf18fd9 Optional ADC_KEYPAD pin with ANET_10 (#13158) 2019-09-02 05:38:24 -05:00
7eggert
dea37780ca Fix LCD button / newbutton issue (#13157) 2019-09-02 05:38:24 -05:00
Ludy
1f0fe23c50 [1.1.x] Update German language (#13149) 2019-09-02 05:38:24 -05:00
Ludy
93c3d4b33e [1.1.x] Update German language (#13136) 2019-09-02 05:38:24 -05:00
Giuliano Zaro
9c5eebf65d [1.1.x] Fix TEMP_STAT_LED startup init (#13121) 2019-09-02 05:38:24 -05:00
David Souza
ffc424f556 Fix language_pt-br warnings due to extra tokens at end of #else directive (#13084) 2019-09-02 05:38:24 -05:00
Roxy-3D
46daed8b0e Fix probe location bug.... 2019-09-02 05:38:24 -05:00
Scott Lahteine
6960cd8e28 Apply lowercase to some common methods 2019-09-02 05:38:24 -05:00
Nathan
ca36be46de Fix the delta homing issue (#13001) 2019-09-02 05:38:24 -05:00
Ondřej Nový
a659f55cf1 [1.1.x] Level bed corners Z-hop height option (#12859) 2019-09-02 05:38:24 -05:00
swilkens
658f62e8b3 [1.1.x] Correct Ender 3 bed size (#12768) 2019-09-02 05:38:24 -05:00
Roman Moravčík
544990604e [1.1.x] Limit PID autotune target to maxtemp-15 (#12703) 2019-09-02 05:38:24 -05:00
Roman Moravčík
3e459a071a [1.1.x] Limit hotend / bed temperature to maxtemp-15. (#12702) 2019-09-02 05:38:24 -05:00
Ondřej Nový
2a2c6c2d6f [1.1.x] Update Czech translation (#12684) 2019-09-02 05:38:24 -05:00
Ondřej Nový
ef2f09fd23 [1.1.x] Set DEFAULT_NOMINAL_FILAMENT_DIA to 1.75 in Anet A6 config (#12663) 2019-09-02 05:38:24 -05:00
Ondřej Nový
e99a1fb46f [1.1.x] Enable PIDTEMPBED in Anet A8 example config (#12654) 2019-09-02 05:38:24 -05:00
Luc Van Daele
eddb785bee [1.1.x] G33 clean up (#12649)
Remove obsolete workarounds in G33 for the now fixed zprobe_zoffset bug
2019-09-02 05:38:24 -05:00
Scott Lahteine
d7e82b9b81 Fix MBL error messages 2019-09-02 05:38:24 -05:00
Scott Lahteine
97da93fbb8 Fix kill with MSG_POWER_LOSS_RECOVERY 2019-09-02 05:38:24 -05:00
Scott Lahteine
eb0b685c55 Fix MBL XY parameter error messages 2019-09-02 05:38:24 -05:00
Scott Lahteine
d1cf029deb Rename to match case 2019-09-02 05:38:23 -05:00
I-am-me
c63d466fd0 Update French language (#12246) 2019-09-02 05:38:23 -05:00
Scott Lahteine
c7ed706f43 Fix endstops.monitor_flag 2019-09-02 05:38:23 -05:00
tobbelobb
9ea9fde491 Init Hangprinter D-axis, count D-axis advance_dividend, delta_offsets (#12181) 2019-09-02 05:38:23 -05:00
Scott Lahteine
83fe07d80a One more IS_SD_PRINTING 2019-09-02 05:38:23 -05:00
Zach Welch
6110a54635 Add M524 to abort SD printing (#11386) 2019-09-02 05:38:23 -05:00
Scott Lahteine
cee63a1688 Add parentheses to card macros 2019-09-02 05:38:23 -05:00
Paul
68464005cf Fix hole to hole rod length for Plus model (#12157) 2019-09-02 05:38:23 -05:00
Scott Lahteine
e443ebb988 Don't use ENABLED with *INVERTING 2019-09-02 05:38:23 -05:00
MrDiba
3dbe53283f Anycubic Kossel Z probe invert fix (#12101) 2019-09-02 05:38:23 -05:00
swilkens
1a5f2fa2c9 [1.1.x] Reduce HOMING_FEEDRATE_XY for Ender 3 (#12104)
Homing on the Ender 3 with `HOMING_FEEDRATE_XY` set to 50*60 was shown (#12074) to cause the end-stop micro-switches to bottom out, causing the carriage for both X and Y axis to physically crash into the micro switch. Reducing the homing speed prevents the switches from bottoming out.
2019-09-02 05:38:23 -05:00
Scott Lahteine
9959a91eca Fix lite status screen SD % 2019-09-02 05:38:23 -05:00
Scott Lahteine
0c74e47a37 EINSY_RETRO uses same delays as EINSY_RAMBO
Co-Authored-By: marcio-ao <marcio@alephobjects.com>
2019-09-02 05:38:23 -05:00
Scott Lahteine
1321941d03 Safer delays for EINSY_RAMBO + RRDFGSC 2019-09-02 05:38:23 -05:00
Scott Lahteine
aa9e4687d7 Fix Anycubic Kossel config 2019-09-02 05:38:23 -05:00
Scott Lahteine
c32d2e3ae8 Fix lightweight UI hotends display 2019-09-02 05:38:23 -05:00
David Souza
f6220addd8 Hotfix/fix readme latest tagged release (#15114) 2019-08-31 21:13:22 -05:00
Scott Lahteine
dee402e91a Fix Creality bed thermistor
Co-Authored-By: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
2019-08-25 04:49:49 -05:00
David Souza
76ad5df91a Fix PT-BR strings (#15023) 2019-08-23 20:59:02 -05:00
David Souza
029467f5de Fix #else extra tokens (#15013) 2019-08-21 03:45:29 -05:00
Scott Lahteine
f94c3210b6 Create FUNDING.yml 2019-08-08 06:10:54 -05:00
Bob Kuhn
a58827ac5a [1.1.x] Autobuild formatting (#14858) 2019-08-06 23:34:55 -05:00
InsanityAutomation
93f9209dbb [1.1.x] BLTouch 3.0 - 3.1 (#14839) 2019-08-06 23:06:24 -05:00
Bob-the-Kuhn
fdd2316691 Revert "move PR #14857 Autobuild update into bugfix 1.1.x"
This reverts commit 73f4027e39.
2019-08-05 22:55:49 -05:00
Bob-the-Kuhn
73f4027e39 move PR #14857 Autobuild update into bugfix 1.1.x
see PR #14857 for details
2019-08-05 22:53:05 -05:00
Scott Lahteine
340fb15d2a Fix flattr link
Co-Authored-By: MarcelMo <marcelmo@users.noreply.github.com>
2019-07-19 00:12:05 -05:00
InsanityAutomation
7cc1410070 [1.1.x] BLTOUCH_V3 parity with 2.0.x (#13682)
Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com>
2019-04-15 16:33:11 -05:00
Scott Lahteine
14193022ca Reduce XY homing feedrate in Creality configs
Counterpart to #13595

Co-Authored-By: swilkens <stefanwilkens@gmail.com>
2019-04-06 19:53:33 -05:00
Damien Martin-Guillerez
b1e3f4f42f Add support for the V3 of the BlTouch (#13596)
V3 of the BLTouch has an [Alarm Release & Touch mode](https://docs.wixstatic.com/ugd/f5a1c8_77037f55e5d542309d9fc178165c9f3f.pdf) to activate after the probe is deployed. If this mode isn't activated, the BLTouch keeps deploying, ends up detecting a collision and gets itself in error mode.

Tested on a Creality Ender-3.
2019-04-06 19:48:44 -05:00
Scott Lahteine
5d96a6d983 No Support Requests 2019-04-04 00:12:36 -05:00
Ludy
35775395d9 [1.1.x] Fix German language (#13438) 2019-03-20 16:38:43 -05:00
Ludy
1b5f1487c9 Fix missing quotation marks (#13424) 2019-03-18 16:32:03 -05:00
mbm60
7f75af5a37 Fix pin assignment to KILL_PIN in MKS_MINI_12864 (#13397) 2019-03-15 19:15:03 -05:00
Scott Lahteine
cd6e36b83e German patch
Followup to #13136 by @Ludy87
2019-03-08 19:54:38 -06:00
Scott Lahteine
5befb30701 Update issue templates 2019-03-03 10:14:15 -06:00
Scott Lahteine
24b7070bbb CR10mini E steps of 95
See https://www.patreon.com/posts/creality-cr10-24602624
2019-03-03 10:14:15 -06:00
Scott Lahteine
3a70028d5c Update README.md 2019-03-03 10:14:15 -06:00
Scott Lahteine
06d58c939c Remove dead code in get_pid_output, consolidate
See #12981
2019-03-03 05:37:15 -06:00
Kit Adams
c935a6706a UBL G29 T current position fix (#12845) 2019-02-26 22:26:21 -06:00
FernandoVelcic
8a79623d01 Fix spanish translations (#13235) 2019-02-22 19:49:01 -06:00
AnHardt
7a316d7238 [1.1.x] Fix autotemp_factor menu setting (#13227) 2019-02-22 15:29:38 -06:00
Scott Lahteine
31c473eadb Fix PSU pin initialization 2019-02-20 05:33:32 -06:00
7eggert
369d756b74 Optional ADC_KEYPAD pin with ANET_10 (#13158) 2019-02-13 20:50:11 -06:00
7eggert
01674c5c8d Fix LCD button / newbutton issue (#13157) 2019-02-13 20:43:39 -06:00
Ludy
cf70ce6ad2 [1.1.x] Update German language (#13149) 2019-02-13 20:31:34 -06:00
Ludy
3e17ac2529 [1.1.x] Update German language (#13136) 2019-02-12 12:54:11 -06:00
Giuliano Zaro
da112b91c5 [1.1.x] Fix TEMP_STAT_LED startup init (#13121) 2019-02-11 17:10:56 -06:00
Scott Lahteine
3a216bb962 CR10mini E steps of 95
See https://www.patreon.com/posts/creality-cr10-24602624
2019-02-10 14:24:59 -06:00
David Souza
fa0bc6af08 Fix language_pt-br warnings due to extra tokens at end of #else directive (#13084) 2019-02-05 22:56:53 -06:00
Roxy-3D
aed7627f95 Fix probe location bug.... 2019-02-05 20:27:58 -07:00
Scott Lahteine
1f3ddd2c33 Apply lowercase to some common methods 2019-02-02 16:45:07 -06:00
Nathan
8fff2fad23 Fix the delta homing issue (#13001) 2019-01-23 19:43:26 -06:00
Ondřej Nový
c0a6f013de [1.1.x] Level bed corners Z-hop height option (#12859) 2019-01-10 19:25:02 -06:00
swilkens
feb2165feb [1.1.x] Correct Ender 3 bed size (#12768) 2018-12-30 10:42:06 -06:00
Roman Moravčík
986c4390f0 [1.1.x] Limit PID autotune target to maxtemp-15 (#12703) 2018-12-27 11:43:07 -06:00
Roman Moravčík
ff1362c71d [1.1.x] Limit hotend / bed temperature to maxtemp-15. (#12702) 2018-12-27 11:40:34 -06:00
Ondřej Nový
b49a58eb58 [1.1.x] Update Czech translation (#12684) 2018-12-20 15:32:24 -06:00
Ondřej Nový
2f42c8b32d [1.1.x] Set DEFAULT_NOMINAL_FILAMENT_DIA to 1.75 in Anet A6 config (#12663) 2018-12-18 13:35:35 -06:00
Ondřej Nový
0f34a3f0b2 [1.1.x] Enable PIDTEMPBED in Anet A8 example config (#12654) 2018-12-18 13:34:25 -06:00
Luc Van Daele
1f06f628c0 [1.1.x] G33 clean up (#12649)
Remove obsolete workarounds in G33 for the now fixed zprobe_zoffset bug
2018-12-18 12:44:17 -06:00
Scott Lahteine
a0a21e5a2f Fix MBL error messages 2018-11-19 02:17:36 -06:00
Scott Lahteine
6f0fa90edb Fix kill with MSG_POWER_LOSS_RECOVERY 2018-11-18 18:06:14 -06:00
Scott Lahteine
7cb162ab3e Fix MBL XY parameter error messages 2018-11-05 03:42:24 -06:00
Scott Lahteine
dcd01caab9 Rename to match case 2018-10-30 22:59:55 -05:00
I-am-me
c788dfb91b Update French language (#12246) 2018-10-27 17:19:51 -05:00
Scott Lahteine
88fd73aabd Fix endstops.monitor_flag 2018-10-26 03:52:43 -05:00
tobbelobb
cbc0a0a776 Init Hangprinter D-axis, count D-axis advance_dividend, delta_offsets (#12181) 2018-10-22 18:52:39 -05:00
Scott Lahteine
7446976881 One more IS_SD_PRINTING 2018-10-22 00:25:46 -05:00
Zach Welch
75298e654e Add M524 to abort SD printing (#11386) 2018-10-19 14:23:46 -05:00
Scott Lahteine
86ac4683dd Add parentheses to card macros 2018-10-19 14:20:33 -05:00
Paul
d8caa7ddf0 Fix hole to hole rod length for Plus model (#12157) 2018-10-19 13:47:27 -05:00
Scott Lahteine
8698b6d95e Don't use ENABLED with *INVERTING 2018-10-16 17:15:24 -05:00
MrDiba
77d8befc6d Anycubic Kossel Z probe invert fix (#12101) 2018-10-16 01:56:36 -05:00
swilkens
82c5c85c0f [1.1.x] Reduce HOMING_FEEDRATE_XY for Ender 3 (#12104)
Homing on the Ender 3 with `HOMING_FEEDRATE_XY` set to 50*60 was shown (#12074) to cause the end-stop micro-switches to bottom out, causing the carriage for both X and Y axis to physically crash into the micro switch. Reducing the homing speed prevents the switches from bottoming out.
2018-10-16 01:51:14 -05:00
Scott Lahteine
5e0dffd9a4 Fix lite status screen SD % 2018-10-12 17:04:47 -05:00
Scott Lahteine
1e57b13518 EINSY_RETRO uses same delays as EINSY_RAMBO
Co-Authored-By: marcio-ao <marcio@alephobjects.com>
2018-10-08 22:29:48 -05:00
Scott Lahteine
b33463aa68 Safer delays for EINSY_RAMBO + RRDFGSC 2018-10-06 21:53:45 -05:00
Scott Lahteine
385c990d6f Fix Anycubic Kossel config 2018-10-04 20:26:07 -05:00
Scott Lahteine
ae48080469 Fix lightweight UI hotends display 2018-10-04 14:36:19 -05:00
Scott Lahteine
5cf6c44f47 Version 1.1.9 2018-09-29 19:29:54 -05:00
Scott Lahteine
624fd8c9ff Merge bugfix-1.1.x 2018-09-29 19:29:48 -05:00
Scott Lahteine
0ad8646a6c Fix block->mix_steps
Fix #11484
2018-09-29 19:16:17 -05:00
Hannes Brandstätter-Müller
bb6286f201 fix missing semicolon (#11961) 2018-09-29 14:46:08 -05:00
Scott Lahteine
e6339a4aa6 Ensure M109 calls autotemp 2018-09-29 02:15:16 -05:00
Scott Lahteine
501b8374fd Fix garbled M119 output, honor NUM_RUNOUT_SENSORS 2018-09-28 19:19:45 -05:00
Scott Lahteine
8f89ce9b16 Workaround for Pronterface M29 2018-09-27 15:41:15 -05:00
Scott Lahteine
ea29b71a3a Fix endstop reporting inverting logic 2018-09-22 03:22:55 -04:00
Scott Lahteine
e85117a6cd Fix parking_extruder_tool_change
Fix #11872
2018-09-19 03:04:16 -05:00
Scott Lahteine
5b8dc39506 [1.1] Fix mixing extruder g-codes (#11864) 2018-09-18 00:44:34 -05:00
AnHardt
f5dc9c822d 1_Fix normalize_mix() (#11855)
Mix factors needed to be updated consistent with the recent Stepper/Planner code refactor.
2018-09-17 16:38:35 -05:00
Scott Lahteine
1a89c3ceae Support more filament runout sensors in M119 (#11850) 2018-09-17 03:29:18 -05:00
Scott Lahteine
c2ffb49c04 Fix a serial echo 2018-09-16 22:03:55 -05:00
dagorel
a16405d608 Make some small corrections in fr_utf8 language file. (#11826) 2018-09-16 00:06:53 -05:00
Scott Lahteine
52dbd57dfd Merge pull request #11356 from grbd/bugfix-1.1.x 2018-09-16 00:05:19 -05:00
Scott Lahteine
da5e69693d Update some config comments 2018-09-15 23:17:59 -05:00
Scott Lahteine
222014e78c AnyCubic Trigorilla 1.4 changes
Co-Authored-By: grbd <garlicbready@googlemail.com>
2018-09-15 23:17:59 -05:00
Scott Lahteine
aeb959d4e4 AnyCubic LinearPlus delta configs
Co-Authored-By: grbd <garlicbready@googlemail.com>
2018-09-15 23:17:59 -05:00
Scott Lahteine
6afe5ab28b Set stepper directions after M501/M502
See https://github.com/MarlinFirmware/Marlin/issues/11103#issuecomment-421387611

Co-Authored-By: tcm0116 <tcm0116@users.noreply.github.com>
2018-09-15 20:25:05 -05:00
HenningJW
7f2139aa07 Fix non-sensical values for Zonestar themistor table (#11816)
Values taken from Zonestar firmware for P802QA with a Melzi board. Timestamps from the firmware package are from April 2016.
2018-09-12 15:35:43 -05:00
Scott Lahteine
dad2f630c9 Fix raw_filwidth_value error 2018-09-12 04:32:35 -05:00
Scott Lahteine
5af3575c48 Fix SD autostart with no LCD 2018-09-12 03:48:27 -05:00
Scott Lahteine
39be096575 Fix MSG_FILAMENT_CHANGE_HEAT_1 for small LCD 2018-09-10 23:23:21 -05:00
Scott Lahteine
d09794a153 Fix RigidBoard FAN_PIN collision 2018-09-10 05:27:56 -05:00
Scott Lahteine
adc066a174 Fix print_2d_array plus some pointless changes 2018-09-10 02:44:17 -05:00
Scott Lahteine
c28acb0ee1 Restore .travis.yml 2018-09-09 03:17:22 -05:00
Sebastianv650
ee692e7e24 Fix extruder stops extruding with LA (#11759) 2018-09-09 00:04:02 -05:00
tobbelobb
330c4bcbb9 [1.1.x] Hangprinter support (#9180) 2018-09-08 21:17:02 -05:00
Scott Lahteine
14bf319db8 Pass segment length in G2-G3 2018-09-06 01:46:38 -05:00
Scott Lahteine
792631fecb Pass segment length in prepare_kinematic_move_to (#11736) 2018-09-06 01:40:14 -05:00
Scott Lahteine
4b647a1025 Sanity-check NOZZLE_PARK_POINT 2018-09-05 06:18:59 -05:00
Scott Lahteine
8e8e1c0d2b Sanity tweak accommodating NO_LCD_MENUS
As mentioned in #11727
2018-09-05 05:55:09 -05:00
Scott Lahteine
191bce3217 Bring some configs up to date 2018-09-05 04:34:09 -05:00
AnHardt
b34134ed3d [1.1.x] SECURITYFIX missing max temp error when PID is used (#11718) 2018-09-05 04:34:09 -05:00
Scott Lahteine
ce092ed0b7 Fix some French strings
Co-Authored-By: pipersw <pipersw@users.noreply.github.com>
2018-09-05 04:34:09 -05:00
Scott Lahteine
5becb29ed9 Restore at90usb1286.json 2018-09-05 04:34:09 -05:00
Scott Lahteine
3256a67927 Delete at90USB1286.json 2018-09-05 04:34:09 -05:00
Giuliano Zaro
5e0cd14bde [1.1.x] Fix planner computation (#11709)
#11708 counterpart
2018-09-03 00:29:13 -05:00
Scott Lahteine
8193c61ac9 Fix compile error with NO_LCD_MENUS 2018-08-31 19:16:54 -05:00
Scott Lahteine
dbd0979c36 Remove obsolete HAL_timer_restrain 2018-08-31 17:49:26 -05:00
Scott Lahteine
ca87e4c0fd Sanity-check SERVO pin for servo probes 2018-08-30 18:33:37 -05:00
MaiTaiSui
f58168a6f5 Support for Anet A2 Plus (#11660) 2018-08-29 16:05:23 -05:00
Scott Lahteine
ba46edec2a Fix 5 mixing steppers, etc.
Co-Authored-By: neorex <neorex99@gmail.com>
2018-08-29 03:21:43 -05:00
srieche
99393550f2 [1.1.x] Silently drop M108, M112 and M410 with emergency parser enabled (#11666) 2018-08-28 20:48:31 -05:00
Scott Lahteine
4f0737cd2c Fix SD percent for Lite Status Screen
Co-Authored-By: Lê Hoàng <icy.lord.love.angel@gmail.com>
2018-08-26 17:13:58 -05:00
Scott Lahteine
cf1b2af71a Update Ultimaker servo pin
As pointed out at https://github.com/MarlinFirmware/Marlin/issues/7981#issuecomment-407116642
2018-08-21 11:38:45 -05:00
Scott Lahteine
903ccb4b60 Always disable/restore leveling on tool-change
Counterpart to #11559 and its followup.

Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com>
2018-08-21 09:13:36 -05:00
Scott Lahteine
b303affbb0 Fix typo in .travis.yml 2018-08-21 07:55:00 -05:00
Scott Lahteine
3f75c5df7c Fix Homing/UBL
Co-Authored-By: smoki3 <kevinbayer8@gmail.com>
2018-08-21 07:49:13 -05:00
Scott Lahteine
e5de565987 Fix up Max7219 orientations (#11597) 2018-08-20 20:31:40 -05:00
Scott Lahteine
feb55517af [1.1.x] Max7219 cleanup, simplify, and extend (#11574) 2018-08-18 01:48:28 -05:00
Scott Lahteine
2f2f16c340 Marlin assumes signed chars 2018-08-16 21:18:20 -05:00
Roxy-3D
3ef6cf0bfb declare void Max7219_register_setup(); 2018-08-15 10:39:08 -05:00
Scott Lahteine
5f0798544e Update Czech language
Co-Authored-By: petrzjunior <junior@zahradnik.cz>
2018-08-14 18:47:24 -05:00
teemuatlut
b4efefea8b [1.1.x] Fix TMC2208 SW serial communication (#11548)
* New TMC2208 constructor
* Update default driver configuration
2018-08-14 18:44:17 -05:00
Roxy-3D
e518533a75 Change M7219 I to setup Max7219 registers, but not do initialization pattern 2018-08-13 17:48:17 -05:00
Roxy-3D
02381d6821 Make M7219 I more robust and nicer to look at 2018-08-13 17:05:13 -05:00
Roxy-3D
263beae3e9 Add I parameter to ignore pin protection on M42 2018-08-13 16:50:24 -05:00
Scott Lahteine
cc6a31528d Improve AXIS_DRIVER_TYPE macros 2018-08-13 16:50:24 -05:00
Aaron Griffith
5482af38f0 Remove oversampled data from thermistor table 71 (#11504)
Data in Table 71 is extremely oversampled (see Issue #11220). I have removed the data points that perform *worse* than linearly interpolating the remaining points, and fixed up two points that were simply rounded incorrectly.
2018-08-13 02:52:48 -05:00
Scott Lahteine
a9cb4834da Allow Einsy RAMBo FAN1_PIN override 2018-08-13 02:48:25 -05:00
Shen Yiming
7b0a8e85ba Fix pca9632_set_led_color lost i2c connection (#11530) 2018-08-12 18:05:00 -05:00
Scott Lahteine
77625654f4 Reduce max accel in Creality configs 2018-08-11 22:57:44 -05:00
Scott Lahteine
bdb2dd27ad Allow G33 to compile with no LCD 2018-08-11 22:45:04 -05:00
Scott Lahteine
f1467ddc0e UBL/planner patch tweaks 2018-08-11 22:45:04 -05:00
Thomas Moore
105d20c2e8 Account for UBL correction when setting the planner position (#11511) 2018-08-10 13:00:45 -05:00
Scott Lahteine
9e46e84a55 Treat TMC2660 like non-TMC (#11485) 2018-08-10 00:30:11 -05:00
Scott Lahteine
4f59ee8978 Minor spacing fixes 2018-08-07 14:00:48 -05:00
Scott Lahteine
e741241721 No raise when homing after power-loss 2018-08-07 13:50:33 -05:00
Scott Lahteine
332a80cadb Restore bugfix README, etc. 2018-08-07 13:45:03 -05:00
lsellens
614a944504 auto power control without heated bed (#11467)
`AUTO_POWER_CONTROL` will not work if printer has no heated bed due to `degTargetBed()` not being defined
2018-08-06 23:18:13 -05:00
Giuliano
33364c17b9 [1.1.x] Better timing handling (#11462) 2018-08-06 23:14:11 -05:00
Scott Lahteine
b8d4c4216f Easier to disable homing validation (#11457) 2018-08-06 23:11:28 -05:00
Scott Lahteine
86d9af1108 Fix drivers.h dependency, defer macro evaluation (#11449) 2018-08-03 21:48:57 -05:00
silentninja1
4c4fffc503 [1.1.x] Fix Dual X Carriage tool change crash (#11425) 2018-08-03 20:47:19 -05:00
Marcio Teixeira
fae96a6a13 Fix jumping progress bar. (#11438)
- When `LCD_SET_PROGRESS_MANUALLY` was disabled and an SD print was not active (i.e. the printer was idle), progress_bar_percent would read uninitialized memory from stack and cause progress bar to jump wildly.
- Also updated conditions in `#ifdef` to match `ultralcd.cpp`
2018-08-03 17:16:14 -05:00
Roxy-3D
7d491aa015 Tiny improvement to M7219
The registers within the Max7219 can get corrupted a number of ways.  This allows the Max7219 to be reset and fully initialized.
And...  it also allows the user to see the initialization pattern.
2018-08-02 18:43:36 -05:00
Scott Lahteine
888d319145 Align some config options 2018-08-02 18:42:20 -05:00
MikeLud
a2ac7e1407 Add M915 to Prepare Menu (#11383) 2018-07-31 02:03:49 -05:00
Shen Yiming
8db91f0bd1 Clean up 12864 OLED code (#11388) 2018-07-30 23:02:12 -05:00
Scott Lahteine
c4f4c255b4 Fix initial safe_speed in jerk code (#11396) 2018-07-30 22:49:20 -05:00
Roxy-3D
33c37d587d Revert "[1.1.x] idex and bl touch fix" (#11406)
* Revert "[1.1.x] bltouch home refinements (#11398)"

This reverts commit 30839a6ba6.

* Revert "[1.1.x] idex and bl touch fix (#11392)"

This reverts commit e1bef0ea79.
2018-07-28 23:14:41 -05:00
Giuliano
30839a6ba6 [1.1.x] bltouch home refinements (#11398)
Just create a better functions call logic flow
2018-07-28 19:29:26 -05:00
silentninja1
e1bef0ea79 [1.1.x] idex and bl touch fix (#11392)
* [1.1.x] IDEX and BLTouch Fixes

Fix bltouch not deploying during fast home, fix dual x carriage setting opposing side park position as destination on tool change

* Update Marlin_main.cpp

* Update Marlin_main.cpp

* Change brackets to be more in conformance with Marlin coding standards
2018-07-28 10:33:35 -05:00
Giuliano
7284488da3 [1.1.x] fix bltouch homing (#11380)
Partially revert. Seems to solve the issue, but one report says G29 still fails.
2018-07-27 18:29:26 -05:00
Scott Lahteine
cab2e0877e Update DELAY_10US 2018-07-26 20:21:50 -05:00
bleughb
b6f24992ee [1.1.x] Update fastio_1280.h pin mapping comments (#11374) 2018-07-26 05:19:05 -05:00
Scott Lahteine
c30f636d22 Improve drivers.h macros (#11372) 2018-07-26 05:10:11 -05:00
Giuliano
2f76ec5c6a [1.1.x]-different-bltouch-init (#11358) 2018-07-26 05:03:39 -05:00
Scott Lahteine
56fbe3361b Ensure ADC conversion is complete before reading (#11370)
Co-Authored-By: gloomyandy <andy-git@gloomy-place.com>
2018-07-26 03:58:33 -05:00
vitekn
b5ed4a1a8c Fix thermistor type in Anet A6 config (#11346)
I have Anet a6 and my thermistor is NTC 3950. If the default is 5 (ATC Semitec 104GT-2) it gives overheat upto 330 degrees (real) instead of 250 (displayed). I don't know for sure if all the A6 have such thermistor but I think it's safer to have underheat than overheat. And 3950 looks more spread among A6 searching on Internet. The same is true for the bed though it has small difference at the beginning of scale, actually +-2 degrees.
2018-07-26 02:03:30 -05:00
Scott Lahteine
5061c3a016 Merge pull request #11368 from thinkyhead/bf1_pwm_adjustments
[1.1.x] Tweak some SoftPWM code
2018-07-25 19:02:10 -05:00
Scott Lahteine
2af06b82b4 Specify some extra CR-10S pins 2018-07-25 18:18:33 -05:00
Scott Lahteine
637489ae17 Tweak some SoftPWM code 2018-07-25 18:16:33 -05:00
Scott Lahteine
349cf3ee5a Sync enqueue_and_echo_command with 2.0.x 2018-07-25 18:06:31 -05:00
Giuliano
e5b928f574 [1.1.x] Typo fix (#11366)
Typo fix
2018-07-25 18:00:28 -05:00
Scott Lahteine
2b860ab8a2 Merge pull request #11361 from thinkyhead/bf1_define_drivers_th
[1.1.x] Configure stepper drivers per axis
2018-07-25 04:05:13 -05:00
Scott Lahteine
7bad507d70 Simplify stepper driver config 2018-07-25 03:02:12 -05:00
Scott Lahteine
6d6bdc6517 Add *_DRIVER_TYPE to example configs 2018-07-25 02:39:16 -05:00
silentninja1
57ce81f067 [1.1.x] Fix LCD axis move E index (#11328) 2018-07-25 02:21:05 -05:00
Scott Lahteine
ed0e72bf44 Fix spelling in configs 2018-07-24 21:02:22 -05:00
silentninja1
060e7a3565 Silentninja1 idex crash fix (#11329)
* Move home all axis prototype to allow access from UBL.h

* Remove home all axis command as it exists in marlin.h now

* Reverse order of tool change and home

Race condition causes E0 carriage to move on E1 commands and crash into parked head if order is reversed. Needs more research into permanent fix, but this will prevent damage to machines in the meantime.
2018-07-24 14:44:50 -05:00
Scott Lahteine
3bbb121e7d Tweak some Max7219 code 2018-07-19 18:51:35 -05:00
Scott Lahteine
d1590fec3e Merge pull request #11308 from thinkyhead/bf1_manual_probe_start_z
[1.1.x] Manual Z Start Height
2018-07-19 18:26:51 -05:00
Roxy-3D
6c62b0e263 Change Max7219_idle_task() to use columns if Y-Axis has 16 LED's (#11317) 2018-07-19 16:59:38 -05:00
Scott Lahteine
221e8bbb05 Add MANUAL_PROBE_START_Z to example configs 2018-07-18 21:50:18 -05:00
Scott Lahteine
888774cbc3 Add MANUAL_PROBE_START_Z for manual probing 2018-07-18 21:50:18 -05:00
Scott Lahteine
db057eb453 Fix tool_change call in UBL G29
Fix #11279, #11252
2018-07-18 20:35:14 -05:00
Scott Lahteine
5ce312f158 Merge pull request #11305 from thinkyhead/bf1_power_loss_pin
[1.1.x] Add support for power loss detect pin
2018-07-18 20:13:47 -05:00
Scott Lahteine
389f2ac81f planner.synchronize at start of tool_change
See https://github.com/MarlinFirmware/Marlin/issues/10949#issuecomment-398540498
2018-07-18 20:09:39 -05:00
Scott Lahteine
7321f30ac0 Add POWER_LOSS_PIN support 2018-07-18 19:58:06 -05:00
Scott Lahteine
46b0e054b1 Add POWER_LOSS_PIN to example configs 2018-07-18 19:58:06 -05:00
Giuliano
9d0627d66c Make GCodeParser::debug static (#11294) 2018-07-17 23:38:39 -05:00
Scott Lahteine
76ec07301d Merge pull request #11297 from thinkyhead/bf1_malyan_lcd_update
[1.1.x] Better Malyan LCD Feedrate/Temp handling
2018-07-17 21:07:04 -05:00
Scott Lahteine
6024ffedd9 Improve Malyan progress / feedrate
Co-Authored-By: J.C. Nelson <xc0000005@users.noreply.github.com>
2018-07-17 19:33:57 -05:00
Scott Lahteine
7e648f3721 Add card.longest_filename, more lcd_strlen updates 2018-07-17 19:33:57 -05:00
Scott Lahteine
036f25e159 More lcd_strlen updates 2018-07-17 18:17:19 -05:00
Scott Lahteine
17e1eec21e Make sure linear units are initialized
Based on #11295

Co-Authored-By: Giuliano <gmagician@users.noreply.github.com>
2018-07-17 17:20:57 -05:00
Roxy-3D
58775cc694 Don't display M421 values for UBL at startup
It takes 20 seconds to display the mesh values at startup...   If we are going to display this information at startup, we should find a more terse way to do it.   Perhaps displaying an entire row of the mesh at a time makes sense?
2018-07-17 17:17:09 -05:00
Scott Lahteine
fbc3fdb490 LCD strlen functions like 2.0.x 2018-07-17 15:25:58 -05:00
Scott Lahteine
756080fcca Followup to floats patch 2018-07-17 15:24:33 -05:00
Giuliano
e6801ff84a [1.1.x] Fix change filament (#11268)
Prevent crash, on filament change, when printer is not homed
2018-07-16 21:48:45 -05:00
Roxy-3D
bc961220b7 Change Max7219_idle_task() routines to use single line if X-Axis has 16 or more LED's
Change Max7219_idle_task() routines to use single line if X-Axis has 16 or more LED's

This gets bugfix_1.1.x at parity with https://github.com/MarlinFirmware/Marlin/pull/11285 when it gets merged.
2018-07-16 19:23:59 -05:00
kaimimue
256f76d35e Fix Vellemann K8400 Configuration (#11258)
The maximum movement is 180mm for Velleman K8400.
An offset of `Y_MIN_POS` violates an assertion in `SanityCheck.h`.

Code tested on Vellemann K8400 with Dual Extruder.
2018-07-13 23:15:00 -05:00
Giuliano
1067c43107 [1.1.x] fix kill printer (#11261)
This will fix kill message on dual printer with 0 alignment offset
2018-07-13 23:13:29 -05:00
Scott Lahteine
d60b2e5ba8 Merge pull request #11233 from nightgryphon/multiprobe-z-up
[1.1.x] Shorter Z raise between multiple probes
2018-07-12 22:44:25 -05:00
Scott Lahteine
cb0777dbeb Merge pull request #11248 from thinkyhead/bf1_tmc_unify_param_i
[1.1.x] Unify "I" parameter for M906,M912 etc.
2018-07-12 22:31:26 -05:00
Scott Lahteine
8f110190eb Add Z_CLEARANCE_MULTI_PROBE to example configs 2018-07-12 22:27:06 -05:00
nightgryphon
54adf6f52d Shorter Z up move between multiple probing attempts
For some probes like micro switches the full Z clearance raise between
probing attempts is not required while bigger Z clearance between probe
points is still needed to avoid clamps. The shorter Z raise within
multiprobing same point significantly increase probing speed and the whole
auto level process.
2018-07-12 22:27:06 -05:00
Clifford Roche
3b5c81b84a [1.1.x] Validate that X/Y_PROBE_OFFSET_FROM_EXTRUDER are integers (#11255) 2018-07-12 21:22:59 -05:00
Scott Lahteine
d8331d97d6 Unify M91x parameter I meaning, simplify reports 2018-07-11 20:31:40 -05:00
Scott Lahteine
5cddfce0ee Endstops::report_state => event_handler 2018-07-11 19:47:25 -05:00
Aaron Griffith
5f587126b9 Loosen static assertion guarding overflow in SCAN_THERMISTOR_TABLE (#11240)
Bisect search merged in #10882 actually works fine for thermistor
tables with up to 255 entries with no overflow, due to C++ integer
promotion rules.

Closes issue #11220.
2018-07-11 16:42:23 -05:00
Roxy-3D
39b3e4c501 Support for multiple Max7219 units in a chain (#11226)
* Support for multiple Max7219 units in a chain

I'll move this support over to bugfix_2.0.0 in the next few days.   And
then look at updating the Max7219_idle() routine to make use of multiple
units in a chain.

* spelling correction
2018-07-08 17:35:58 -05:00
Roxy-3D
fae2929b6b Resolve issue where user can't edit mesh 2018-07-08 14:39:08 -05:00
Scott Lahteine
ccb225f43a Float maths updates for 2.0.x parity (#11213)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-07-06 21:44:33 -05:00
Scott Lahteine
fc9f4ce2c0 Fix missing quote in language list
Co-Authored-By: p3p <p3p@p3psoft.co.uk>
2018-07-04 13:40:18 -05:00
Scott Lahteine
a69cc6c5ba Fix Trigorilla include typo 2018-07-03 20:22:36 -05:00
Scott Lahteine
03a704600c No M914 or SGT set for non-sensorless axes (#11197) 2018-07-03 20:10:43 -05:00
Scott Lahteine
e84341412c Merge pull request #11194 from Schullebernd/bugfix-1.1.x
[1.1.x] Tronxy X3A configurations and thermistor
2018-07-03 19:05:51 -05:00
Scott Lahteine
fae20983eb Add configurations for Tronxy X3A 2018-07-03 18:14:46 -05:00
Scott Lahteine
559e935785 Bring default Configuration.h up to date 2018-07-03 18:10:55 -05:00
Marcel Schulz
432da42dba Add thermistor 501 (100K Zonestar) 2018-07-03 18:10:55 -05:00
Scott Lahteine
0702c78e62 Fix and improve POWER_LOSS_RECOVERY (#11186) 2018-07-02 23:21:18 -05:00
Scott Lahteine
84187dca5c Add "Marlin Dev Mode" option 2018-07-02 22:53:01 -05:00
Scott Lahteine
b7c648db32 Minor patches for POWER_LOSS_RECOVERY 2018-07-02 17:25:15 -05:00
Scott Lahteine
a83f7f1d25 Turn off DISABLE_INACTIVE_EXTRUDER with SWITCHING_NOZZLE
Fix #11183
2018-07-02 17:25:15 -05:00
Roman Moravčík
5700360adf [1.1.x] Slovak translation update (#11174) 2018-07-01 23:15:14 -05:00
Scott Lahteine
defaa93121 Do a hard kill for failed homing moves (#11160) 2018-06-30 21:53:58 -05:00
Scott Lahteine
c4fbbcaf46 Lose the old HOMEAXIS macro 2018-06-30 18:07:40 -05:00
Scott Lahteine
ca6ddbc555 Detect endstop hits in any direction 2018-06-30 17:26:49 -05:00
Scott Lahteine
1caa01a9a2 Fix Trigorilla 1.4 pin defines
See #11097
2018-06-30 13:45:41 -05:00
Scott Lahteine
a294ec3836 Add delta feedrate scaling (#11152) 2018-06-30 13:44:37 -05:00
Giuliano
a789ab4005 [1.1.x] Git ignore for VS (#11156)
Add missing VS file
2018-06-30 02:51:20 -05:00
Scott Lahteine
718a22e836 Non-conflicting CS pins for MKS Gen L 2018-06-30 02:35:45 -05:00
Scott Lahteine
be3e006fc8 Fix G33 compile warning 2018-06-29 23:20:59 -05:00
Scott Lahteine
654f0bed25 Remove JUNCTION_DEVIATION_INCLUDE_E option (#11146) 2018-06-29 22:41:56 -05:00
Scott Lahteine
609e7da3f3 Fix and tweak POWER_LOSS_RECOVERY (#11150) 2018-06-29 22:40:49 -05:00
Scott Lahteine
67475374ae Fix SKEW_CORRECTION compile error 2018-06-29 19:37:47 -05:00
Scott Lahteine
485d50ecb0 Ignore Z min endstop with separate Z probe
To allow for the case where a Z endstop (e.g., hall effect) is higher than the probe trigger point, don't check the Z min endstop during probe moves. See #11134
2018-06-28 05:09:45 -05:00
Scott Lahteine
5788a393c0 Fix up microsteps conditionals 2018-06-28 00:07:03 -05:00
Scott Lahteine
5e03dede18 Eliminate stepper.* signed/unsigned warnings 2018-06-27 23:06:49 -05:00
Scott Lahteine
b880028334 Fix stepper/planner block handling, race conditions (#11136)
- Allow planner to alter the deceleration phase of the currently executing block.
- Remove BUSY flag, as it is NON ATOMIC to set bits in the Stepper ISR and Planner at the same time.

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-27 18:11:23 -05:00
Scott Lahteine
cff2201629 Poll all endstops, even when stationary (#11125)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-27 04:19:05 -04:00
Scott Lahteine
e352c1e52d Endstop patch followup 2018-06-27 00:12:42 -05:00
Scott Lahteine
04fc715c91 Add minimum step dir delay option, A4988 pulse note (#11122)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-26 22:28:46 -04:00
Scott Lahteine
4d5c655f8d Make max_e_jerk an array to save CPU (#11121)
Co-Authored-By: gloomyandy <andy-git@gloomy-place.com>
2018-06-26 22:09:38 -04:00
Giuliano
0a2d3ecfd4 [1.1.x] Fix advanced pause init values (#11096)
Fixed for cycle used to initialize default values
2018-06-26 14:38:08 -04:00
Scott Lahteine
8600cbb01b Clear Max7219 without test pattern 2018-06-25 11:54:14 -04:00
Scott Lahteine
dd9c65d0be [1.1.x] Fix stepper/planner race condition, Stepper pulse timer (#11084)
* Fix planner/stepper race condition

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
Co-Authored-By: AnHardt <github@kitelab.de>

* Fix stepper pulse timing

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-22 10:53:46 -04:00
Scott Lahteine
53745446f9 Fix LIN_ADVANCE max_e_jerk_factor
According to https://github.com/MarlinFirmware/Marlin/issues/9917#issuecomment-399204568
2018-06-21 21:38:52 -04:00
Scott Lahteine
52f5efb78d Filter endstops state at all times (#11076) 2018-06-21 20:13:16 -05:00
Scott Lahteine
94787114f1 Merge pull request #11074 from thinkyhead/bf1_value_editing 2018-06-21 20:12:48 -05:00
Roxy-3D
7632df6820 add the move_z_after_probing() functionality to UBL's G29 J 2018-06-21 13:22:40 -05:00
Scott Lahteine
bd10791b6d Edit Z fade as whole numbers 2018-06-21 11:53:29 -04:00
Scott Lahteine
b05fcad7fe Fix value editing with callback 2018-06-21 11:48:27 -04:00
Scott Lahteine
3bb332b440 Use Tool 0 for Dual X Axis G29
See https://github.com/MarlinFirmware/Marlin/issues/5597#issuecomment-397683325
2018-06-19 22:54:30 -05:00
Scott Lahteine
e0b4abd3eb Don't reset stepper timeout for all g-codes 2018-06-19 21:50:09 -05:00
Roxy-3D
3ca4f09680 Tiny improvement to M7219
The registers within the Max7219 can get corrupted a number of ways.  This allows the Max7219 to be reset and fully initialized.
And...  it also allows the user to see the initialization pattern.
2018-06-19 18:21:19 -05:00
Giuliano
7cdaf69ab7 [1.1.x] Fix Italian msg len (#11057)
Fix message to long for 12864 display
2018-06-18 22:04:35 -05:00
Scott Lahteine
dc087b1132 [1.1.x] Tweaks and additions for MAX7219 (#11033) 2018-06-18 22:03:53 -05:00
Scott Lahteine
35023b09ef Fix critical section start/end 2018-06-16 17:38:46 -05:00
Scott Lahteine
a85f60adb9 Unsigned eeprom mesh addresses 2018-06-15 15:54:42 -05:00
Bob Kuhn
c28d2e9638 Auto Build for Visual Studio Code (#11015) 2018-06-13 18:49:30 -05:00
Giuliano
e601cfb836 [1.1.x] reset bltouch on home (#11010) 2018-06-13 14:08:47 -05:00
Scott Lahteine
c0e4a7a928 Merge pull request #11012 from thinkyhead/bf1_ensure_endstop
[1.1.x] Extra insurance against endstop false positives
2018-06-13 01:21:41 -05:00
Scott Lahteine
af1721b351 Extra insurance against endstop false positives 2018-06-13 00:36:47 -05:00
Scott Lahteine
cc4e515480 Fix coolstep_min_speed / sensorless homing
Fix #8890
2018-06-12 22:53:17 -05:00
Scott Lahteine
91976e3ef4 Merge pull request #11011 from thinkyhead/bf1_honor_step_rate
[1.1.x] Ensure good min/max stepper timing
2018-06-12 21:52:48 -05:00
Scott Lahteine
9d91ea4e3e Fix stepper pulse duration 2018-06-12 21:35:03 -05:00
Scott Lahteine
d3567592d7 Localize stepper-specific defines 2018-06-12 21:22:13 -05:00
Scott Lahteine
87eddf35e2 HAL_STEPPER_TIMER_RATE => STEPPER_TIMER_RATE 2018-06-12 16:55:57 -05:00
Scott Lahteine
1d048f5192 Optional homing/leveling with O parameter
Based on #10913

Co-Authored-By: dot-bob <gibben@gmail.com>
2018-06-11 23:13:18 -05:00
Scott Lahteine
fe69cf8a5d Merge pull request #11002 from thinkyhead/bf1_junction_deviation_fix
[1.1.x] Updates for junction_deviation_mm
2018-06-11 22:03:59 -05:00
Scott Lahteine
8073f23672 Improvements for junction_deviation_mm
- Drop `max_jerk` with `JUNCTION_DEVIATION`
- Add `max_e_jerk_factor` for use by `LIN_ADVANCE`
- Recalculate `max_e_jerk_factor` when `junction_deviation_mm` changes
- Fix LCD editing of `junction_deviation_mm`
2018-06-11 21:49:26 -05:00
Scott Lahteine
4bc5e9341e Use bit flags for homed/known 2018-06-11 21:49:26 -05:00
Scott Lahteine
4ed92f838f Use stepper timer to count pulse duration 2018-06-11 21:46:31 -05:00
Scott Lahteine
47f7c4889d Fix include in lite status screen 2018-06-11 21:30:49 -05:00
Scott Lahteine
cfd6437ea6 Update travis test for 2.0.x parity 2018-06-11 20:10:27 -05:00
Scott Lahteine
6a7e0a852b Minor stepper.cpp cleanup 2018-06-11 19:16:31 -05:00
Scott Lahteine
eca91a8bd7 Tweak M122 report spacing 2018-06-10 20:34:18 -05:00
Scott Lahteine
8e987023e1 Replace ADC with HAL_READ_ADC 2018-06-10 20:09:44 -05:00
Scott Lahteine
53730be606 Fix MarlinSerial (#10992) 2018-06-10 20:04:52 -05:00
Scott Lahteine
38f73d57bc Clean trailing whitespace 2018-06-10 18:42:39 -05:00
Scott Lahteine
7175da3256 Multiplier edit large ranges 2018-06-10 18:18:22 -05:00
Scott Lahteine
4c3504c43f Limit Junction Deviation (0.01 to 0.3) 2018-06-10 18:18:22 -05:00
Scott Lahteine
327b9c389d Add Junction Deviation mm runtime setting (#10989) 2018-06-10 18:02:40 -05:00
Scott Lahteine
f1ed08e369 Fix serial debug ouput 2018-06-10 17:55:56 -05:00
Scott Lahteine
8dac040c42 Protected pin err for M226 2018-06-10 17:40:00 -05:00
Scott Lahteine
d70189abf6 Always stow BLTOUCH at start of G28 2018-06-10 16:24:12 -05:00
Scott Lahteine
6e49901104 Adaptive and max stepping followup 2018-06-10 16:00:38 -05:00
Scott Lahteine
e0aec001f3 Merge pull request #10984 from thinkyhead/bf1_multiaxis_smoothing
[1.1.x] Adaptive multi-axis step smoothing
2018-06-10 15:12:54 -05:00
Scott Lahteine
e9c8c5dbc9 Merge pull request #10982 from thinkyhead/bf1_xon_xoff_changes
[1.1.x] Serial handshaking fixes / debug
2018-06-10 04:33:23 -05:00
Scott Lahteine
9c083d8a9f Add sanity-check for MOTHERBOARD 2018-06-10 04:01:59 -05:00
Scott Lahteine
b7ddfddf51 Add MAXIMUM_STEPPER_RATE, enforce in multi-stepping
The timing value should be properly set for ALL boards. The compiler will check and set maximum step rate calculations based on those values.

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-10 01:56:00 -05:00
Scott Lahteine
1cdcc6adfa Adaptive multiaxis step smoothing
- Stepper bugs fixed
- Support MIXING_EXTRUDER with Linear Advance
- Miscellaneous cleanup

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-10 01:56:00 -05:00
Scott Lahteine
aab9cb0bbe Update MINIMUM_STEPPER_PULSE description 2018-06-10 00:14:39 -05:00
Scott Lahteine
095cc75838 Add hidden Serial debug options
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-09 22:23:10 -05:00
Scott Lahteine
17a965de17 Fix serial XON/XOFF handshaking
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-09 22:23:10 -05:00
Scott Lahteine
63af814d4d Add HAL_timer_start to HAL.h
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-09 22:12:52 -05:00
Giuliano
1b1e15623a [1.1.x] Fix null check in lsDive (#10979) 2018-06-09 22:03:57 -05:00
Scott Lahteine
1132ec34c1 Increase BLOCK_DELAY_FOR_1ST_MOVE to 100
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-06-09 21:13:55 -05:00
Scott Lahteine
4c4fd9f32f Highlight 64128N and common ST7565 difference
Followup to #10919, addressing #10962
2018-06-09 15:08:46 -05:00
Scott Lahteine
60cd6892e2 Prevent MB false-positive on bad board name 2018-06-08 19:57:31 -05:00
Scott Lahteine
1dd4e63402 MarlinSerial.cpp formatting tweak 2018-06-08 19:53:39 -05:00
João Brázio
7aa7ecbd0e Update BQ Hephestos 2 config, NTC-70 table (#10902) 2018-06-07 21:23:43 -05:00
Scott Lahteine
582845fd72 Allow FAN_PIN override, pins cleanup (#10957) 2018-06-07 16:39:11 -05:00
Scott Lahteine
70d39ac185 Fix M503 ABL mesh report. (Zero-based IJ indices) 2018-06-07 16:25:35 -05:00
Scott Lahteine
30ee336c85 Merge pull request #10945 from thinkyhead/bf1_less_wordy_TMC_M503
[1.1.x] More concise M503 output for TMC commands
2018-06-06 20:57:28 -05:00
Scott Lahteine
a7b86e3921 Script to do Travis CI test locally 2018-06-06 03:12:35 -05:00
Scott Lahteine
cd73e8f825 More concise M503 output for M906, M913, M914 2018-06-06 03:12:35 -05:00
Scott Lahteine
827ba94e16 Fix a compile warning 2018-06-05 22:46:45 -05:00
Scott Lahteine
851149954a Tweak sanity formatting 2018-06-05 22:45:07 -05:00
Scott Lahteine
295f93caea Prevent Teensy2.0++ bootloader overwrite 2018-06-05 22:36:00 -05:00
Alex
3bc392f592 Prevent a buffer overflow in cardreader 2018-06-05 22:14:51 -05:00
Scott Lahteine
3be22fc1fc Merge pull request #10919 from thinkyhead/bf1_misc_cleanups_jun2
[1.1.x] Clean up ST7565, dual endstops homing
2018-06-03 03:35:55 -05:00
Scott Lahteine
7d39bcfcce LED menu item bool (like Case Lights) 2018-06-03 00:32:13 -05:00
Scott Lahteine
9641bae325 Cleanup for dual endstops homing 2018-06-03 00:32:13 -05:00
Scott Lahteine
d32beafd21 Add macros for ST7565 commands 2018-06-02 20:31:26 -05:00
Scott Lahteine
3b06a8e917 [1.1.x] Assorted fixes and improvements (#10914)
Co-Authored-By: ejtagle
2018-06-01 19:00:59 -05:00
Scott Lahteine
67d9d1870c Merge pull request #10906 from Sebastianv650/fix_junction_dev 2018-06-01 00:12:12 -05:00
Scott Lahteine
08090d10b6 Drop JUNCTION_ACCELERATION from example configs 2018-05-31 20:06:37 -05:00
Sebastianv650
568b19e7d4 Fix/Improve junction deviation
- Respect axis max acceleration limits instead of forcing a fixed acceleration value.
- The `junction_unit_vec` ensures proper handling of entry and exit speeds even when the axes involved have different limits.
2018-05-31 20:06:37 -05:00
Scott Lahteine
c010b1f43f Clean up some trailing spaces 2018-05-31 19:37:22 -05:00
Scott Lahteine
2b49f8ee65 Fix the Z un-hop on G11
Co-Authored-By: zarthcode <anthony.clay@zarthcode.com>
2018-05-29 23:40:16 -05:00
Scott Lahteine
9c8594c2fb For SCARA probe Y offset is proximal/distal 2018-05-29 21:44:13 -05:00
Scott Lahteine
a11717eed6 Improve probe logging 2018-05-29 21:44:13 -05:00
Scott Lahteine
43a55a9af4 Update Fan 2 and E0 Auto Fan pins for Trigorilla 2018-05-29 12:24:37 -05:00
Scott Lahteine
0460406154 Fix M914 value range (-64...+63)
Fix #10896
2018-05-29 12:03:01 -05:00
Scott Lahteine
7445f30cbf Set deltas to park on the left 2018-05-29 11:45:17 -05:00
Scott Lahteine
6f07699ed5 HOTENDS for Switching Extruder with Switching Nozzle 2018-05-29 11:09:29 -05:00
Scott Lahteine
d6cd7d924c Modify E-stepping macros for use in LINEAR_ADVANCE (#10887) 2018-05-28 19:33:54 -05:00
Scott Lahteine
2c4d8761ec More concise commentary in planner.cpp 2018-05-28 19:27:55 -05:00
Scott Lahteine
dfe90d552d Long temperature tables need special consideration 2018-05-28 06:27:10 -05:00
Scott Lahteine
c45bfc1c21 Faster (bisect) search in thermistor tables (#10882) 2018-05-27 23:27:34 -05:00
Scott Lahteine
fbeea12026 Correct HOTENDS for SWITCHING_EXTRUDER 2018-05-27 22:55:57 -05:00
Scott Lahteine
33b7488f68 Update stepper.cpp Bresenham for 2.0.x parity 2018-05-27 21:44:01 -05:00
Scott Lahteine
0d6ef67e48 Update board_f_cpu to board_build.f_cpu 2018-05-26 23:29:27 -05:00
Scott Lahteine
14f45448cb Fix switching extruder stepping with LA 2018-05-26 19:05:31 -05:00
Scott Lahteine
e108713d7b Merge pull request #10857 from thinkyhead/bf1_rename_some_options
[1.1.x] Rename and document some configuration options
2018-05-26 18:42:22 -05:00
Scott Lahteine
a7561df3d7 Tweak configuration spacing 2018-05-26 18:31:57 -05:00
Scott Lahteine
0bfb10ffb6 Rename Junction Deviation options 2018-05-26 18:31:57 -05:00
Scott Lahteine
949ee7afe9 BEZIER_JERK_CONTROL => S_CURVE_ACCELERATION 2018-05-26 18:31:57 -05:00
Scott Lahteine
9186123676 Fix manual moves for switching tools (#10867) 2018-05-26 18:30:29 -05:00
Bob Kuhn
a07433f1cc [bugfix-1.1.x] Auto-build CDC support fix, error handling improvements (#10852) 2018-05-26 01:07:01 -05:00
Scott Lahteine
1615542ac3 Fix up stepper ISR with linear advance timing (#10854)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-26 01:00:02 -05:00
Sebastianv650
815c4e7b3f Add missing config line for JUNCTION_DEVIATION (#10855) 2018-05-26 00:57:00 -05:00
Eduardo José Tagle
63f7add00c [1.1.x] Buffer overflow and scroll fix, UTF8 cleanup (#10851) 2018-05-25 23:31:19 -05:00
Scott Lahteine
069bd19aec Fix warning with FASTER_GCODE_PARSER disabled 2018-05-25 06:46:28 -05:00
Scott Lahteine
d1235033b2 Make sure FAN_ANIM_FRAMES is defined 2018-05-25 05:25:42 -05:00
Scott Lahteine
b20d7129ab Fix reset of endstops and move state 2018-05-24 19:32:58 -05:00
Scott Lahteine
995702c924 Minor optimization of axis_did_move bits 2018-05-24 19:08:46 -05:00
Scott Lahteine
62d923a053 Fix K8400 Y min pos, M118 comment 2018-05-24 08:19:30 -05:00
Scott Lahteine
a5ac80293e Merge pull request #10836 from thinkyhead/bf1_malyan_lcd_fix
[1.1.x] Malyan LCD compatibility
2018-05-24 06:26:30 -05:00
Scott Lahteine
181516f7cb Fix Malyan LCD, allow no SD Card 2018-05-24 06:14:32 -05:00
Scott Lahteine
ebb839971d Conditionals match 2.0.x indentation 2018-05-24 05:51:14 -05:00
Scott Lahteine
27c5ede796 Add USE_MARLINSERIAL conditional 2018-05-24 05:51:14 -05:00
Scott Lahteine
aa8fd920a4 Followup for core endstops 2018-05-24 03:01:24 -05:00
Scott Lahteine
ac293bdf95 Clean up and consolidate SD-related code (#10832) 2018-05-24 01:19:12 -05:00
Scott Lahteine
766bcc6a70 Patches for core motion tests 2018-05-24 00:50:25 -05:00
Scott Lahteine
912fff0923 Drop #pragmas that don't help .c files 2018-05-23 23:44:53 -05:00
Scott Lahteine
773a550472 Fix fade value for power-loss recovery
Fix #10817

Co-Authored-By: cdedwards <cd.edwards@sasktel.net>
2018-05-23 16:55:14 -05:00
Scott Lahteine
76019c83b5 Default G30 to engage / disengage 2018-05-23 16:55:14 -05:00
Scott Lahteine
58a6eb656c Fix Endstops Core compatibility (#10822)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-23 03:45:12 -05:00
Scott Lahteine
25b3511241 Suppress U8glib warnings on build 2018-05-23 02:26:18 -05:00
Scott Lahteine
0a0f2a5857 Followup to LCD button tweak 2018-05-22 19:51:05 -05:00
Scott Lahteine
c76a466ba9 Followup to endstops update 2018-05-22 14:52:24 -05:00
Bob Kuhn
12e8e0be22 [bugfix-1.1.x] Yet another auto build update & add Sublime menu support (#10808) 2018-05-22 02:07:58 -05:00
Scott Lahteine
01083dfca1 Restore lost Endstops::monitor 2018-05-22 01:58:20 -05:00
Scott Lahteine
07c35886e1 Tweak G38 formatting 2018-05-22 01:56:45 -05:00
Ante Vukorepa
4e67660c0f [1.1.x] Fix G1 behaviour after tool unpark (#10777) 2018-05-22 00:51:13 -05:00
Scott Lahteine
f552557b0c Fix DEBUG_LEVELING_FEATURE with MBL 2018-05-22 00:48:14 -05:00
Scott Lahteine
083726b2ae Group button-related LCD code 2018-05-22 00:48:14 -05:00
Scott Lahteine
cb6e58559c Cleanup in stepper_indirection.h 2018-05-22 00:32:17 -05:00
Scott Lahteine
5bb295ef6a Merge pull request #10811 from thinkyhead/bf1_endstop_noise_filter
[1.1.x] Add endstop noise filter
2018-05-21 15:51:19 -05:00
Scott Lahteine
a971cacb06 Add Endstop Noise Filter
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-21 15:32:26 -05:00
Scott Lahteine
e63113e6ad Add ENDSTOP_NOISE_FILTER to example configs
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-21 15:29:14 -05:00
Scott Lahteine
e0ae9b8548 Stepper::set_position needed for some applications 2018-05-21 15:23:00 -05:00
Scott Lahteine
f5a4cd76fb Merge pull request #10797 from thinkyhead/bf1_planner_overhaul_ejtagle
[1.1.x] Refactor Stepper / Planner
2018-05-21 13:08:21 -05:00
Scott Lahteine
3a4a229721 Fix interrupt-based endstop detection 2018-05-20 21:24:57 -05:00
Scott Lahteine
d2f8971045 Fix planner block optimization 2018-05-20 21:24:57 -05:00
Scott Lahteine
a4f2f2fe54 Planner block HOLD flag 2018-05-20 21:24:57 -05:00
Scott Lahteine
8f26c3a6d3 Refactor and optimize Stepper/Planner 2018-05-20 21:24:57 -05:00
Scott Lahteine
38e1823375 Add HAL.h for AVR for easier 2.0.x parity 2018-05-20 21:24:57 -05:00
Scott Lahteine
ddc1a48844 Adjust formatting in stepper.cpp 2018-05-20 12:37:01 -05:00
Scott Lahteine
bf61be8ede Simplify and fix z fade height editing
Fix #10761
2018-05-20 12:32:45 -05:00
Scott Lahteine
ad49088173 Fix enter key spasm 2018-05-20 07:50:07 -05:00
Bob Kuhn
c5c5506415 autobuild update & fix platformio.ini (#10791) 2018-05-20 07:30:36 -05:00
Scott Lahteine
8fd00ff0fb Fix LIN_ADVANCE + SWITCHING_EXTRUDER
Followup to #10657
2018-05-19 20:59:02 -05:00
Scott Lahteine
17aa0a7303 Update platformio.ini for parity with AVR in 2.0.x 2018-05-19 20:59:02 -05:00
Scott Lahteine
4e3793988a Ensure pulse delay in babystepping
Proposed alternative to #10778
2018-05-19 20:59:01 -05:00
Scott Lahteine
6f10d637ad Fix some compile warnings 2018-05-19 17:09:24 -05:00
Scott Lahteine
af3a68f81f Add HAS_HOTEND_OFFSET_Z conditional 2018-05-19 17:09:24 -05:00
Scott Lahteine
a847ea625e Don't define unused move_extruder_servo
For parity with #10772
2018-05-19 17:09:24 -05:00
Giuliano
b360bb9ff9 [1.1.x] Temperature reading fix (#10775)
#10774 counterpart
2018-05-19 15:38:41 -05:00
Joshua J Young
85dfde4c09 PlatformIO build monitor_bad => monitor_speed 2018-05-18 21:28:27 -05:00
Scott Lahteine
8b35f2c846 Merge pull request #10759 from thinkyhead/bf1_fan_max_pwm
[1.1.x] Add FAN_MAX_PWM
2018-05-15 22:23:27 -05:00
Scott Lahteine
c739943786 Darwin-compatible buildroot/src scripts (#10760) 2018-05-15 22:22:44 -05:00
Scott Lahteine
9d36dfceda Add FAN_MAX_PWM to example configs 2018-05-15 21:17:34 -05:00
Scott Lahteine
151201656f Add FAN_MAX_PWM for M106-controlled fans 2018-05-15 21:17:34 -05:00
Scott Lahteine
2ce8047adb Head off potential LCD-related compile issues 2018-05-15 00:07:31 -05:00
Scott Lahteine
99f7d3853b Modify UBL mesh_is_valid and use in leveling_is_valid (#10747) 2018-05-14 22:35:45 -05:00
Scott Lahteine
29080cefd9 Consistent heating status and status reset
Fix #10699
2018-05-13 17:23:26 -05:00
Scott Lahteine
b7706ca8d0 Followup to _AXIS patch 2018-05-13 10:42:00 -05:00
Scott Lahteine
7c6dd087c9 Convert maths macros to inlines
For parity with #10728

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-13 10:36:37 -05:00
Scott Lahteine
431a81fc66 Don't go to babystep on long press unless printing
As pointed out in #10731
2018-05-13 08:14:57 -05:00
Scott Lahteine
095afadbf6 Merge pull request #10729 from thinkyhead/bf1_smarter_min_max_abs
[1.1.x] Smarter MIN, MAX, ABS macros
2018-05-13 07:19:46 -05:00
Scott Lahteine
3505d018db Smarter MIN, MAX, ABS macros
Use macros that explicitly avoid double-evaluation and can be used for any datatype, replacing `min`, `max`, `abs`, `fabs`, `labs`, and `FABS`.

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-13 04:51:33 -05:00
Scott Lahteine
03e8f6c1d9 Tweaks to heater / lcd conditions 2018-05-13 04:51:32 -05:00
Scott Lahteine
bf0fcebfe6 Apply _AXIS macro 2018-05-13 04:51:32 -05:00
Scott Lahteine
ea353c3df6 Move some Stepper methods to Planner (#10719) 2018-05-12 09:29:17 -05:00
Scott Lahteine
8c81e6341a Fix some compiler warnings 2018-05-12 07:54:14 -05:00
Scott Lahteine
039302bf4c Better handling of DELAY_NS and DELAY_US (#10717)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-12 04:22:55 -05:00
Scott Lahteine
0aa791d62b Fix Switching Extruder with Linear Advance 2018-05-12 02:27:40 -05:00
Scott Lahteine
aff683c3f5 Move lpq_len to Temperature class (#10715) 2018-05-12 02:13:54 -05:00
Giuliano
02a79cc030 [1.1.x] EEPROM code cleanup (#10711) 2018-05-11 18:06:36 -05:00
ManuelMcLure
ef9617fe44 [1.1.x] Use M_PI instead of PI (#10702) 2018-05-11 17:57:16 -05:00
Scott Lahteine
a9cef45d45 Add L6470 library to platformio.ini 2018-05-11 02:23:01 -05:00
ManuelMcLure
b7899610ac Use arc moves for G26 if enabled (#10695) 2018-05-11 01:53:15 -05:00
Scott Lahteine
e5f4f1554b [1.1.x] Enable AD595 and AD8495 in concert (#10694)
* Allow both AD595 and AD8495 in concert
* General temperature code tweaks
2018-05-11 01:02:00 -05:00
ManuelMcLure
bbd584bc14 Remove hidden dependency from plan_arc() and plan_cubic_move() (#10690) 2018-05-11 00:34:33 -05:00
Scott Lahteine
0b8af93d1e Patch up reverse_pass_kernel (and other planner code) (#10673) 2018-05-10 01:30:39 -05:00
Scott Lahteine
61ae84b53e Correction to Printrboard SDSS pin (#10676)
Co-Authored-By: Simon Swenson <simon-swenson-8351@users.noreply.github.com>
2018-05-10 01:28:44 -05:00
Kyle Spier-Swenson
a04fc8c318 [1.1.x] Blink the value on non-homed axes (#10523) 2018-05-10 01:19:11 -05:00
Scott Lahteine
c3a891f790 Trailing whitespace cleanup 2018-05-10 00:15:32 -05:00
Scott Lahteine
42de5b0310 More Trinamic cleanup 2018-05-10 00:10:08 -05:00
Scott Lahteine
8e818ade5e Drop extra RIGIDBOT_PANEL from D6 config 2018-05-09 18:03:31 -05:00
Scott Lahteine
2c01e9c6a7 Support all axes in M911 and M912 (#10669)
Co-Authored-By: Giuliano <gmagician@users.noreply.github.com>
2018-05-09 17:58:25 -05:00
Scott Lahteine
98bb97b515 Fix LIN_ADVANCE + SWITCHING_EXTRUDER stepper directions (#10657) 2018-05-09 14:36:27 -05:00
Scott Lahteine
b9e4ce3715 Fix compilation with UBL and Arc/Bézier
Fix #10660
2018-05-09 00:41:51 -05:00
Scott Lahteine
78410b210b Add UBL support for G2/G3 and G5 (#10649) 2018-05-08 11:10:33 -05:00
Scott Lahteine
de0b872a24 Merge pull request #10652 from thinkyhead/bf1_bezier_jerk_control_avr
[1.1.x] Bézier Jerk Control
2018-05-08 11:09:19 -05:00
Scott Lahteine
ae24f4f930 Merge pull request #10650 from thinkyhead/bf1_junction_deviation
[1.1.x] Junction Deviation
2018-05-08 09:25:21 -05:00
Scott Lahteine
f093ce35a0 Add BEZIER_JERK_CONTROL to example configs 2018-05-08 09:21:54 -05:00
Scott Lahteine
7ee1ab4fd3 Add Bézier Jerk Control option 2018-05-08 09:21:54 -05:00
Scott Lahteine
bb352f9836 Add a 3-frame fan animation to bitmaps (#10653) 2018-05-08 08:18:51 -05:00
Scott Lahteine
5c120222a4 Show correct units in M503 2018-05-08 05:47:09 -05:00
Scott Lahteine
b3af5a1ac0 Add JUNCTION_DEVIATION to example configs 2018-05-08 04:43:51 -05:00
Scott Lahteine
124cff0dbe Junction deviation jerk limiting option 2018-05-08 04:43:51 -05:00
Scott Lahteine
9076a9314f Fix abort of SD printing 2018-05-07 00:18:53 -05:00
Scott Lahteine
40ce9d0299 Fix some sanity checks
Co-Authored-By: Giuliano <gmagician@users.noreply.github.com>
2018-05-06 23:22:28 -05:00
Scott Lahteine
20f1688376 Try whole word over abbrev. for error 2018-05-06 20:50:12 -05:00
Scott Lahteine
59e8707a4f Remove some unused vars 2018-05-06 20:49:08 -05:00
Scott Lahteine
5735c8af5b [1.1.x] Arrange LCD options by type (#10631)
* Bump configuration versions to 010109
* Arrange LCD options by type
2018-05-06 19:17:29 -05:00
Scott Lahteine
c97bf04166 Geeetech follow-up 2018-05-06 08:14:00 -05:00
Scott Lahteine
156bd28160 Fully init planner sync_block 2018-05-06 08:14:00 -05:00
Scott Lahteine
1f991f07be Merge pull request #10615 from thinkyhead/bf1_synced_planner_set_position
[1.1.x] Improve sync of planner / stepper position, asynchronous G92
2018-05-06 03:10:28 -05:00
Scott Lahteine
675be8db7c Bring some example configs up to date 2018-05-06 03:06:13 -05:00
Scott Lahteine
fcb19823db Add Geeetech i3 Pro C / W examples
Added base example configs for Geeetech's Pro C and Pro W machines.

Co-Authored-By: Phr3d13 <phr3d13@gmail.com>
2018-05-06 01:37:41 -05:00
Scott Lahteine
e8779e7fe2 Fix up fwretract handling 2018-05-06 01:22:30 -05:00
Scott Lahteine
ac5ff1d802 Adjust usage of stepper.synchronize 2018-05-06 01:22:30 -05:00
Scott Lahteine
08e20dbbc6 Improve sync of stepper positions 2018-05-06 01:22:30 -05:00
Scott Lahteine
1682036533 Apply int32_t to stepper 2018-05-05 18:22:46 -05:00
Roxy-3D
42180e25a3 change Max7219 coordinates are in traditional (X,Y) format 2018-05-05 16:07:20 -05:00
Scott Lahteine
c6e4fbe162 Additional patch for no heated bed 2018-05-04 00:11:19 -05:00
Bob-the-Kuhn
65adea6240 remove TMC version checks, move comment 2018-05-03 15:47:35 -05:00
Scott Lahteine
888da29b61 Enforce minimum TMC2130 / TMC2208 libs 2018-05-03 15:47:35 -05:00
TheMasterFX
50ff4cf157 Fix bed size and max z pos for Ender-2 (#10603) 2018-05-02 19:02:15 -05:00
Scott Lahteine
12b9bbaa50 Merge pull request #10602 from thinkyhead/bf1_AD8495_thermocouple
[1.1.x] Add thermocouple with AD8495 support
2018-05-02 09:05:11 -05:00
Scott Lahteine
b50afa9897 Add thermocouple with AD8495 support
Co-Authored-By: Dmitriy <demonx@demonx.ru>
2018-05-02 08:41:31 -05:00
Scott Lahteine
a556a8c506 Temp-related and conditional improvements 2018-05-02 08:41:30 -05:00
TerraBAS
ee7b6a5e68 [1.1.x] Add Velleman RGB-LED Add-on support to K8400 configs (#10594) 2018-05-02 08:00:01 -05:00
Scott Lahteine
da9f3868d5 Merge pull request #10587 from thinkyhead/bf1_lcd_bed_leveling_abl
[1.1.x] Sub-menu for ABL with LCD_BED_LEVELING
2018-05-01 06:49:32 -05:00
Scott Lahteine
04183da302 Add Ender-3 configs (#10588)
Co-Authored-By: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
2018-05-01 06:20:35 -05:00
Scott Lahteine
0b9f99f940 LCD_BED_LEVELING enables a sub-menu for ABL 2018-05-01 04:41:56 -05:00
Scott Lahteine
5aff43e65e Rename float32 => float52, etc. 2018-05-01 04:41:56 -05:00
Scott Lahteine
32b6a3ad12 Fewer includes of vector_3.h 2018-05-01 04:41:56 -05:00
Scott Lahteine
94857b59c9 General lcd code cleanup 2018-05-01 01:22:25 -05:00
Scott Lahteine
3c5f0ce858 Clean up autostart handling 2018-05-01 01:22:25 -05:00
Scott Lahteine
0d7c559139 Improve debug of homing move feedrate 2018-04-30 23:45:35 -05:00
Scott Lahteine
542baea2e1 Add units to probe speed comments 2018-04-30 23:45:34 -05:00
Scott Lahteine
33ddd4e929 Fix XY homing move away rate 2018-04-30 23:45:34 -05:00
Scott Lahteine
96c1721eeb Fix sd_status comparison
Co-Authored-By: perkmeister <perkmeister@users.noreply.github.com>
2018-04-30 21:10:25 -05:00
Scott Lahteine
80c51ea572 Merge pull request #10581 from thinkyhead/bf1_no_menus 2018-04-30 20:22:02 -05:00
Scott Lahteine
f71e65aa9c Add NO_LCD_MENUS to custom configs 2018-04-30 18:39:32 -05:00
Scott Lahteine
1025066ab1 Add NO_LCD_MENUS to display only the Status Screen 2018-04-30 18:39:32 -05:00
Scott Lahteine
f4a7531ccb Fix homing with probe feedrates 2018-04-30 16:36:06 -05:00
Scott Lahteine
3e53754ccf Allow Z_AFTER_PROBING to be 0 2018-04-30 03:08:49 -05:00
Scott Lahteine
99cbeb3806 Do rounding in integer (instead of FIXFLOAT)
Co-Authored-By: Bob-the-Kuhn <bob-the-kuhn@users.noreply.github.com>
2018-04-29 19:34:16 -05:00
Scott Lahteine
751de314a4 Add sanity check for LED_CONTROL_MENU
Addressing #10569
2018-04-29 18:37:00 -05:00
Scott Lahteine
689ae467f2 Round all floats in string conversion functions (#10565) 2018-04-28 21:51:27 -05:00
Scott Lahteine
b06fc3b539 Modify FastIO error message 2018-04-28 20:28:40 -05:00
Scott Lahteine
3ca3268241 Fix the TMC26X initializer CS pin argument
From #10531

Co-Authored-By: chriscg9 <chriscg9@users.noreply.github.com>
2018-04-28 12:00:23 -05:00
Bob-the-Kuhn
382aa96870 1.1.x version of Auto-build PR 10503 (#10561) 2018-04-28 11:30:40 -05:00
Scott Lahteine
522ea178a4 Clear up trailing whitespace 2018-04-28 11:25:19 -05:00
Scott Lahteine
2756a1d411 Fix M421 comment in Marlin_main.cpp 2018-04-28 11:15:48 -05:00
Scott Lahteine
94b8eac6d0 Allow a home bump of 0 when homing Z with probe 2018-04-28 10:25:50 -05:00
Scott Lahteine
b4ddee8beb When homing with Z probe bump at Z_PROBE_SPEED_SLOW 2018-04-28 08:48:49 -05:00
Scott Lahteine
f0494b4021 Fix M420 C for UBL 2018-04-28 08:17:55 -05:00
Scott Lahteine
ba8d03d241 Clean up some endstop inverting examples 2018-04-28 08:00:44 -05:00
Scott Lahteine
37927f9274 Fix some endstop inverting settings 2018-04-28 08:00:15 -05:00
Scott Lahteine
81b9914704 Further cleanup of inline delays 2018-04-27 19:25:14 -05:00
Giuliano
d86efae37c [1.1.x] report error on unsupported commands (#10554)
Raise an error when an unknown/unsupported G/M command is requires.
2018-04-27 17:40:32 -05:00
per1234
3550494db1 Correct AVR_ATmega328_FAMILY macro (#10540) 2018-04-27 03:11:56 -05:00
Scott Lahteine
95d19cfcbf Fix disable of Z_SENSORLESS for HOMING_Z_WITH_PROBE
As pointed out in #10532
2018-04-27 01:40:25 -05:00
Scott Lahteine
e5e5c1513d Fix ABL grid bounds test for Delta/SCARA 2018-04-27 00:55:29 -05:00
Scott Lahteine
083bfa3fe9 Remove refs to non-existent CPU_32_BIT 2018-04-27 00:55:29 -05:00
Scott Lahteine
8f5d99a2ab Wrap delay macros in do{}while(0) 2018-04-27 00:34:40 -05:00
Scott Lahteine
f748b1a1ce Apply const in a few spots 2018-04-26 17:56:23 -05:00
Scott Lahteine
e931bc7e72 Reorder some conditionals 2018-04-26 17:55:36 -05:00
Roxy-3D
b95a1b94cb make Max7219 usable at ISR time 2018-04-26 14:32:24 -05:00
Scott Lahteine
cb02b6ec60 Disable PIDTEMPBED with no bed…
…and move FILAMENT_CHANGE_SLOW_LOAD_LENGTH default to post-conditionals.
2018-04-26 01:34:06 -05:00
Scott Lahteine
d70a4646f4 MKS OLED support for RUMBA
Based on #10519

Co-Authored-By: Alex <alex18881@users.noreply.github.com>
2018-04-25 22:57:34 -05:00
Scott Lahteine
11bbcfd69e Update emergency_parser for 2.0.x parity (#10530) 2018-04-25 22:42:43 -05:00
Scott Lahteine
d429d5a4ae Add M420 C to center the mesh on a value (#10521) 2018-04-25 06:43:59 -05:00
Scott Lahteine
21f5ca6ad4 Revert potentially-not-redundant UBL test
Response to #10435
2018-04-24 08:05:23 -05:00
Scott Lahteine
ad3b95c8ea Fix current_temperature_chamber compile error
Fix #10505
2018-04-24 07:53:45 -05:00
Scott Lahteine
50cc55d172 FastIO faster atomic bit write, fix TOGGLE
Based on #10502

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-04-24 04:13:50 -05:00
Scott Lahteine
3eb55016e4 Finish AVR preemptive interrupt
Followup to #10501
2018-04-23 22:20:00 -05:00
Scott Lahteine
51004e003d Proper AVR preemptive interrupt handling (#10501)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-04-23 20:47:31 -05:00
Scott Lahteine
0764981aa1 Fix compile for Malyan LCD
Based on #10498

Co-Authored-By: xC0000005 <xc0000005@users.noreply.github.com>
2018-04-23 16:51:29 -05:00
Scott Lahteine
b19d8182c1 Add HAS_HEATED_BED conditional (#10494) 2018-04-22 23:40:49 -05:00
Scott Lahteine
6b50a50676 Extra options for LEVEL_BED_CORNERS (#10484) 2018-04-22 02:30:20 -05:00
Scott Lahteine
29c9c723f8 Use 0 as the bed height for manual probing 2018-04-22 02:12:48 -05:00
Anton Piliugin
b49da0c4ba Update language_ru.h (#10482) 2018-04-22 00:24:14 -05:00
Scott Lahteine
58bd2a5e81 Merge pull request #10437 from thinkyhead/bf1_creality_power_loss_resume
[1.1.x] Creality3D Power-Loss Recovery
2018-04-22 00:17:27 -05:00
Scott Lahteine
6f176d1d64 [1.1.x] Reset LCD status to fallbacks (#10467)
* Remove obsolete strings
* Tweak some static consts
* Reset LCD status to fallbacks

When paused, "Print paused..."
When SD printing, the filename
When host printing, "Printing..."
When idle, "MyPrinter ready."
2018-04-22 00:15:57 -05:00
Anton Piliugin
38c97dc975 Update language_ru.h (#10481) 2018-04-22 00:12:21 -05:00
Scott Lahteine
d7ec13ce69 Creality3D Power-Loss Recovery 2018-04-21 21:30:25 -05:00
Scott Lahteine
7e585cab83 Add POWER_LOSS_RECOVERY to example configs 2018-04-21 19:13:30 -05:00
Scott Lahteine
e76545c450 Add Stopwatch::resume method 2018-04-21 19:09:31 -05:00
Scott Lahteine
1894b981af Add R parameter to G28 to specify pre-raise 2018-04-21 19:09:31 -05:00
Festivejelly
61f9e28c23 [1.1.x] Wait for bed heaters between probing (#9890) 2018-04-21 15:44:07 -05:00
Scott Lahteine
c6ecfc1429 [1.1.x] Split TRIGORILLA into 1.3 and 1.4 (#10468) 2018-04-20 19:27:11 -05:00
Sebastien Andrivet
4cc2bc1343 [1.1.x] Add new capability to report if Thermal Protection is enabled (#10465) 2018-04-20 16:42:56 -05:00
Scott Lahteine
dcb8af0518 Match Makefile order to boards.h 2018-04-20 16:19:31 -05:00
Scott Lahteine
4108382c2c Complete CREALITY_ENDER revert
Followup to #9694
2018-04-20 16:19:31 -05:00
Scott Lahteine
0c1be965b6 Don't report point 0 in MBL G29 2018-04-20 13:18:42 -05:00
Scott Lahteine
6f87e4b4dc Fix up enqueue now functions
…and apply to MALYAN_LCD.
2018-04-19 19:33:16 -05:00
Roxy-3D
c91b3142aa Update ubl_motion.cpp
Restore necessary and needed loop termination logic.
2018-04-19 12:03:18 -05:00
Scott Lahteine
df6becfb07 Merge pull request #10452 from thinkyhead/bf1_mks_base_15
[1.1.x] Add BOARD_MKS_BASE_15 with digital micro-stepping
2018-04-18 22:32:11 -05:00
Scott Lahteine
51aa9743a6 Rename MKS_13 to MKS_GEN_13 2018-04-18 22:16:16 -05:00
Scott Lahteine
e561ecb5a7 Add BOARD_MKS_BASE_15 with digital micro-stepping 2018-04-18 22:06:25 -05:00
Scott Lahteine
38ed5f5ee9 Fix calls to ubl.get_z_correction 2018-04-18 21:43:44 -05:00
Scott Lahteine
23618d9cd0 Use 0 as the bed position (not Z_MIN_POS) 2018-04-17 20:30:17 -05:00
Scott Lahteine
8cf6ef8411 Merge pull request #10431 from thinkyhead/bf1_fix_and_improve
[1.1.x] Improve UBL mesh report, M420 V T, M421 N, and…
2018-04-17 16:59:14 -05:00
Scott Lahteine
fa3c14fccf Fix compile warnings in fastio.h
Based on #10440 by @GMagician
2018-04-17 16:36:19 -05:00
Scott Lahteine
773d773baa Fix compile error in tmc_status 2018-04-17 16:15:53 -05:00
Scott Lahteine
5c186f7dd3 Try FIXFLOAT rounding based on sign 2018-04-17 15:59:49 -05:00
Scott Lahteine
77b75ce86c One fewer compare in _lcd_move_xyz 2018-04-17 15:55:43 -05:00
Scott Lahteine
6f156d01d9 Update position for UBL non-segmented activate/deactivate 2018-04-17 15:55:43 -05:00
Scott Lahteine
c0f6eebded Improve UBL mesh report. Add M420 T, M421 N 2018-04-17 15:55:38 -05:00
Scott Lahteine
6786101c64 Ignore LCD_BED_LEVELING with UBL 2018-04-17 15:54:25 -05:00
Scott Lahteine
ee21f44969 Tweak fwretract.retract debug, comments 2018-04-17 15:54:25 -05:00
Scott Lahteine
090e08ef3d M221 with no parameters report flow 2018-04-17 15:54:25 -05:00
Scott Lahteine
444b6d6d83 Prevent delay when power is already on
Fix #10410
2018-04-17 04:36:14 -05:00
Scott Lahteine
f1dfc80332 Improved SENSORLESS_HOMING sanity check 2018-04-17 04:10:57 -05:00
Scott Lahteine
31261d0c17 Fix bug in Planner::set_position_mm 2018-04-16 02:05:48 -05:00
Thomas Moore
85d57f7a9e [1.1.x] Change UBL default G29 P4 height to 0 (#9510) 2018-04-15 20:49:03 -05:00
Scott Lahteine
8a159dfec2 Remove Brazilian Portuguese duplicates
Followup to #10368
2018-04-15 19:16:01 -05:00
Scott Lahteine
d59ed4dce0 Abort SD printing more safely (#10405)
Allow the current command to complete when aborting an SD print, otherwise some commands (G28, G29, etc.) will cause trouble.
2018-04-15 18:26:25 -05:00
Vitorio Miguel Prieto Cilia
110e631656 Update pt-br translation (#10368) 2018-04-15 00:07:13 -05:00
Scott Lahteine
9769d799df clear_block_buffer, kill_current_block in quick_stop 2018-04-13 22:05:58 -05:00
Scott Lahteine
a783caabac Make sure ABL (manual) starts close to the bed 2018-04-13 20:19:49 -05:00
Roxy-3D
b978153ca4 Stow Probe at end of G29 J3 2018-04-13 14:46:40 -05:00
Scott Lahteine
090d72f591 [1.1.x] Add optional menu item to toggle software endstops (#10392) 2018-04-13 00:24:20 -05:00
Scott Lahteine
e3c2d43b2b Tweak MBL move close to bed 2018-04-12 22:41:26 -05:00
Scott Lahteine
5274ab0ad5 MESH_BED_LEVELING before PROBE_MANUALLY 2018-04-12 22:26:56 -05:00
Scott Lahteine
59d9886473 Tweak MIN_STEPS_PER_SEGMENT sanity-check 2018-04-12 20:23:43 -05:00
Luc Van Daele
6e30d1bef1 [1.1.x] G33 MIN_STEPS_PER_SEGMENT (#10385) 2018-04-12 20:19:42 -05:00
Scott Lahteine
db81a1d4a2 Make sure MBL starts close to the bed
Fix #10390
2018-04-12 19:37:50 -05:00
Scott Lahteine
2edc13a0e2 Fix M118 parameter handling
Fix #10388
2018-04-12 19:06:41 -05:00
Scott Lahteine
8db9b800e7 Compress/update comments ubl_motion
…to fit more code on the screen and correct outdated commentary contrasting ABL.
2018-04-12 18:08:33 -05:00
Luc Van Daele
21971f2f7a Overhaul of G33 Delta Calibration (#8821) 2018-04-11 19:12:56 -05:00
Luc Van Daele
b2265869b2 Low Point for delta calibration (#10362) 2018-04-11 18:03:34 -05:00
Scott Lahteine
f408863043 Fix Spanish MSG_[ABC] items 2018-04-11 15:21:08 -05:00
Scott Lahteine
336131fb37 Trailing whitespace 2018-04-11 00:27:43 -05:00
Scott Lahteine
808d6f367b Tweak RAMPS SDSS pins 2018-04-10 16:46:17 -05:00
Scott Lahteine
00d03c6dc5 Merge pull request #10350 from thinkyhead/bf1_z_probe_low_point
[1.1.x] Z_PROBE_LOW_POINT to prevent probe/bed damage
2018-04-09 18:24:38 -05:00
Scott Lahteine
4f660a18bc Add Z_PROBE_LOW_POINT to prevent damage 2018-04-09 17:22:28 -05:00
Scott Lahteine
e87ae5b643 Add Z_PROBE_LOW_POINT to example configs 2018-04-09 01:56:57 -05:00
Scott Lahteine
73fe8ef4df Followup to #10177 2018-04-09 01:16:51 -05:00
Scott Lahteine
157d28c418 Rename, arrange advanced pause purge options 2018-04-09 01:14:07 -05:00
Scott Lahteine
e143b1252f Appy const to manage_inactivity 2018-04-08 23:53:55 -05:00
Roxy-3D
816fa9e2b4 More accurate number for Z_PROBE_OFFSET_FROM_EXTRUDER 2018-04-08 22:25:11 -05:00
Roxy-3D
661a38586b Resolve corruption of Max7219 Debug LED Matrix 2018-04-08 22:25:11 -05:00
Scott Lahteine
4d297dd562 Add --no-track in mfnew git script 2018-04-08 06:51:30 -05:00
Scott Lahteine
56b5fb5e15 Update Bed PID config comments 2018-04-08 06:46:05 -05:00
Scott Lahteine
2205c7775b FILAMENT_CHANGE_LOAD_LENGTH sanity-check
Followup to #10177
2018-04-08 03:31:15 -05:00
Scott Lahteine
b637b80a9a Merge pull request #10177 from thinkyhead/bf1_filament_load_accel
[1.1.x] Filament load/unload add acceleration for Bowden
2018-04-08 03:28:45 -05:00
Scott Lahteine
19440df4d0 Better RESTORE_LEVELING_AFTER_G28 sanity-check
As suggested by @GMagician
2018-04-08 03:13:35 -05:00
Scott Lahteine
6f8717ce12 Fix LIGHTWEIGHT_UI with UBL
As mentioned in https://github.com/MarlinFirmware/Marlin/issues/10317#issuecomment-379100702
2018-04-08 03:11:53 -05:00
Scott Lahteine
6ec2cbce18 Bring RepRapPro Huxley config up to date
Followup to #10343
2018-04-08 00:31:18 -05:00
indazoo
f6bf247302 Add RepRapPro Huxley configuration (#10343) 2018-04-08 00:19:40 -05:00
Sean
4b36a0a3dc Add acceleration for filament change, load, unload.
This is useful to achieve a higher movement speed on Bowden extruders.
Also add a slow mode before ramping up to the high speed to make loading easier.
2018-04-07 23:14:40 -05:00
Scott Lahteine
be0afd71df Add ADVANCED_PAUSE_FEATURE ACCEL options to example configs 2018-04-07 23:14:40 -05:00
Scott Lahteine
8e35029f10 Merge pull request #9789 from Lenbok/monitor_chamber_temperature_and_auto_fan
[1.1.x] Monitor chamber temperature, with auto chamber fan control.
2018-04-06 23:52:06 -05:00
Lenbok
0aa833fe6c Chamber temperature monitoring and auto fan control.
This is an initial cut for feedback.

Chamber temperature is currently reported along with hot end and bed
temperatures to serial. The format is just like that used for hot end
and bed temperatures, but using 'C' prefix. As there is no heater,
target is always 0. Is this appropriate, is there a better way to report
chamber temperatures?

Chamber temperatures are not reported on the LCD in any way.

When auto chamber fan is enabled, it currently just uses the same
temperature threshold as the other auto controlled fans.

As the chamber temperature is not connected to any heater, it doesn't
undergo mintemp/maxtemp monitoring. This would need to change in the
future if chamber heating became a feature.
2018-04-06 23:09:44 -05:00
Scott Lahteine
08b09f7a4c Add Chamber Temp options to example configs 2018-04-06 23:09:43 -05:00
Roman Moravčík
151962baf2 Update Slovak language (#10313) 2018-04-06 20:20:40 -05:00
Bob-the-Kuhn
aca2bbbc50 Add TMC software SPI pins to pinsDebug_list.h (#10325) 2018-04-06 20:16:05 -05:00
Scott Lahteine
211544b543 Reset progress bar when print ends
Fix #10330
Based on #10333 by @marcio-ao
2018-04-06 20:12:40 -05:00
GMagician
8e36d00ad0 [1.1.x] Update language_it.h (#10323)
Updated to #10296
2018-04-06 20:07:08 -05:00
Scott Lahteine
e596931aac Merge pull request #10321 from thinkyhead/bf1_einsy_retro_etc
[1.1.x] Fix TMC2130 DIAG1 active high, Einsy Retro
2018-04-06 00:30:50 -05:00
Scott Lahteine
ed949cc5c1 Added support for Einsy Retro
http://reprap.org/wiki/EinsyRetro
2018-04-05 18:15:58 -05:00
Scott Lahteine
53757444c5 Default active low for TMC2130 DIAG1 (#10294)
- Added sanity check to require endstop inverting with SENSORLESS_HOMING
2018-04-05 18:15:58 -05:00
Scott Lahteine
c46d47f45f Scale feedrate (mm/s to deg/s) for SCARA 2018-04-05 16:17:23 -05:00
Anton Piliugin
bc2fc86993 Update language_ru.h (#10311) 2018-04-05 00:47:02 -05:00
Scott Lahteine
01e100360f Merge pull request #10176 from noingwhat/1.1.x-Continuous-Purge
[1.1.x] Continuous Purge
2018-04-04 22:50:37 -05:00
Scott Lahteine
dba26a6d1f Add Continuous Purge feature to Advanced Pause 2018-04-04 20:59:50 -05:00
Scott Lahteine
05fc3d7891 Add ADVANCED_PAUSE_CONTINUOUS_PURGE to example configs 2018-04-04 20:53:00 -05:00
Scott Lahteine
7ff70d7adb Improve heating/cooling LCD messages (#10296) 2018-04-04 19:13:48 -05:00
Scott Lahteine
a7e142460c MBL should add z_offset regardless of fade (#10307) 2018-04-04 18:27:09 -05:00
GMagician
9d2ef95f1d Additional tool-change fix (#10305)
Followup to #10243
2018-04-04 17:06:25 -05:00
Pavel Peganov
de5f69b285 Add Creality CR-8 configuration (#10285) 2018-04-02 19:58:02 -05:00
Scott Lahteine
829281d016 Merge pull request #10243 from thinkyhead/bf1_tool_change_debug 2018-04-02 19:33:27 -05:00
Scott Lahteine
be098cd42f Z Endstop Servo => Z Probe Servo 2018-04-01 23:54:47 -05:00
Scott Lahteine
2dafc10da3 Merge pull request #10271 from D-side/ender-4-board-id
[1.1.x] Fix Ender 4 compilation, add more AVRs to Makefile
2018-04-01 18:25:35 -05:00
Scott Lahteine
6444ef02e4 Add remaining boards to Makefile 2018-04-01 18:15:52 -05:00
D-side
ab5232c37b Fix Ender 4 / CR-8 compilation
- Assign 243 (like EFB) as Ender-4/CR-8 board ID
- Add to `Makefile`
- Add to `pins.h`
2018-04-01 18:15:52 -05:00
MoellerDi
6b150bfc40 Handle disabled HYBRID_THRESHOLD in EEPROM (#10274) 2018-04-01 16:58:30 -05:00
Scott Lahteine
885ad70c8b Fix likely issue with retract/recover
Addressing #10200
2018-03-31 22:59:48 -05:00
Scott Lahteine
d37cfa327e Note about MKS_MINI_12864 in sanitycheck 2018-03-31 22:51:43 -05:00
Scott Lahteine
040ebd1675 Use lcd_printPGM_utf in more places
Fix #10256
2018-03-31 20:47:20 -05:00
Scott Lahteine
48fa0e6de0 Output ABC for delta stepper counts 2018-03-31 20:12:53 -05:00
Scott Lahteine
c9aa7486ce Use float62 for LCD edit of Z Fade 2018-03-31 20:02:28 -05:00
Scott Lahteine
80b3f8c395 Allow Z_SAFE_HOMING sanity checks to handle floats 2018-03-31 19:00:14 -05:00
Scott Lahteine
712b213b40 Split up tool_change, raise for non-delta too 2018-03-30 16:06:52 -05:00
Scott Lahteine
52750bf362 Simplified leveling-based tool change 2018-03-30 16:06:47 -05:00
Scott Lahteine
0afdec882c For set_z_fade_height use set_bed_leveling_enabled 2018-03-30 16:06:42 -05:00
Scott Lahteine
29b048810c Symmetrical FWRETRACT Z Hop
Do the Z lift normally before setting Z back to its prior value. But do the Z lower using spoofing. This should produce proper symmetrical movement.
2018-03-30 15:47:06 -05:00
Scott Lahteine
0eb1830d85 Change order of inactive stepper disable/enable
This ensures that steppers that share an enable pin will only be disabled for a miniscule time.
2018-03-30 15:10:03 -05:00
Scott Lahteine
f5c980f9cf Clear the "Wait for user" message set by M0/M1
See https://github.com/MarlinFirmware/Marlin/issues/10246#issuecomment-377146936
2018-03-29 17:57:50 -05:00
Scott Lahteine
d36e950547 Temporary workaround for tool-change compile error
Pending a more complete solution to tool-change Z deviation.
2018-03-29 17:57:50 -05:00
Scott Lahteine
df75e9d692 Fix BLTOUCH compile error
Followup to #10249
2018-03-29 17:57:49 -05:00
AnHardt
86c3be7089 No delay in sensorless quick homing (#10253) 2018-03-29 16:09:19 -05:00
Scott Lahteine
575b099e40 Alert users about low Z jerk values 2018-03-28 22:58:41 -05:00
Scott Lahteine
360166f626 Merge pull request #10249 from thinkyhead/bf1_homing_move_adjustments
[1.1.x] Improvements to general and delta homing
2018-03-28 22:05:40 -05:00
Scott Lahteine
b5f1a4141c "G28 Z forbidden" => "Home XY first" 2018-03-28 21:54:20 -05:00
Scott Lahteine
0401f4ce14 Clear sensorless homing in home_delta after first move-to-top 2018-03-28 21:19:14 -05:00
Scott Lahteine
9f3b4d537d Do moves towards endstops differently in do_homing_move 2018-03-28 21:19:14 -05:00
Scott Lahteine
deefd2defa Wait before turning off PRINTER_EVENT_LEDS at print end (#10247) 2018-03-28 20:32:32 -05:00
Scott Lahteine
1e31b56b0f Fix checksum + card.saving
Followup to #10204
2018-03-28 18:40:36 -05:00
Scott Lahteine
86e58df324 Fix G10/G11 debug logging 2018-03-28 18:40:36 -05:00
Scott Lahteine
3edf9904f4 Fix linear/3-point manual leveling buffer overrun
Fixes #10137
2018-03-28 18:40:36 -05:00
Scott Lahteine
8f461568e0 Undo German changes
See 941e9bd329 (commitcomment-28262166)
2018-03-28 14:46:42 -05:00
Scott Lahteine
e848bebb10 Fix missing comma in tmc_sgt
Fixes #10209
2018-03-28 14:44:30 -05:00
Adrian Cuzman
f84f7e5a38 Require a checksum when writing to SD (#10204)
When streaming commands to SD with XON/XOFF, errors can occur and cause incomplete commands to be written to the file. This change ensures that only commands with line numbers and checksum will be saved to SD.
2018-03-28 14:43:41 -04:00
Rob Power
677bd19dbf [1.1.x] NANODLP_Z_SYNC requires linear axes (#10239) 2018-03-28 14:02:58 -04:00
Scott Lahteine
dc05d7fc2b Apply three spaces after pin defines 2018-03-28 12:26:44 -05:00
Scott Lahteine
2894d8b18e Update some Travis test items
Based on #10227 by @Bob-the-Kuhn
2018-03-27 21:26:48 -05:00
Thomas Karl Pietrowski
bfdd14be4f bq Hephestos2: Allow bed leveling (#10234)
* Increases the offset, needed to allow the nozzle to touch the bed
* By default uses an offset of -4. This one is minimally far way from the buildplate and therefore only fine-tuning is needed to set the correct distance.
2018-03-27 22:06:14 -04:00
Kai
941e9bd329 Update language_de.h (#10216)
Wrong meaning
2018-03-25 15:21:26 -04:00
Scott Lahteine
e1f8c97b21 Chinese updates (#10215)
From #10211 by @yhfudev
2018-03-25 12:38:08 -04:00
Scott Lahteine
71c05f1b57 Enforce minimum TMC2130 / TMC2208 libs 2018-03-24 15:56:09 -04:00
Scott Lahteine
2c79faede9 Z correction on tool-change for all HAS_MESH (#10198) 2018-03-23 13:11:51 -05:00
Scott Lahteine
94badcbace Use pgm_read_ptr for tables of pointers 2018-03-23 02:17:51 -04:00
Scott Lahteine
2746eb589e Fix size of EEPROM tmc_hybrid_threshold
Followup to #10101
2018-03-23 02:04:45 -04:00
teemuatlut
f264228074 [1.1.x] TMC: Match axis label order (#10189) 2018-03-23 01:02:42 -05:00
Roxy-3D
994fdb5179 Get data declarations consistent... 2018-03-22 19:22:49 -05:00
Scott Lahteine
1e41d157a3 Merge pull request #10178 from thinkyhead/bf1_auto_reset_stepper_timeout
[1.1.x] Automatically reset stepper timeout
2018-03-21 19:25:15 -05:00
Scott Lahteine
c57545ee08 blocks_queued => has_blocks_queued 2018-03-21 19:08:02 -05:00
Scott Lahteine
647c04def8 Automatically reset stepper timeout in manage_inactivity
Any code that adds moves to the planner can skip resetting the stepper timeout. We can let `idle` / `manage_inactivity` reset the timer whenever it detects any moves in the planner.
2018-03-21 19:08:02 -05:00
Roxy-3D
9e987e4971 Correct truncated comment 2018-03-21 16:53:40 -05:00
Scott Lahteine
ba55602462 Tweaks to M915 2018-03-21 05:41:00 -05:00
Scott Lahteine
ec46336df7 For MK2_MULTIPLEXER undef DISABLE_INACTIVE_EXTRUDER
Fix #10098
2018-03-21 05:41:00 -05:00
Scott Lahteine
d57adbb88b Trust the bootloader to clear globals 2018-03-21 05:41:00 -05:00
Scott Lahteine
b24099c9d0 Allow G53 to go back to native space 2018-03-21 01:38:41 -05:00
Scott Lahteine
203d3f8f56 UBL G29 parity with 2.0.x 2018-03-21 01:36:16 -05:00
Scott Lahteine
d9e1cbebea Tweak use of move_z_after_probing 2018-03-21 01:36:16 -05:00
Scott Lahteine
e5fbbbc068 Allow no raise after run_z_probe in probe_pt 2018-03-21 01:36:16 -05:00
Scott Lahteine
4eddcf9142 Also suspend keepalive messages with suspend_auto_report 2018-03-21 00:26:00 -05:00
Scott Lahteine
bc01200495 Merge pull request #10101 from thinkyhead/bf1_eeprom_M913
[1.1.x] More complete Trinamic driver options
2018-03-20 23:14:10 -05:00
Scott Lahteine
c95e3e3bcb Merge pull request #10165 from AnHardt/bf1_fix_Autotune_THERMAL_PROTECTION_BED_off
[1.1.x] Fix_Autotune_THERMAL_PROTECTION_BED_off
2018-03-20 16:41:22 -05:00
AnHardt
105c81217c Make 2 constants in autotune configurable
But hidden, since changes are rarely needed.
2018-03-20 16:39:27 -05:00
AnHardt
3911c38d5e Fix autotune Thermal Protection
When `THERMAL_PROTECTION_BED` is off but `THERMAL_PROTECTION_HOTENDS` is on, `watch_temp_period` and `watch_temp_increase` are initialized with the values for `THERMAL_PROTECTION_HOTENDS`. Later it is not tested if these values are for the bed or the nozzles.

- Add test.
- Name a constant.

Fix for #10150
2018-03-20 16:38:38 -05:00
Bob-the-Kuhn
80adb124f7 remove MARLIN line , change to logical pin (#10163)
delete physical pins from AT90USB
2018-03-20 16:24:17 -05:00
teemuatlut
8e783e24e8 [1.1.x] TMC: Fix CURRENT_STEP_DOWN (#10169) 2018-03-20 15:15:15 -05:00
Scott Lahteine
8a19bc0c0e Prevent null pointer crash in Endstops::update
Thanks to Evgeny Kotsuba!
2018-03-20 04:23:38 -05:00
Scott Lahteine
312bebff9a Add 'I' parameter to M906/M913/M914; 'T' to M906/M913 2018-03-19 22:06:04 -05:00
Scott Lahteine
4995e0ebfa Quiet M906/M913/M914 with axes. Patch for DISTINCT_E_FACTORS. 2018-03-19 22:06:04 -05:00
Scott Lahteine
84bbd018ab Improve Trinamic support in the EEPROM 2018-03-19 22:06:04 -05:00
Scott Lahteine
a03502080e Consolidate smart stepper driver initialization 2018-03-19 22:06:04 -05:00
Scott Lahteine
72776f647b Move _AXIS macro to macros.h 2018-03-19 17:59:59 -05:00
Scott Lahteine
4eb4476ce6 Merge pull request #10153 from thinkyhead/bf1_fewer_options
[1.1.x] Consolidate 3-point probing, auto delta probe radius
2018-03-19 04:47:13 -05:00
Scott Lahteine
a66ae52234 Add CorePQ support for BABYSTEPPING (#10074) 2018-03-19 02:51:30 -05:00
Scott Lahteine
68b9503b96 MIN_PROBE_EDGE replaces DELTA_PROBEABLE_RADIUS 2018-03-19 02:17:45 -05:00
Scott Lahteine
cf4e2e507f Consolidate 3-point leveling point options 2018-03-19 01:55:51 -05:00
Scott Lahteine
af3500044a Power off in kill instead of setting PS_ON to input 2018-03-18 20:59:02 -05:00
Scott Lahteine
5793ca42b5 Fix matrix.debug output 2018-03-18 20:03:34 -05:00
Scott Lahteine
07b1ac06a9 More concise tmc_util output, fix a ternary type 2018-03-18 19:10:16 -05:00
Scott Lahteine
bba2a3b906 Prevent lcd_update stack overflow on SD Card change 2018-03-18 18:53:34 -05:00
Scott Lahteine
80c70f33eb Squash UBL G29 postscript comment 2018-03-18 18:35:41 -05:00
Scott Lahteine
d16f443d33 Fix home_delta for SENSORLESS_HOMING (#10144) 2018-03-17 20:52:14 -05:00
Scott Lahteine
f7de05e50c General spacing cleanup 2018-03-17 16:51:34 -05:00
Scott Lahteine
c8b2fbd91e PlatformIO default baud rate for Mega2560 2018-03-17 16:49:39 -05:00
Mitchell Abbott
aef23c9637 [1.1.x] Update X/Y/Z pin assignments for Einsy Rambo (#10131) 2018-03-17 16:40:15 -05:00
Scott Lahteine
7cf2788cc3 Easier override of ST7920 LCD timing 2018-03-17 02:37:24 -05:00
Scott Lahteine
c294613b53 Fix CardReader::getStatus when not printing 2018-03-17 02:37:24 -05:00
Scott Lahteine
4dc4d348d4 Merge pull request #10120 from thinkyhead/bf1_misc_fixes_mar16
[1.1.x] Reduce size of "only one" sanity checks
2018-03-16 21:43:15 -05:00
Scott Lahteine
6146126b2a Fix SWITCHING_EXTRUDER manual movement 2018-03-16 03:21:56 -05:00
Scott Lahteine
5492f15633 Reduce size of "only one" sanity checks 2018-03-16 02:43:28 -05:00
Scott Lahteine
4d1df2e357 Fix some spelingz 2018-03-16 01:26:38 -05:00
Scott Lahteine
954f03b6a8 Merge pull request #10119 from thinkyhead/bf1_long_filename_M27
[1.1.x] Add 'M27 C' to echo filename (and long name)
2018-03-15 23:07:20 -05:00
Scott Lahteine
a560c0f7cd Add C parameter to M27 to get the current filename
In answer to #10001

Add an option to retrieve the currently open file name (long filename if possible).
2018-03-15 22:55:30 -05:00
Scott Lahteine
ec30e8c9ef Allow NULL prepend in lsDive 2018-03-15 22:41:56 -05:00
Scott Lahteine
bc0e977229 Delta support for multiple hotends with offsets (#10052) 2018-03-15 22:29:33 -05:00
Scott Lahteine
1993365967 Update Marlin for newest TMC libraries
- TMC2130Stepper v2.2.0
- TMC2208Stepper v0.0.4
2018-03-15 21:23:15 -05:00
shaktee
c2ba9a03ee BIBO2 default update and Cyclops config (#10107) 2018-03-15 00:17:04 -05:00
Scott Lahteine
7b2ea8febe Sync main adv config with recent change 2018-03-15 00:09:23 -05:00
Scott Lahteine
e38307355e Fix E direction for MK2_MULTIPLEXER and LIN_ADVANCE 2018-03-14 07:57:19 -05:00
Scott Lahteine
5c81ce2bb8 When STATUS_EXPIRE_SECONDS is 0, hide the position. (#10100)
Some users may prefer to hide the position updates on the `LIGHTWEIGHT_UI` altogether. This leads to an even less cluttered display (it also saves on SPI traffic and one byte of RAM).
2018-03-14 02:44:41 -05:00
Studiodyne
7f8984b500 [1.1] FWRetract Reset (Best way) (#10084) 2018-03-14 01:34:15 -05:00
Scott Lahteine
062b955f1d Merge pull request #10092 from thinkyhead/bf1_trinamic_config
[1.1.x] Clean up Trinamic config options, sanity check
2018-03-14 01:16:35 -05:00
Scott Lahteine
ccb2a95456 Update includes for gcode.h => parser.h 2018-03-14 01:01:45 -05:00
Scott Lahteine
00165699e9 Move gcode.* to parser.* for 2.0.x parity 2018-03-14 00:55:20 -05:00
Scott Lahteine
cc4148e246 Use lcd_goto_previous_menu_no_defer more 2018-03-14 00:49:11 -05:00
Scott Lahteine
dc98ee553f Fix compiler warning for ANALOG_SELECT 2018-03-13 22:33:56 -05:00
Scott Lahteine
738a8495ad Improve TMC config organization, naming 2018-03-13 21:43:43 -05:00
Scott Lahteine
17b4ba7c9c Add TMC2208 include in tmc_util.h 2018-03-13 21:41:12 -05:00
Shen Yiming
96c54c188a Fix MKS_12864_OLED blank issue #10071 (#10094) 2018-03-13 04:51:21 -05:00
Scott Lahteine
e63cb5fe8f [1.1.x] Make MIN_PROBE_EDGE a general option (for electronic probes) (#10068)
Some probes don't work near the edges of the bed. This change promotes MIN_PROBE_EDGE to a general setting that applies to all probing functions.
2018-03-13 01:15:29 -05:00
Scott Lahteine
4dad8628ff Move MKS_12864OLED to lcd_implementation_init 2018-03-12 08:51:48 -05:00
Scott Lahteine
009fd186f8 M218: report with no parameters 2018-03-12 08:08:52 -05:00
Scott Lahteine
8c7e98627f Patch do_blocking_move_to so 'destination' can be used 2018-03-12 08:06:48 -05:00
Scott Lahteine
656c3c3b2a Followup to auto-assign dual axis CS pins 2018-03-12 07:23:02 -05:00
Scott Lahteine
9ec8762497 Fix typo in ubl.prepare_segmented_line_to 2018-03-11 10:22:52 -05:00
Scott Lahteine
39d63b800c Merge pull request #10054 from thinkyhead/bf1_z_after_probing
[1.1.x] Add Z_AFTER_PROBING option
2018-03-11 10:22:31 -05:00
Scott Lahteine
33b18dc801 Add Z_AFTER_PROBING to example configs 2018-03-11 09:48:03 -05:00
Scott Lahteine
0aa100a31e Add Z_AFTER_PROBING option
Some fix-mounted probes need manual stowing. And after probing some may prefer to raise or lower the nozzle. This restores an old option but tailors it to allow raise or lower as preferred.
2018-03-11 09:48:02 -05:00
Scott Lahteine
879b54a8bc Auto-assign CS pins for X2, Y2, Z2 (#10056)
Fixes #9211
2018-03-11 09:25:02 -05:00
Scott Lahteine
d1256be7ec FlushSerialRequestResend => flush_and_request_resend 2018-03-11 07:34:21 -05:00
Scott Lahteine
eb6f44372e Finish scroll_screen, fixing direction/multiplier
Fixes #10041
2018-03-11 04:44:28 -05:00
Scott Lahteine
b0abce5a7e Disambiguate 'else' in stepper code 2018-03-10 21:47:08 -06:00
Scott Lahteine
72df10c669 Merge pull request #10038 from thinkyhead/bf1_dual_endstops_offsets
[1.1.x] Dual XYZ endstops parity with 2.0.x
2018-03-10 07:17:20 -06:00
Sebastianv650
b8f1b74abd [1.1.x] Silence M204 (#10036)
`M204` is often used by slicers to set acceleration depending on perimeter, infill, etc., so Marlin's answers are flooding the serial windows. Silence `M204` according to the philosophy that setter commands should only send a reply if no parameter is given.
2018-03-10 07:15:52 -06:00
Scott Lahteine
e8fc0e9a57 Move [xyz]_endstop_adj to Endstops class 2018-03-10 06:54:18 -06:00
Scott Lahteine
4b5a42f86a Tweaks to E2END, mesh slot offset 2018-03-10 06:54:18 -06:00
Scott Lahteine
83c83e3127 Update Marlin G-codes summary 2018-03-10 06:54:18 -06:00
Scott Lahteine
5ce64f6d16 Combine __AVR__ and USBCON for 2.0.x parity 2018-03-10 01:51:35 -06:00
Scott Lahteine
c05c5d96d9 Merge pull request #10031 from thinkyhead/bf1_unknown_z_no_raise
[1.1.x] Add UNKNOWN_Z_NO_RAISE to prevent Z grinding
2018-03-10 00:57:15 -06:00
Scott Lahteine
cce80fd41c Add UNKNOWN_Z_NO_RAISE to example configs 2018-03-09 23:11:35 -06:00
Scott Lahteine
1b79217fbc Add UNKNOWN_Z_NO_RAISE option
With this option enabled, Z won't ever be raised until after `G28` has been completed, and it won't raise if Z becomes unknown. This is good for machines whose beds fall when Z is powered off.
2018-03-09 23:11:35 -06:00
Scott Lahteine
192507b524 Move do_probe_raise closer to set_probe_deployed
…and limit the raise to Z_MAX_POS
2018-03-09 23:03:12 -06:00
Scott Lahteine
0d13c5d077 Fix position_is_reachable_by_probe, add comments
Fix #10029
2018-03-09 21:18:50 -06:00
Roxy-3D
fd3e243989 prevent steppers from turning off during manual probes 2018-03-09 17:54:41 -07:00
Scott Lahteine
12b697c5cd Fix UPDATE_ENDSTOP for CorePQ compatibility
Fixes #9939
2018-03-09 08:49:44 -06:00
Scott Lahteine
03676d8e2f Fix _tmc_say_axis string address
Fixes #10003
2018-03-09 06:07:52 -06:00
Scott Lahteine
ea6f5e20a6 Merge pull request #10021 from thinkyhead/bf1_safe_stepper_pulse
[1.1.x] Set a safe default MINIMUM_STEPPER_PULSE of 2µs
2018-03-09 05:25:05 -06:00
Scott Lahteine
3c6d2d7711 Add more delay before pulse off in Linear Advance ISR
A capital idea from https://github.com/MarlinFirmware/Marlin/pull/9914#issuecomment-371614153
2018-03-09 05:24:10 -06:00
Scott Lahteine
a9392c6b27 Set a safe default MINIMUM_STEPPER_PULSE of 2 2018-03-09 03:59:18 -06:00
Scott Lahteine
fa12866de3 Have position_is_reachable_by_probe use the whole bed (#10019)
Previously `position_is_reachable_by_probe` was limited to the area specified for `G29` mesh leveling (even if leveling was disabled). This change will properly consider the entire bed area so that `G30` and other non-leveling probing may take place.
2018-03-09 03:38:00 -06:00
Scott Lahteine
9508f9ec75 Fix: utility.h requires types.h 2018-03-09 03:33:25 -06:00
Scott Lahteine
beb7e2ed93 Allow servo.cpp to use safe_delay 2018-03-09 03:07:55 -06:00
Scott Lahteine
f24cdf1081 Add Einsy RAMBo board (#10018) 2018-03-09 01:40:34 -06:00
Scott Lahteine
61be06ef70 More .vscode droppings 2018-03-09 00:55:25 -06:00
Scott Lahteine
ba1c2a9819 Update servo.* for parity with 2.0.x 2018-03-08 19:32:32 -06:00
Scott Lahteine
e5e3c3ff35 Update powersupply_on in power_on/off (#10014)
Fix #10004
2018-03-08 18:56:41 -06:00
Scott Lahteine
9c667b5436 Init old_red to 127 to ensure initial change
Fix #10012
2018-03-08 18:27:39 -06:00
Scott Lahteine
de8fbdea6d Init watchdog last in setup() 2018-03-08 17:36:01 -06:00
Scott Lahteine
282170a259 Tweak manual move eindex arg 2018-03-08 16:26:11 -06:00
Scott Lahteine
31980f01ba Wrap stepper_indirection macros in do{}while(0) 2018-03-08 16:23:49 -06:00
Scott Lahteine
dcd2fa9291 Fix compile error with MAX_MESSAGE_LENGTH
Fix #9988
2018-03-07 21:58:19 -06:00
Bob-the-Kuhn
967d1034d9 Merge pull request #9986 from Bob-the-Kuhn/20x4-garbled-char-1.1.x
[1.1.x] Always Completely Initialize Character LCD (Garbled Custom Characters)
2018-03-07 17:57:41 -06:00
Bob-the-Kuhn
179de4423d remove conditional download of custom character RAM 2018-03-07 17:50:18 -06:00
Scott Lahteine
d11ed30584 Fix compile error with char LCD
Followup to f177da4
2018-03-07 16:53:03 -06:00
Scott Lahteine
1381b5d57d Fix LA_active_extruder (static) 2018-03-07 05:50:35 -06:00
Scott Lahteine
63d6dddae1 Wrap stepper_indirection macros 2018-03-07 05:45:30 -06:00
Sebastianv650
e5d69d313c Fix for LA (#9965)
Missed in the original LA 1.5 PR: eISR has to use a local copy of
current_block->use_advance_lead because it might still run wenn the last
block has been set to NULL.
2018-03-07 05:32:49 -06:00
Scott Lahteine
f177da45bb Fix encoder position for sddirectory 2018-03-07 05:20:15 -06:00
Scott Lahteine
5a1ba9c32f Merge pull request #9978 from thinkyhead/bf1_suppress_autoreport
[1.1.x] Capability to suppress auto-reporting
2018-03-07 03:33:26 -06:00
Scott Lahteine
dc40b3ec00 Suspend auto-report during UBL map output 2018-03-07 01:58:37 -06:00
Scott Lahteine
e7d519c898 Add suspend_auto_report flag to suppress auto-report 2018-03-07 01:58:37 -06:00
Scott Lahteine
2bf1bbf399 Add HAS_TEMP_SENSOR conditional 2018-03-07 01:58:31 -06:00
Scott Lahteine
2d0d5eccd8 Move AUTO_REPORT_SD_STATUS to SDSUPPORT block 2018-03-07 01:58:31 -06:00
Scott Lahteine
1f77930e01 Rebuild SD file sort array on Stop SD Print (#9975)
Thanks Chuck Hellebuyck.
2018-03-07 01:42:30 -06:00
Scott Lahteine
1ed1882766 Strip extra newline 2018-03-07 00:22:31 -06:00
Scott Lahteine
4dd612a68d Merge pull request #9977 from thinkyhead/bf1_auto_report_sd_status
[1.1.x]  Add AUTO_REPORT_SD_STATUS feature
2018-03-07 00:17:38 -06:00
Scott Lahteine
dc733192be Add AUTO_REPORT_SD_STATUS to example configs 2018-03-07 00:06:17 -06:00
Scott Lahteine
fb9de6e787 Add AUTO_REPORT_SD_STATUS feature
For parity with 2.0.x ahead of 1.1.9 release.
2018-03-07 00:06:03 -06:00
Scott Lahteine
b935bc948a Merge pull request #9973 from thinkyhead/bf1_tmc_util_progmem
[1.1.x] Move tmc_util.* extended_axis_codes to PROGMEM
2018-03-06 23:50:56 -06:00
Scott Lahteine
ecddd2a655 Make enums into implicit char 2018-03-06 23:36:56 -06:00
Scott Lahteine
fa998178e9 Move extended_axis_codes to PROGMEM 2018-03-06 22:20:35 -06:00
Scott Lahteine
ed605e77fa Merge pull request #9970 from thinkyhead/bf1_lin_advance_duplication
[1.1.x] Support duplication mode in LIN_ADVANCE
2018-03-06 21:59:46 -06:00
Scott Lahteine
73aa7ffff9 LIN_ADVANCE single stepper optimization 2018-03-06 19:27:43 -06:00
Scott Lahteine
50ad30259f Support duplication mode in LIN_ADVANCE 2018-03-06 19:12:54 -06:00
Scott Lahteine
8139154243 Merge pull request #9968 from thinkyhead/bf1_monitor_tmc_output
[1.1.x] Show E0-E4 in monitor_tmc_driver output
2018-03-06 19:00:58 -06:00
Scott Lahteine
fa3492fc6e Support DISTINCT_E_FACTORS in tmc_util.cpp 2018-03-06 18:34:43 -06:00
Scott Lahteine
536fa07ed5 Show E0-E4 in monitor_tmc_driver output
Fix #9966
2018-03-06 18:27:37 -06:00
Scott Lahteine
828dea2ee0 Improvements to Lightweight ST7920 status screen. (#9960)
- Show units on lightweight status screen.
- Fixed progress bar so it works with M73
2018-03-06 01:49:45 -06:00
Scott Lahteine
3bae28a5e1 Put more code between pulse start and stop (#9956) 2018-03-05 23:05:42 -06:00
Scott Lahteine
70e9c07b2d Fix menu highlight glitch, tweak scrolling code (#9954) 2018-03-05 23:05:05 -06:00
Scott Lahteine
55ec7d43ef Hide .vscode in sublime 2018-03-05 20:44:02 -06:00
Scott Lahteine
0b016c08c9 M851 - report only with no Z parameter 2018-03-05 02:10:32 -06:00
Scott Lahteine
890a396a2a Import FilamentRunoutSensor with debounce (#9947) 2018-03-05 01:49:19 -06:00
Scott Lahteine
b01f10dfac Fix custom bootscreen compiler warning 2018-03-04 23:37:32 -06:00
Scott Lahteine
f0d8d76f68 Use static classes for job timers (#9940) 2018-03-04 22:52:25 -06:00
Sebastianv650
bc08ce86be Fix broken reverse planner (#9914)
See MarlinFirmware/Marlin#9913 for details.
2018-03-04 21:18:35 -06:00
Scott Lahteine
081ab35e82 Remove some trailing whitespace 2018-03-04 21:13:36 -06:00
Scott Lahteine
eacb8346af Fix #9904 - toDigital should show 00-99 hours 2018-03-04 15:03:31 -06:00
Scott Lahteine
d77be210c1 Fix EXTRA_CYCLES_E handling in LIN_ADVANCE 2018-03-04 15:03:31 -06:00
Scott Lahteine
e98288ecab Merge pull request #9930 from teemuatlut/bf1_fix_M915 2018-03-04 03:45:20 -06:00
teemuatlut
cfc41e5587 Combine TMC2130 and TMC2208 sections 2018-03-04 11:27:08 +02:00
teemuatlut
36a94ac586 Fix M915 compiling 2018-03-04 11:26:30 +02:00
Scott Lahteine
5ad60d89a8 autotemp_factor is not value_celsius_diff
See https://github.com/MarlinFirmware/Marlin/issues/9852#issuecomment-369861822
2018-03-03 23:29:35 -06:00
Thomas Moore
bdfeb54a9d Clear retracted status when homing the Z axis 2018-03-03 23:17:10 -06:00
Scott Lahteine
1f488292cd Add board MKS_BASE_HEROIC (#9924)
Followup to #9008

- Don't define micro-stepping pins for boards that lack them.
- Allow setting of 128 microsteps with `M350`.
2018-03-03 23:14:28 -06:00
Scott Lahteine
b6fa55aa37 Fix: M112 calling kill from interrupt (#9922)
Fix #9906
2018-03-03 23:13:53 -06:00
Scott Lahteine
7450b7c36e Sanity check for custom boot / status bitmaps 2018-03-03 20:31:06 -06:00
Scott Lahteine
3cdd2591ed Update custom boot screen description 2018-03-03 20:10:35 -06:00
Scott Lahteine
699b5f5b30 Include .github folder in Sublime Text project 2018-03-03 19:49:03 -06:00
Scott Lahteine
4a30fe1a44 Add templates, contributing, code of conduct 2018-03-03 19:42:02 -06:00
Scott Lahteine
63b13588a8 Enhance github helper scripts (#9887) 2018-03-01 20:40:53 -06:00
Scott Lahteine
cd4c35c543 Correct M401 / M402 description 2018-03-01 19:11:30 -06:00
Scott Lahteine
b86125c6d6 Update M900 verbiage 2018-03-01 15:25:33 -06:00
Ben Lye
432b72e7a8 Fix DIGITAL_PIN_TO_ANALOG_PIN macro for Atmega1284p (#9883) 2018-03-01 15:14:08 -06:00
Scott Lahteine
a6326d25fb Drop SCARA_FEEDRATE_SCALING
The updated planner takes the length of the move, so this pre-calculation is no longer needed.
2018-03-01 04:28:42 -06:00
Bob-the-Kuhn
de26374746 [1.1.x] Add 1284 support & misc. bug fixes (#9869) 2018-03-01 03:05:27 -06:00
Studiodyne
d25f0a5a21 Fix for Fwretract bugfix1.1.x (#9872) 2018-03-01 02:59:42 -06:00
Sebastianv650
951b65c2de Add sanity checks to Linear Advance 1.5 (#9859) 2018-03-01 02:10:39 -06:00
Scott Lahteine
f7b44ac2a6 Fix SENSORLESS_HOMING for Core Kinematics (#9871) 2018-03-01 01:49:41 -06:00
Scott Lahteine
803c3169ad Fix lcd_quick_feedback for BTN_BACK 2018-02-28 20:23:34 -06:00
AnHardt
f151bf8bb7 Fix some mapper, charsize problems (#9865) 2018-02-28 18:56:45 -06:00
Scott Lahteine
198b059b44 Fix manual move axis display value
The workspace offset is now added to the XYZ values.
2018-02-28 17:31:38 -06:00
Scott Lahteine
a18d6171a6 Fix Z safe homing sanity check for no probe
Fix #9851
2018-02-28 05:30:24 -06:00
Scott Lahteine
8af3c04e7d Fix BTN_BACK
Followup to #9836
2018-02-28 03:27:36 -06:00
Anton Piliugin
c5fd486e91 [bugfix-1.1.x] Update russian language 28 Feb 2017 (#9849) 2018-02-28 03:06:33 -06:00
Scott Lahteine
03da376104 findMissingTranslations.sh tweak 2018-02-28 01:13:20 -06:00
Ben Lye
897170294c Fix Zonestar / ADC keypad with RAMPS. (#9841) 2018-02-28 00:07:42 -06:00
Scott Lahteine
2bde53bd46 Add support for BACK button (if any) (#9836) 2018-02-26 22:53:08 -06:00
Scott Lahteine
1eb3364ac9 Import ENABLE_LEVELING_FADE_HEIGHT from 2.0.x (#9834) 2018-02-26 22:16:09 -06:00
Scott Lahteine
ce5c848284 Remove dupes from pinsDebug_list.h 2018-02-26 19:19:13 -06:00
Scott Lahteine
114e9b0f56 Fix CR-10 status screen missing commas
Fix #9660
2018-02-26 15:50:04 -06:00
geigerg
3f56bd91d2 Add files via upload (#9827) 2018-02-26 15:44:24 -06:00
Scott Lahteine
ddfddae4f4 Fix subsequent G29 J commands
Fix #9826. Solution by @gloomyandy
2018-02-26 14:51:40 -06:00
Scott Lahteine
c776cda9fa Pins parity with 2.0.x 2018-02-26 01:20:57 -06:00
Scott Lahteine
9d7a1ae9f5 Mesh export in Bilinear + UBL M503 (#9818) 2018-02-26 01:00:56 -06:00
Scott Lahteine
97a35dd534 Compile flags needed in UBL.h 2018-02-25 22:18:13 -06:00
Scott Lahteine
e3e51a9a8d Fix types.h dependency 2018-02-25 22:01:01 -06:00
Scott Lahteine
d0720a565f Finish ubl header patch
Followup to aa380ae
2018-02-25 21:35:11 -06:00
Sebastianv650
72d5029f42 Useless line removed (#9813)
nextAdvanceISR is set in the next if structure in every possible
situation, so it's useless to set it once more before.
2018-02-25 21:21:15 -06:00
Scott Lahteine
aa380aeb4b Parity with 2.0.x in ubl and EEPROM (#9817) 2018-02-25 21:17:36 -06:00
Scott Lahteine
1617798287 Remove conditional wrap from ubl.h 2018-02-25 20:40:05 -06:00
Scott Lahteine
8f6a5d538f Fix CONFIG_ECHO_START
In reference to #9633
2018-02-25 05:37:05 -06:00
Scott Lahteine
c1a1f80fff Standardize encoder buzz defaults 2018-02-24 22:55:46 -06:00
Scott Lahteine
8488d64062 Standardize encoder defaults 2018-02-24 22:37:55 -06:00
Scott Lahteine
0977226a4b Merge pull request #9801 from thinkyhead/bf1_enders_are_legion
[1.1.x] Creality Ender-4 configuration
2018-02-24 22:10:51 -06:00
Scott Lahteine
7dab8ca5dc Add Creality Ender-4 configurations 2018-02-24 22:01:16 -06:00
Scott Lahteine
d0c8aabd28 Move Creality Ender-2 configurations 2018-02-24 22:01:11 -06:00
Scott Lahteine
8c22f9fd4f Bring some example configs up to speed 2018-02-24 22:00:15 -06:00
Scott Lahteine
2e3d74f60f Drop a conditional only used once 2018-02-24 16:31:05 -06:00
Scott Lahteine
2a1162b42c Extend .gitignore to make VSCode happy 2018-02-24 15:54:20 -06:00
Roxy-3D
9e3025e07b Change Folger Tech i3-2020 defaults... 2018-02-24 10:28:08 -06:00
Scott Lahteine
5299b577d1 Spanish (UTF8) Language (#9785)
From #7314 by @MrAmericanMike
2018-02-23 20:23:35 -06:00
Scott Lahteine
47619e4476 Fix a progress bar condition 2018-02-23 19:42:01 -06:00
Scott Lahteine
6845f17fb2 Prettify LCD_PROGRESS_BAR options 2018-02-23 19:13:03 -06:00
Zachary Hill
2aaa1a5815 Further fix of LCD_PROGRESS_BAR (#9784) 2018-02-23 18:52:25 -06:00
Scott Lahteine
f36da47b85 tweak pins_RAMPS.h 2018-02-23 15:10:25 -06:00
Scott Lahteine
03da273ea6 Fix LCD_PROGRESS bar
Fix #9208
2018-02-23 13:59:55 -06:00
Scott Lahteine
1c1d444b0c Merge pull request #9774 from thinkyhead/bf1_g28_restore_leveling
[1.1.x] Add RESTORE_LEVELING_AFTER_G28 option
2018-02-23 13:43:03 -06:00
Scott Lahteine
742733d714 Un-pause on print cancellation (#9779) 2018-02-23 13:42:21 -06:00
Scott Lahteine
235d024505 Add RESTORE_LEVELING_AFTER_G28 to example configs 2018-02-23 12:42:21 -06:00
Scott Lahteine
921001f004 Add RESTORE_LEVELING_AFTER_G28 option
Reference #8670
2018-02-23 12:42:17 -06:00
Scott Lahteine
0d9d11a2d5 Fix HardwareSerial include for TMC2208 2018-02-23 12:33:14 -06:00
Scott Lahteine
113a5fa80e Fix broken LEVEL_BED_CORNERS
Fix #8805
2018-02-23 09:10:33 -06:00
Scott Lahteine
4ea058260b Fix #9732 again 2018-02-23 03:59:40 -06:00
Sebastianv650
9c65890644 [1.1.x] LIN_ADVANCE v1.5 (#9700) 2018-02-23 00:53:41 -06:00
Roman Moravčík
e41b2274b0 [1.1.x] Added missing slovak translation of MSG_THERMAL_RUNAWAY_BED. (#9764) 2018-02-23 00:48:16 -06:00
Scott Lahteine
85162da0df Fix Z value on HD44780 (#9770) 2018-02-23 00:42:55 -06:00
Scott Lahteine
d55aaf95e8 Merge pull request #9761 from thinkyhead/bf1_lightweight_glcd
[1.1.x] Lightweight status screen for ST7920
2018-02-22 23:55:24 -06:00
Roman Moravčík
d6c416bb22 [1.1.x] Slovak translation update. (#9760) 2018-02-22 03:01:00 -06:00
Masterkookus
5f6a8588c5 [1.1.x] Hatchbox Alpha Config with E3Dv6 (#9721) 2018-02-22 02:57:38 -06:00
Scott Lahteine
1c95c13224 Lightweight status screen for ST7920
- This status screen uses the ST7920 character generator to greatly reduce SPI traffic and MCU load when updating the status screen.

- Has been tested with the RepRapDiscount Full Graphics Smart Controller but should work with any LCD that uses an ST7920 or fully compatible controller.
2018-02-22 00:46:25 -06:00
Scott Lahteine
967076b080 Add LIGHTWEIGHT_UI to example configs 2018-02-22 00:25:53 -06:00
Scott Lahteine
855b188102 Hephestos2 heated bed kit for all (#9756) 2018-02-21 22:26:56 -06:00
Scott Lahteine
a1d4835404 Merge pull request #9755 from thinkyhead/bf1_cr10s_mini
[1.1.x] Creality CR-10mini configuration
2018-02-21 20:30:01 -06:00
Scott Lahteine
6759be43ea Add CR-10S _Bootscreen.h 2018-02-21 20:19:12 -06:00
Scott Lahteine
6e0001b4f8 Add CR-10mini configuration 2018-02-21 20:19:12 -06:00
Scott Lahteine
84f0ce4751 Some encoder steps handled in Conditionals_LCD.h 2018-02-21 20:19:11 -06:00
Scott Lahteine
d9e2acd1b2 Configs parity with 2.0.x 2018-02-21 20:19:11 -06:00
Scott Lahteine
e8f9473be2 Fix progress bar on DOGM with LCD_SET_PROGRESS_MANUALLY 2018-02-21 19:43:45 -06:00
Scott Lahteine
126a80ea83 Reduce Creality3D bootscreens flash usage (#9745) 2018-02-21 16:08:27 -06:00
Scott Lahteine
aa635fe9f1 pinsDebug patch 2018-02-21 14:21:07 -06:00
Roxy-3D
d473456a08 Fix botched check for being off the mesh... 2018-02-21 13:50:27 -06:00
Scott Lahteine
7761812532 Merge pull request #9743 from thinkyhead/bf1_sainsmart_20x4
[1.1.x] Sainsmart LCD 20x4
2018-02-20 20:54:38 -06:00
Scott Lahteine
18881e6725 Add 20x4 option for Sainsmart LCD 2018-02-20 20:09:49 -06:00
Scott Lahteine
1d78bdac82 quick_home_xy sensorless homing 2018-02-20 20:09:45 -06:00
Scott Lahteine
e1fc89c83f Sanitycheck 2.0.x parity 2018-02-20 20:06:17 -06:00
Scott Lahteine
35800eec02 Fix big edit font width calculation
Fix #9685
2018-02-20 06:43:48 -06:00
Scott Lahteine
83e093f5cc Fix MALYAN_LCD message bug
Fix #9711
Based on #9731
2018-02-20 05:43:18 -06:00
Scott Lahteine
2b7e5c8e6c Extend menu items for SWITCHING_EXTRUDER
In reference to #5367
2018-02-19 11:11:04 -06:00
Scott Lahteine
3c2f735fb8 Conditionals for SWITCHING_EXTRUDER
In reference to #5367. SWITCHING_EXTRUDER was not fully implemented for EXTRUDERS > 2.
2018-02-19 10:58:06 -06:00
Scott Lahteine
e3370d097a Add a SENSORLESS_HOMING delay to quick_home_xy
Fix #9471
2018-02-19 10:11:25 -06:00
Scott Lahteine
f39b28b6a9 Null-terminate lcd_status_message 2018-02-19 10:07:22 -06:00
Scott Lahteine
b1ec140f0b Don't raise FIX_MOUNTED_PROBE on stow
Reference #9336
2018-02-19 08:34:25 -06:00
Scott Lahteine
6e932f979d CR-10 Bootscreen
From @plainpylut in #9660
2018-02-19 08:05:32 -06:00
Scott Lahteine
d3dea2e091 Merge pull request #9717 from thinkyhead/bf1_multi_fil_runout
[1.1.x] Support multiple filament runout sensors
2018-02-19 07:04:53 -06:00
Scott Lahteine
cc8711419e Add NUM_RUNOUT_SENSORS to example configs 2018-02-19 06:25:36 -06:00
Scott Lahteine
c04f8e8c9d Support for multiple filament runout sensors 2018-02-19 06:25:35 -06:00
Scott Lahteine
4813938a87 Update configs for 2.0.x parity 2018-02-18 19:42:20 -06:00
quittenkaes
971732b9f6 Add a delay before moving to z_safe_homing position if using TMC2130 sensorless homing (#9705)
A short delay is needed after homing an axis with TMC 2130 sensorless homing. Otherwise the axis wont move.
2018-02-18 19:29:06 -06:00
Scott Lahteine
1997640e41 Sync pinsDebug_list.h and apply macros (#9690) 2018-02-18 02:25:47 -06:00
Scott Lahteine
b45a277c52 ENDER can use BOARD_MELZI_CREALITY (#9694) 2018-02-18 02:24:23 -06:00
Scott Lahteine
016bd86c28 Add MSG_THERMAL_RUNAWAY_BED (#9695) 2018-02-18 02:24:08 -06:00
Scott Lahteine
fc709c28b5 Merge pull request #9698 from thinkyhead/bf1_codependent_xy_homing
[1.1.x] Option to force homing of a dependent axis
2018-02-18 02:22:25 -06:00
Scott Lahteine
65d69e9507 Strip excess G28 debug logging 2018-02-18 01:09:56 -06:00
Scott Lahteine
28e7562e7a Add CODEPENDENT_XY_HOMING to example configs 2018-02-18 01:09:51 -06:00
Scott Lahteine
2e5a6243df Option to force X or Y to home first when homing the other axis 2018-02-18 01:06:57 -06:00
Bob-the-Kuhn
d413781b98 Fix setPwmFrequency declaration (#9687) 2018-02-17 23:19:49 -06:00
Scott Lahteine
50d38e7d03 Pins spacing, 2.0.x parity 2018-02-17 21:49:00 -06:00
Scott Lahteine
80784c4d11 Remove sanity check for delta probe plug 2018-02-17 18:51:25 -06:00
Scott Lahteine
8761cb0464 Merge pull request #9682 from thinkyhead/bf1_m73_without_sd
[1.1.x] Allow M73 without SDSUPPORT
2018-02-17 15:50:19 -06:00
Scott Lahteine
aceadabe89 Merge pull request #9674 from bytespider/bugfix-1.1.x
Add TronXY XY100 config
2018-02-17 15:49:29 -06:00
Scott Lahteine
3a1fedaee6 Update LCD_SET_PROGRESS_MANUALLY in configs 2018-02-17 15:41:20 -06:00
Scott Lahteine
a1f0d9d349 Allow LCD_SET_PROGRESS_MANUALLY without SDSUPPORT 2018-02-17 15:41:20 -06:00
Scott Lahteine
c67cefd913 2.0.x parity in ultralcd__impl_HD44780.h 2018-02-17 15:41:20 -06:00
Scott Lahteine
c71f542d61 LCD_PROGRESS_BAR w/out SDSUPPORT for character LCD 2018-02-17 15:41:20 -06:00
Scott Lahteine
fe5ba25a00 Fix #9681 2018-02-17 15:39:46 -06:00
Scott Lahteine
4ae9afcc56 Fix compile error with SHOW_BOOTSCREEN disabled
Fix #9530
Fix #9524
2018-02-17 15:39:46 -06:00
Scott Lahteine
c3ff130127 Merge pull request #9672 from thinkyhead/bf1_czech_mate
[1.1.x] Update Czech language
2018-02-16 22:47:47 -06:00
Scott Lahteine
fbf8819253 Make safe_delay available for neopixel startup test
Fix #9033
2018-02-16 22:25:57 -06:00
Scott Lahteine
a7ebbe6dcd Update Czech advanced pause 2018-02-16 22:22:12 -06:00
Scott Lahteine
49909d3cd1 Add CHARSIZE to ignorelist 2018-02-16 22:20:09 -06:00
Scott Lahteine
ada40af5d6 Move <avr/pgmspace.h> include to MarlinConfig.h
For parity with 2.0.x, which includes pgmspace.h in the HAL.
2018-02-16 18:40:39 -06:00
Scott Lahteine
ec045f39aa Merge pull request #9678 from thinkyhead/bf1_myserial_yourserial
[1.1.x] Use serial macros over direct calls
2018-02-16 18:27:44 -06:00
Scott Lahteine
ba4a17f251 Tweak serial.h 2018-02-16 17:54:07 -06:00
Scott Lahteine
12628d43ce Use serial macros where possible 2018-02-16 17:53:47 -06:00
Scott Lahteine
023d21a1cf Add SERIAL_FLUSH and SERIAL_FLUSHTX macros 2018-02-16 17:50:58 -06:00
Scott Lahteine
a8a64f19f4 serial_echopair_P => serial_echopair_PGM 2018-02-16 17:35:26 -06:00
Rob Griffiths
529e6ed1ea added TronXY XY100 config 2018-02-16 13:57:01 +00:00
Thomas Moore
acb4dba7cd Fix LCD manual movement on kinematic machines (#9656) 2018-02-16 02:30:05 -06:00
Bob-the-Kuhn
f508bdded4 Fix VIKI2 hardware SPI compatibility (#9642) 2018-02-16 02:28:42 -06:00
teemuatlut
20f8c9b950 TMC SGT is int8 (#9650) 2018-02-16 02:19:17 -06:00
Scott Lahteine
d7e2e655ca Followup to #9663 2018-02-16 02:14:20 -06:00
Bob-the-Kuhn
15204bd5e9 Fix compile issue with USE_CONTROLLER_FAN (#9665) 2018-02-16 02:02:20 -06:00
Scott Lahteine
2ec90d2162 Followup to #9663
`ENABLED` only works for flag type options. Floats must use `#ifdef`.
2018-02-15 22:23:27 -06:00
Scott Lahteine
b56c6b9e13 Patch G26 circles (#9626)
Easier to configure. Catch an odd divisor.
2018-02-15 22:11:06 -06:00
Bob-the-Kuhn
e4b27c2401 Merge pull request #9668 from Bob-the-Kuhn/config-changes-1.1.x
[1.1.x] Improved CONTROLLER_FAN_PIN example in Configuration_adv.h
2018-02-15 21:45:32 -06:00
Bob-the-Kuhn
1647db8fad Set CONTROLLER_FAN_PIN example to -1 2018-02-15 21:29:09 -06:00
Roxy-3D
c8d3069580 UBL - Allow user to control Z-Height correction for off mesh movements (#9663)
* UBL - Allow user to control Z-Height correction for off mesh movements

* Enable UBL_Z_RAISE_WHEN_OFF_MESH on test machine for time being
2018-02-15 19:23:01 -06:00
Roxy-3D
b7e245036b Fix a comment about M105 buffer over runs... 2018-02-14 17:49:50 -06:00
Roxy-3D
66370006bb Fix G26 Circles... (#9638)
Will get this duplicated in bugfix_2.0.0 tomorrow...
2018-02-14 17:31:25 -06:00
Roxy-3D
3fcd131f46 Cartesian UBL systems should not use SEGMENT_LEVELED_MOVES
There is significant downside to breaking up the long line segments on UBL Cartesian machines via the SEGMENT_LEVELED_MOVES mechanism.   It adds a lot of extra computation but worse...  It cuts out all of UBL's off mesh Z-Height correction checks.    There have been a large number of people complaining about the nozzle going to infinity or crashing into the bed lately.   They are being caused by
```
void unified_bed_leveling::line_to_destination_cartesian()
```
not watching over the segments being queued up for movement.
2018-02-14 14:19:52 -06:00
Scott Lahteine
0e7999915d Fix #9361 2018-02-14 07:47:39 -06:00
AnHardt
e301e28e45 Complete M48 description_1 (#9630) 2018-02-14 05:17:48 -06:00
Scott Lahteine
6e4a7e2dcb Init lcd message string programmatically 2018-02-14 05:08:06 -06:00
studiodyne
8fbba6abd9 [1.1.x] French update (#9610) 2018-02-14 04:17:54 -06:00
Scott Lahteine
e2fef4df6f Fix #9201
FILAMENT_LCD_DISPLAY and SDSUPPORT are a-ok together.
2018-02-14 03:28:05 -06:00
Scott Lahteine
c93dab2307 MYSERIAL => MYSERIAL0
For cleaner diffing with Marlin 2.0.x.
2018-02-14 02:56:56 -06:00
Scott Lahteine
d89a61bd51 Update DIGIPOT_I2C_MOTOR_CURRENTS comments 2018-02-13 22:56:03 -06:00
studiodyne
2683b2636b Update French language (#9590) 2018-02-12 01:08:33 -06:00
Scott Lahteine
7cb3640ea4 Restore welcome message 2018-02-12 01:01:09 -06:00
Scott Lahteine
dc85b604bb Merge pull request #9591 from teemuatlut/bf1_fix_M914
[1.1.x] Fix M914 macro
2018-02-11 08:21:24 -06:00
Scott Lahteine
aa3292cc57 Merge pull request #9592 from thinkyhead/bf1_26_days_later
[1.1.x] Apply buried PR for parity with 2.0.x
2018-02-11 06:37:35 -06:00
Scott Lahteine
7e17a2cfd0 26-day-old buried patch to U.B.L. 2018-02-11 06:06:50 -06:00
Scott Lahteine
0acaaf536d Update gMax1.5+ for 2.0.x parity 2018-02-11 05:20:57 -06:00
Scott Lahteine
30b08e218d Patch Max7219 for parity with 2.0.x 2018-02-11 05:19:36 -06:00
teemuatlut
7babfbbcb2 Fix M914 macro 2018-02-11 13:08:55 +02:00
Scott Lahteine
2e7a754ac1 Megatronics baud rate 115200
Fix #9092
2018-02-11 03:42:27 -06:00
Scott Lahteine
61f3051982 Fix plan_arc clockwise (G2)
Fix #9482
2018-02-11 03:32:18 -06:00
Scott Lahteine
69a5e0c136 Add 'mffp' to quickly push upstream (#9588) 2018-02-11 02:21:52 -06:00
Scott Lahteine
73419681dc Update PB Rev.F pins 2018-02-11 01:36:20 -06:00
Scott Lahteine
bb155ed38e Correct MOTHERBOARD for Geeetech i3 Pro X
Fix #8856
2018-02-10 20:27:11 -06:00
Scott Lahteine
7aad82cccd Fix auto_fan in pins.h 2018-02-10 20:02:17 -06:00
Scott Lahteine
18aa682954 Patch SILVER_GATE auto fan 2018-02-10 19:29:36 -06:00
Scott Lahteine
5e72729c67 Fix #8744 2018-02-10 16:51:55 -06:00
Scott Lahteine
6f1afb411a Add comments to platformio.ini 2018-02-10 15:50:32 -06:00
Scott Lahteine
016171d682 Merge pull request #9575 from thinkyhead/bf1_more_tests
[1.1.x] Fix Power class
2018-02-10 15:49:51 -06:00
Scott Lahteine
f6a73bbd84 Patch Power class 2018-02-10 15:36:42 -06:00
Scott Lahteine
baaf79b755 Use signed for pin_t 2018-02-10 15:30:29 -06:00
Scott Lahteine
2aafc5b7b0 Test POWER_SUPPLY and AUTO_POWER_CONTROL 2018-02-10 15:27:06 -06:00
Scott Lahteine
7145731844 Merge pull request #9555 from wizhippo/tronxyx5s
[1.1.x] Tronxy X5S
2018-02-10 15:13:12 -06:00
Douglas Hammond
1e00ba5433 Add Tronxy X5S 2018-02-10 15:03:20 -06:00
Scott Lahteine
abda89437d Melzi boards include melzi pins 2018-02-10 15:03:20 -06:00
Scott Lahteine
d6d01f1f8e Merge pull request #9571 from thinkyhead/bf1_french_update
Update French language
2018-02-10 14:15:13 -06:00
GMagician
5a39afb81b [1.1.x] Memory overflow protection (#9563) 2018-02-10 14:14:22 -06:00
Scott Lahteine
8f4c564b04 Merge pull request #9565 from teemuatlut/bf1_init_cs_pins
[1.1.x] Init CS pins before loading settings
2018-02-10 14:08:16 -06:00
Scott Lahteine
017e0e6951 Update French language
Based on #9556 by @gege2b
2018-02-10 14:06:02 -06:00
teemuatlut
7ee87dc2db Init CS pins before loading settings 2018-02-10 19:16:08 +02:00
Johnny Eshak
3a3228ef1b [1.1.x] Fix compile Error Anet (Optiboot) (#9550) 2018-02-09 07:16:37 -06:00
Scott Lahteine
5a53e4d921 Merge pull request #9548 from thinkyhead/bf1_prevent_comments_resetting
[1.1.0] Prevent watchdog reset due to many comments
2018-02-09 07:15:10 -06:00
Scott Lahteine
8979990805 Merge pull request #9543 from thinkyhead/bf1_reliable_probe_heaters_off
[1.1.x] More reliable PROBING_HEATERS_OFF with BED_LIMIT_SWITCHING
2018-02-09 07:10:33 -06:00
Matteo Ragni
4e276c6e00 [1.1.x] Support for the Anycubic Trigorilla Board (1.3 at least) (#8367) 2018-02-09 05:38:21 -06:00
Scott Lahteine
96bcf08477 Tweak escape handling in serial input 2018-02-09 04:06:44 -06:00
Scott Lahteine
68cc5c72fd No EXTRUDER_RUNOUT_PREVENT during print 2018-02-09 03:36:42 -06:00
Scott Lahteine
06dff0b7ec Fix HAS_CONTROLLER_FAN in is_power_needed 2018-02-09 03:33:45 -06:00
Scott Lahteine
c4dbedd5b6 Prevent watchdog reset due to many comments
Addressing #7449
2018-02-09 01:50:42 -06:00
Scott Lahteine
9727e5e3d6 Minor comment/condition cleanup 2018-02-09 00:53:04 -06:00
Scott Lahteine
ad323d852e Sanity check for SERIAL_PORT
Addressing #7400
2018-02-09 00:41:39 -06:00
Scott Lahteine
4300547c66 Size lcd_status_message based on language (#9546) 2018-02-08 23:03:27 -06:00
Scott Lahteine
f61ff9c813 Firmware retraction lost change 2018-02-08 22:20:31 -06:00
Scott Lahteine
55071749b7 Minor changes for 2.0.x parity 2018-02-08 22:20:31 -06:00
Scott Lahteine
9dd8a49f82 Add pin_t to Marln 1.1 branch 2018-02-08 21:01:41 -06:00
Scott Lahteine
36ba754842 More reliable PROBING_HEATERS_OFF with BED_LIMIT_SWITCHING 2018-02-08 21:01:41 -06:00
Scott Lahteine
169515404d Merge pull request #9538 from shaktee/bibo-cyclops-1.1x
[1.1.x] BIBO Cyclops
2018-02-08 21:00:59 -06:00
Scott Lahteine
3e838bf6b6 Cyclops has SINGLENOZZLE and higher temp 2018-02-08 19:07:43 -06:00
Scott Lahteine
b81980a439 TouchX base config differences 2018-02-08 19:07:43 -06:00
Rajesh Vaidheeswarran
98e7b821b4 Add Cyclops configuration for BIBO 2018-02-08 18:24:40 -06:00
GMagician
03f27a5e41 [1.1.x] Fix compile warning (#9540) 2018-02-08 17:59:24 -06:00
Scott Lahteine
cffbb146ea Correct some retract() comments 2018-02-08 17:56:53 -06:00
Scott Lahteine
1ddbdd0321 Not yet, HAS_DISPLAY 2018-02-08 04:03:05 -06:00
Scott Lahteine
4f04f4e6b8 Followup to #9532 2018-02-08 03:39:20 -06:00
Scott Lahteine
c1a3ec1228 Tweaky followup to I2CPEM update 2018-02-08 03:21:46 -06:00
Scott Lahteine
bdbd15e6d9 Merge pull request #9504 from jaysonkelly/patch-1
[1.1.x] I2C Position Encoders update
2018-02-08 02:57:45 -06:00
Scott Lahteine
5c2cb60f03 Merge pull request #9518 from melvinisken/bugfix-1.1.x
[1.1.x] Changed software serial pins to enable R/W access to TMC2208 drivers
2018-02-08 02:56:58 -06:00
jaysonkelly
f8a8711075 I2C position encoders update
Updating I2C position encoders to enable babystepping and Babystep XY when using the ecm microstep correction method. Also changed default method to ECM microstep.
2018-02-08 02:46:12 -06:00
Scott Lahteine
b509567567 Merge pull request #9514 from FreeJaus/bugfix-1.1.x-eu
update eu language
2018-02-08 02:10:58 -06:00
Scott Lahteine
2c6c9e90df Merge pull request #9508 from tnw513/fix-italian
Fix italian translation
2018-02-08 02:10:46 -06:00
Scott Lahteine
8438a57910 Followup to #9532 2018-02-08 02:05:18 -06:00
Thomas Moore
a471cd26e1 [1.1.x] Enable Z axis and delta sensorless homing (#9532) 2018-02-08 02:02:48 -06:00
Scott Lahteine
f089bbbc93 Merge pull request #9531 from thinkyhead/bf1_misc_cleanup_feb7
[1.1.x] Misc. cleanups
2018-02-08 01:50:17 -06:00
Scott Lahteine
f3a09768e8 Tweak early handling of M108/M112/M410 2018-02-07 22:43:51 -06:00
Scott Lahteine
9509568b7e Patch utility for debug-leveling 2018-02-07 22:43:51 -06:00
Scott Lahteine
252ae1b52d Drop ubl.h include from steppers.cpp 2018-02-07 22:16:07 -06:00
Scott Lahteine
3137df9ad4 Special override of LCD_WIDTH 2018-02-07 22:16:07 -06:00
Scott Lahteine
42866db251 Fix compile with BLUETOOTH
Addressing #7110
2018-02-07 18:06:26 -06:00
Scott Lahteine
50582e3b47 Add sublime-project file (#9527) 2018-02-07 15:50:00 -06:00
Melvin Isken
0c6c96bb60 Changed software serial pins to enable R/W access to TMC2208 drivers 2018-02-07 09:52:49 +01:00
Scott Lahteine
3621f21fb2 Clean trailing space 2018-02-07 02:40:41 -06:00
1138-4EB
3d346f8398 update eu language 2018-02-07 01:12:37 +01:00
tnw513
41785a10dd Fix italian translation 2018-02-06 15:09:06 +01:00
Scott Lahteine
ca76c3df7a Merge pull request #9497 from thinkyhead/bf1_marlin_ino
[1.1.x] Marlin.ino needs no content
2018-02-06 02:28:02 -06:00
Scott Lahteine
c4f1a191c3 Marlin.ino needs no content 2018-02-06 01:09:51 -06:00
Scott Lahteine
967bf41080 Add a proper comment for G26 2018-02-06 00:59:54 -06:00
Scott Lahteine
1e4482df54 Merge pull request #9499 from thinkyhead/bf1_auto_power
[1.1.x] Enable / disable PSU automatically
2018-02-06 00:36:31 -06:00
Christopher Reimer
254417e8b0 Enable and disable power supply automatically 2018-02-06 00:20:33 -06:00
Scott Lahteine
80946a17ee Add AUTO_POWER_CONTROL to example configs 2018-02-06 00:20:26 -06:00
Scott Lahteine
1dc6d50dca Merge pull request #9500 from FreeJaus/bugfix-1.1.x-i3PB-GT2560_REV_A_PLUS
[1.1.x] Configs for Prusa i3 Pro B
2018-02-06 00:18:59 -06:00
1138-4EB
b86dfd35ae Configs for Prusa i3 Pro B GT2560 Rev.A Plus
One without probe and one with BLTOUCH.
2018-02-05 23:54:19 -06:00
Scott Lahteine
6dbeca94b3 Merge pull request #6735 from Project-J2/UltiController-v2.1-support
[1.1.x] UltiController v2.1 support
2018-02-05 22:32:27 -06:00
Scott Lahteine
527d260581 Add ULTI_CONTROLLER to example configs 2018-02-05 22:24:08 -06:00
Project-J²
ae2476dfdb Add UltiController v2.1 support
Add compatibility with the original screen bord from Ultimaker 2 printer
(UltiController v2.1 with the PG-2864ALBP I2C display)
2018-02-05 22:24:08 -06:00
Scott Lahteine
91eaa54ea9 M100 comment 2018-02-05 21:53:21 -06:00
Scott Lahteine
1352acdf75 Adjustment to DOG_CHAR_*_EDIT 2018-02-05 20:24:18 -06:00
Scott Lahteine
123c6c5d34 Num-to-string functions for DEBUG_LEVELING_FEATURE
Fix #9429
2018-02-05 19:05:07 -06:00
Scott Lahteine
df320209c3 Patch hex_print_routines.* include order 2018-02-05 17:05:26 -06:00
Scott Lahteine
8da92b6823 Fix default arg in lcd_goto_screen 2018-02-05 16:41:59 -06:00
Scott Lahteine
b708bcf8b1 sp 2018-02-05 15:56:58 -06:00
Scott Lahteine
7b3e28fc77 Merge pull request #9489 from GMagician/1.1.x-Simplify-bltouch-configuration
[1.1.x] Simplify bltouch configuration
2018-02-05 14:37:34 -06:00
Scott Lahteine
873fb84d27 Fix const mesh_index_pair in G26
Followup to #9493
2018-02-05 14:29:47 -06:00
Scott Lahteine
7d8f49f82c Merge pull request #9493 from GMagician/1.1.x-Fix-compile-error
[1.1.x] Fix compiler error when G26 is enabled
2018-02-05 14:25:44 -06:00
GMagician
587e6b7c8d [1.1.x] Fix compiler error when G26 is enabled
Address #9491
2018-02-05 21:21:42 +01:00
GMagician
f1958ac060 [1.1.x] Simplify bltouch configuration
When using bltouch Z_MIN_ENDSTOP_INVERTING must match Z_MIN_PROBE_ENDSTOP_INVERTING

since both are redefined latter is just redefined equal to first
2018-02-05 19:52:41 +01:00
Scott Lahteine
4d2355cc9e Merge pull request #9485 from thinkyhead/bf1_malyan_clueless_controller
[1.1.x] Malyan LCD controller
2018-02-05 05:03:07 -06:00
Scott Lahteine
0f6f05441b Implement MALYAN_LCD 2018-02-04 21:18:49 -06:00
Scott Lahteine
ca58084020 Add MALYAN_LCD to configurations 2018-02-04 21:18:42 -06:00
Scott Lahteine
89a9aa931f SanityCheck.h parity with 2.0.x 2018-02-04 21:17:03 -06:00
Scott Lahteine
e9d374dd54 Tweak sanity-check for SENSORLESS_HOMING 2018-02-04 21:17:03 -06:00
Scott Lahteine
21bfbb9d44 Apply standards for whole-file conditions 2018-02-04 21:17:03 -06:00
Scott Lahteine
5054c53901 Export more in ultralcd.h
Closer parity with 2.0.x
2018-02-04 21:17:03 -06:00
Scott Lahteine
56d5c5b97a Misc. comments 2018-02-04 21:16:07 -06:00
Scott Lahteine
ad70d76faa Merge pull request #9332 from paierh/bugfix-1.1.x-UBL-pattern
[1.1.x] Change angles for circles in G26-validation-pattern
2018-02-04 19:05:32 -06:00
Scott Lahteine
8f787cc474 Merge pull request #9281 from floyd871/patch-1
[1.1.x] Allow override of RAMPS CS Pins
2018-02-04 16:38:13 -06:00
Michael Neumann
499248c5ef Allow override of RAMPS CS Pins 2018-02-04 06:10:42 -06:00
shaktee
6e86c9d22b Add BIBO configs to Marlin bugfix-1.1.x (#9467)
[1.1.x] BIBO TouchX configuration
2018-02-03 23:20:35 -06:00
Scott Lahteine
9c3a562208 Merge pull request #9448 from tcm0116/1.1.x-kinematic
[1.1.x] Apply feedrate to nozzle movement for kinematic machines
2018-02-03 23:00:00 -06:00
Scott Lahteine
d00eb4da5c Language updates for parity 2018-02-03 22:48:06 -06:00
Thomas Moore
5b4e39a429 Apply feedrate to nozzle movement for kinematic machines 2018-02-03 22:17:13 -06:00
Scott Lahteine
b11e78f5f7 Merge pull request #9462 from GMagician/1.1.x-temperature-out-of-lcd
[1.1.x] Fix temperature out of LCD
2018-02-03 19:24:38 -06:00
Scott Lahteine
3bdd7b1ed3 Reduce trig table down to 6 floats 2018-02-03 19:16:42 -06:00
GMagician
14b7c8cf51 [1.1.x] Fix temperature out of LCD
Fix bug introduced in #9381

Original code was 18-chars*6 hence reversed number in if statements
2018-02-03 22:58:26 +01:00
paierh
68cff5f245 Change G26 circle angles
Changed the start- and end-angles for circles in the mesh-validation-pattern to avoid crossing lines.

At the start-/end-point of the circles there is a small dot of filament on my printer.
When drawing lines after the circles the nozzle crashes into those dots and destroys the circles.
I solved this problem by rotating the start- and end-points by 45 degrees.
2018-02-02 05:24:31 -06:00
Manuel Valentino
652162777b [1.1.x] Fixed wrong information about TMC2208 wiring (#9334) 2018-02-02 04:14:43 -06:00
teemuatlut
923f17328f Add TMC software SPI (#9362) 2018-02-02 03:56:08 -06:00
Custom3DProducts
f4076fe99d [1.1.x] Add Z_PROBE_HYSTERESIS to mitigate Z jerking while probing (#9375) 2018-02-02 02:29:19 -06:00
Scott Lahteine
6445859270 Merge pull request #9373 from nikkoura/fix_fr_strings
[1.1.x] Fix french language (typos, case homogeneity)
2018-02-02 01:54:12 -06:00
GMagician
4661451d32 [1.1.x] Fix compile error on delta when NO_WORKSPACE_OFFSETS (#9387) 2018-02-02 01:43:53 -06:00
Scott Lahteine
22e688460f Merge pull request #9381 from thinkyhead/bf1_enhance_boot_status
[1.1.x] Enhance GLCD Boot/Status screens
2018-02-02 01:40:08 -06:00
Scott Lahteine
8bccd0ef5b Fix up _Bootscreen.h and _Statusscreen.h
- Support for 3 and 4-frame fan animation
- Binary bitmap data for easier visualization
- Cleanup mystery numbers, etc.
2018-02-02 00:55:02 -06:00
Scott Lahteine
f4639fa964 Move SET_BIT macro to endstops.cpp and simplify 2018-02-02 00:50:29 -06:00
Scott Lahteine
0a10d010b7 Merge pull request #9390 from tcm0116/1.1.x-retract
[1.1.x] Clear retracted status when homing the Z axis
2018-02-01 23:36:53 -06:00
Scott Lahteine
7a056a4e09 Patch resume_print based on suggestion
See #9392
2018-02-01 23:34:14 -06:00
Scott Lahteine
33c459c1d6 Parser followup patch
Based on #9393
2018-02-01 23:25:22 -06:00
Scott Lahteine
65c2f3bb65 Merge pull request #9435 from thinkyhead/cleanup_binary_deleteme
[1.1.x] Separate 32-bit wide bit macros
2018-02-01 22:44:18 -06:00
Scott Lahteine
ec9a5b7157 Merge pull request #9434 from thinkyhead/bf1_fix_G29_W_I_J_Z
[1.1.x] Fix broken G29 W I J
2018-02-01 21:53:10 -06:00
Scott Lahteine
31920a5285 Add / use 32-bit wide bit macros 2018-02-01 21:47:23 -06:00
Scott Lahteine
b78cccad0f Fix broken G29 W I J 2018-02-01 19:50:18 -06:00
Thomas Moore
36a1d12238 Clear retracted status when homing the Z axis 2018-01-29 19:35:16 +00:00
Nikkoura
79183f7620 Fix french language (typos, case homogeneity) 2018-01-28 00:01:00 +01:00
GMagician
b0f148f7db [1.1.x] Fix SD wrong filename list (#9343)
If last file in directory has short filename and is preceded by a deleted long file name. SD menu will wrongly report long deleted file name as last entry
2018-01-24 23:07:58 -06:00
Scott Lahteine
bc4fa3984b Prettier codebits debugging 2018-01-24 00:30:58 -06:00
Scott Lahteine
d60e5c89d8 Merge pull request #9326 from thinkyhead/bf1_fix_parser_M118
[1.1.x] Fix parser.has_value, M118 parameters
2018-01-24 00:23:50 -06:00
Scott Lahteine
57d68e0d01 Merge pull request #9317 from smay4finger/fileattributes
Fileattributes
2018-01-24 00:18:30 -06:00
Stefan May
908d487212 removed execution mode from files 2018-01-24 00:17:34 -06:00
Scott Lahteine
a855d01336 Fix M118 parameter parsing 2018-01-23 23:50:42 -06:00
Scott Lahteine
d5ad51821c Simplify G-code debug option 2018-01-23 23:50:42 -06:00
Scott Lahteine
59b5800e58 Change parser codebits from array to int32_t 2018-01-23 23:50:42 -06:00
Scott Lahteine
1b84807eb0 Fix has_value with FASTER_GCODE_PARSER 2018-01-23 23:50:42 -06:00
Scott Lahteine
3ab4736ac9 Move some strings to PROGMEM 2018-01-23 23:50:42 -06:00
Scott Lahteine
d8aa40eedf Marlin must override _BV for 32-bit masks! 2018-01-23 23:50:42 -06:00
Scott Lahteine
2177c246d5 Patch BQ Hephestos 2 filament diameter
From #9314
2018-01-23 20:38:43 -06:00
Scott Lahteine
e5c6448063 Merge pull request #9323 from thinkyhead/bf1_simple_patches
[1.1.x] Optimize some strings, arc length calculation
2018-01-23 19:13:00 -06:00
Scott Lahteine
f447668387 Optimize some serial strings 2018-01-23 18:59:35 -06:00
Scott Lahteine
d4ab383a1b Lightly optimize arc length calculation 2018-01-23 18:59:35 -06:00
Scott Lahteine
87c254b238 Patch M114 D logical output 2018-01-23 18:48:53 -06:00
Scott Lahteine
cc9165cb99 Merge pull request #9311 from thinkyhead/bf1_fade_info_too
[1.1.x] Include Z Fade in log_machine_info
2018-01-23 14:08:59 -06:00
Scott Lahteine
df5c06ab7b Fix G29 no_action with A and Q 2018-01-23 13:58:36 -06:00
Scott Lahteine
b2dcb75c6c Include Z Fade in log_machine_info 2018-01-23 13:58:36 -06:00
Scott Lahteine
074f191bc3 Followup patch for TMC stepper init 2018-01-23 13:58:36 -06:00
Manuel Valentino
2bda584fc6 Added missing SoftwareSerial begin for TMC2208 2018-01-22 10:49:40 -06:00
Thomas Moore
b818543045 [1.1.x] Fix change filament for delta machines (#9296) 2018-01-22 10:19:00 -06:00
Scott Lahteine
3175266681 Merge pull request #9298 from thinkyhead/bf1_fix_skew_factor
[1.1.x] Fix Skew Correction pre-calculation overflow error
2018-01-22 08:33:25 -06:00
Scott Lahteine
1ae40abb09 More precision in M852 skew report
Followup change from #8843
2018-01-22 08:30:37 -06:00
Scott Lahteine
1cea0b6f70 Fix Skew Correction pre-calculation overflow error 2018-01-22 08:22:28 -06:00
Scott Lahteine
5c6061ea5a More precision in M852 skew report 2018-01-22 08:06:40 -06:00
Scott Lahteine
6799aa9806 Merge pull request #9278 from oysteinkrog/fix/DualX_Endstops_1.1.x
[1.1.x] Fix DUAL_X_CARRIAGE endstop tests
2018-01-22 07:42:28 -06:00
Scott Lahteine
049898fa30 Update comment on set_home_offset 2018-01-22 06:14:55 -06:00
Scott Lahteine
a29ca4947e Merge pull request #9263 from thinkyhead/bf1_print_start_fix
[1.1.x] Minor filament change improvements
2018-01-22 05:52:58 -06:00
Scott Lahteine
feb6014e92 Don't run M600 on filament runout if the nozzle is cold 2018-01-22 05:46:29 -06:00
Scott Lahteine
c7ae531e35 Better LCD message when heating needed 2018-01-22 05:46:29 -06:00
Scott Lahteine
c373afbddd Clean up and document load/unload/pause/resume 2018-01-22 05:46:19 -06:00
Scott Lahteine
c970869d74 Add hotEnough methods 2018-01-22 05:46:19 -06:00
Scott Lahteine
74873f377d Merge pull request #9289 from thinkyhead/bf1_ms_cs_pins_fixup
[1.1.x] Patch MSn pins, sanity-check TMC CS pins
2018-01-22 02:27:27 -06:00
Scott Lahteine
e8687e5b9e Update pins.h for parity, protect MS pins 2018-01-22 02:19:04 -06:00
Scott Lahteine
198498b1aa Sanity check for TMC2130 having CS pins 2018-01-22 02:04:21 -06:00
cprund
0527090a31 Minor bugfix to the code that enables the 2nd X stepper. It needs to be enabled for X_DUAL_STEPPER_DRIVERS. (#9286) 2018-01-22 01:32:09 -06:00
Scott Lahteine
dff96a8952 Merge pull request #9288 from thinkyhead/bf1_grid_bounds
[1.1.x] Better probe boundaries for linear/grid
2018-01-22 01:23:42 -06:00
Scott Lahteine
3d9f360b5a Better probe boundaries for linear/grid 2018-01-22 01:10:34 -06:00
Scott Lahteine
b0bfa65be7 Merge pull request #9282 from thinkyhead/bf1_jgaurora_configs
[1.1.x] Add JGAurora A5 support
2018-01-22 00:46:14 -06:00
Scott Lahteine
c8ac3a2a72 Add example configs for JGAurora A5 2018-01-21 22:23:31 -06:00
Scott Lahteine
957bb3124a Add thermistor 15 tuned for JGAurora A5 2018-01-21 16:57:47 -06:00
Øystein Krog
1f37781bf1 Fix DUAL_X_CARRIAGE endstops
\#8170 fixed
(cherry picked from commit 441517bbe1)
2018-01-21 16:32:29 +01:00
Scott Lahteine
7b62670987 Merge pull request #9272 from thinkyhead/bf1_creality_tuneup
[1.1.x] Fix and improve Creality configs
2018-01-21 02:53:08 -06:00
Scott Lahteine
7b5a4f71be Fix toDigital length with days
From #9220
2018-01-21 02:50:54 -06:00
Scott Lahteine
94a9cd6477 CR-10S filament change length, enhanced status bitmap 2018-01-21 01:58:55 -06:00
Scott Lahteine
0cfcc7cbf5 Make "Ender" status screen dual-nozzle ready 2018-01-21 01:58:55 -06:00
Scott Lahteine
292755258a Add a heating indicator X offset 2018-01-21 01:58:40 -06:00
Scott Lahteine
02e2ace199 Merge pull request #9199 from nhchiu/Case-Light-use-NEOPIXEL
[1.1.x] Use NEOPIXEL as case light
2018-01-21 01:52:31 -06:00
nhchiu
4a40cf268d Use NEOPIXEL as case light
Add an option to use the NEOPIXEL LED as case light.
2018-01-20 16:57:04 -06:00
Scott Lahteine
428fbe8228 Apply CASE_LIGHT_USE_NEOPIXEL to example configs 2018-01-20 16:27:30 -06:00
Scott Lahteine
81a12b2fac Relative movements fix 2018-01-20 15:22:38 -06:00
Scott Lahteine
fb636db61a Patch to restore broken Dual X Carriage 2018-01-20 15:07:40 -06:00
Scott Lahteine
369f1a64d8 Merge pull request #9262 from tcm0116/1.1.x-delta_softstops
[1.1.x] Allow DELTA to compile with soft endstops disabled
2018-01-20 14:16:14 -06:00
Scott Lahteine
6ed2840615 Use delay() in serial temp report 2018-01-20 14:12:30 -06:00
Scott Lahteine
eb3a05c437 Allow FIL_RUNOUT_PIN override on RAMPS-based boards 2018-01-20 12:00:03 -06:00
Scott Lahteine
d29a0d64d5 Set FIL_RUNOUT_PIN for Creality CR10-S
Tested with M43 and found to be connected to DIO 2
2018-01-20 11:58:37 -06:00
Scott Lahteine
09ad00b2d1 Use standard encoder pulses/steps for CR-10S 2018-01-20 11:34:53 -06:00
Thomas Moore
f8192f6e46 Allow DELTA to compile with soft endstops disabled 2018-01-20 09:43:59 -06:00
Scott Lahteine
f360b3b849 Date refresh 2018-01-20 09:17:00 -06:00
Scott Lahteine
6253560ffa Additional .gitignore entry for VS Code 2018-01-19 22:33:21 -06:00
Scott Lahteine
74c23bf80d Merge pull request #9232 from GMagician/1.1.x-ramps-pins-fixup
[1.1.x] Expand RAMP case light possibilities
2018-01-19 22:29:09 -06:00
Scott Lahteine
8d14ff1446 Merge pull request #9248 from GMagician/1.1.x-bed-temp-limit-fix
[1.1.x] Standardized max temp values
2018-01-19 22:27:00 -06:00
GMagician
2814103458 Standardized max temp values
Everywhere in menu items temperatures are "defined value" subtracted by 15.
In one place is subtracted by 5
2018-01-19 19:41:45 +01:00
Bob-the-Kuhn
21a631dd4e Merge pull request #9237 from Bob-the-Kuhn/TMC2208-sanity-check-1.1.x
[bugfix-1.1.x] add TMC2208 sanity check & fix typo
2018-01-19 12:27:03 -06:00
Bob-the-Kuhn
d0e61d82c0 TMC2208 sanity check 2018-01-18 23:16:41 -06:00
Roxy-3D
0edf5a2ab5 Better handle serial over runs... 2018-01-18 16:51:27 -06:00
Roxy-3D
597d94bd3a Better handle serial buffer over run 2018-01-18 16:48:12 -06:00
Roxy-3D
73565728c7 Further clean up for serial over run issue during long operations 2018-01-18 14:38:18 -06:00
GMagician
3b53c5ada1 Expand RAMP case light possibilities
Pin 6 is only used by servos when 2 or more of them are used
2018-01-18 18:35:08 +01:00
Roxy-3D
cbdbeb3e69 PronterFace M105 work around (#9227)
PronterFace keeps sending M105 requests during long operations like G29 P1, G29 P2, G29 P4 and G26. The serial buffer fills up before the operation is complete. The problem is, a corrupted command gets executed. It is very typical for the M105 to turn into a M1 (actually... M1M105 is typical).

This causes the printer to say "Click to resume..."

This is a temporary fix until we figure out the correct way to resolve the issue.

More work needed for G26.
2018-01-17 22:51:19 -06:00
Roxy-3D
80c1afde0f Fix mesh size... 2018-01-17 09:33:18 -06:00
Roxy-3D
c11665e92f Regression fixes for UBL's G29 P1, G29 P2, G29 P4 and G26 (#9213)
The changes to ultralcd.cpp for is_lcd_clicked() did not encompass the
full functionality of UBL's G29 P1, P2 and P4.   It also broke G26's
ability to abort in several of its phases.

This is the first pass at fixing the problem.   It has been tested for
correctness for several hours but more testing  needs to be done.
There may be a few follow up patches to finish covering all the corner
cases, but right now I need to merge this before any conflicts show up.

Some of these changes will need to be moved over to the bugfix-v2.0.0
branch.   That will happen a few days from now.
2018-01-17 00:27:50 -06:00
Scott Lahteine
333bd8f394 Merge pull request #9203 from benlye/m73-bugfix-1.1.x
[1.1.x] Fix progress bar duration when time is exactly 86400s
2018-01-16 21:14:31 -06:00
Bob-the-Kuhn
e668e053c2 Merge pull request #9206 from MarlinFirmware/revert-9174-fix_missing_decel_steps
Revert "[1.1.x] Fix missing deceleration steps"
2018-01-16 11:33:39 -06:00
Bob-the-Kuhn
ba9aa47260 Revert "[1.1.x] Fix missing deceleration steps" 2018-01-16 11:31:27 -06:00
blye
deda3d3a3c Fix duration when time is exactly 86400s 2018-01-16 08:16:42 +00:00
Bob-the-Kuhn
ec028faa1b Merge pull request #9174 from Sebastianv650/fix_missing_decel_steps
[1.1.x] Fix missing deceleration steps
2018-01-15 21:03:51 -06:00
Roxy-3D
06adef7343 Get FT-i3-2020 example files in compliance with ?_BED_SIZE 2018-01-15 15:32:19 -06:00
Scott Lahteine
69c993092b Followup to Ender config 2018-01-15 05:48:50 -06:00
Scott Lahteine
d25487dfb9 Merge pull request #9160 from tommie/ender/bugfix-1.1.x
[1.1.x] Creality Ender support
2018-01-15 03:48:47 -06:00
Tommie Gannert
f3f26f7cb3 Creality Ender support.
Reverse engineered from the unpublished firmware from Creality,
inferring the base version and configuration they used. The basis is
the firmware version from "Jul 31 2017 10:16:30". Configurations were
found by seeing what code was compiled into the firmware, and
constants used there.

They used Marlin 1.0.1, because

* 1.0.0 had very different serial output in `setup()` and overall
  code structure.
* 1.0.2 changed the `VERSION_STRING` to include a leading space,
  and `lcd_init` uses `SET_INPUT` instead of `pinMode`.

For U8Glib, a version between 1.14 and 1.17 was used, because

* 1.12 didn't have the extra speed argument to u8g_InitCom.
* 1.13 didn't have the soft reset instruction for UC1701 initialization.
* 1.18 has a new directory structure.

Quirks

* The value of PID_dT hints that F_CPU is 20M, but MarlinSerial.begin
  suggests it's indeed 16M (and the board uses 16M). Left at 16M for now.

* The LED and DOGLCD_CS are on the same pin.
2018-01-15 03:39:43 -06:00
Scott Lahteine
90125ab639 Merge pull request #9186 from thinkyhead/bf1_cooler_cr10s
[1.1.x] More featureful CR-10S configuration
2018-01-15 02:50:16 -06:00
Scott Lahteine
a16ae30a61 More featureful CR-10S configuration 2018-01-15 01:02:23 -06:00
Scott Lahteine
175207659a Merge pull request #9183 from thinkyhead/bf1_new_flsun_config
[1.1.x] Add FLSUN Kossel configuration
2018-01-15 00:49:25 -06:00
Scott Lahteine
5129eb1d43 More reliable temperature serial output? 2018-01-15 00:44:55 -06:00
Scott Lahteine
8f08e029d8 More up-front option to show SD percentage 2018-01-14 23:30:59 -06:00
Scott Lahteine
5c6c12dc3a Patch EEPROM for 32-bit 2018-01-14 23:18:45 -06:00
Scott Lahteine
734fa91e63 Misc config updates 2018-01-14 23:18:45 -06:00
Scott Lahteine
1d5eba4470 Add FLSUN Kossel configuration 2018-01-14 23:18:45 -06:00
Scott Lahteine
758d9db964 Link to marlinfw.org bitmap tool 2018-01-14 22:39:57 -06:00
Scott Lahteine
1d8b03964f Merge pull request #9164 from GMagician/1.1.x-SD-issues-fix
[1.1.x] sd issue fix
2018-01-14 20:47:04 -06:00
Sebastianv650
4fa0937a55 Fix missing deceleration steps
Marlin never reached final_speed after deceleration.
2018-01-14 17:09:47 +01:00
GMagician
82dc89bfd2 Save some program memory
This will save some program memory with no speed lose
2018-01-13 09:46:54 +01:00
GrantM11235
a0bd811093 [1.1.x] Fix support for Malyan M150 (#9146)
Implements changes to LCD and encoder pins from
forums.reprap.org/read.php?110,716538,728278 and also sets
ST7920_DELAY_[1-3] to DELAY_2_NOP to be compatible with the slower LCD
2018-01-12 01:14:07 -06:00
Scott Lahteine
c1d6d24b9d Cleanup spacing, commentary 2018-01-11 18:52:54 -06:00
Sebastianv650
e2871f0dcd [1.1.x] Ensure smooth printer movements (#9149)
- Never execute a block without an up-to-date trapezoid
- Start blocks with MINIMUM_PLANNER_SPEED, except when coming from a full stop
2018-01-11 18:50:18 -06:00
Bob-the-Kuhn
4393c3ef7f LCD_CONTRAST to uint16_t for 1.1.x parity (#9148) 2018-01-11 18:32:41 -06:00
Scott Lahteine
59d48b9b1f Merge pull request #9143 from thinkyhead/bf1_Creality_CR-10S
[1.1.x] Creality CR-10S configurations
2018-01-11 01:24:44 -06:00
Scott Lahteine
e8b1bbac83 Creality CR-10S configurations
Provided by printedsolid.com
2018-01-11 01:03:34 -06:00
Scott Lahteine
885200f833 Bring other configs up-to-date 2018-01-11 01:03:34 -06:00
Scott Lahteine
044938bfd0 Merge pull request #9129 from thinkyhead/bf1_tmc_followup
[1.1.x] TMC followup
2018-01-10 23:07:15 -06:00
Scott Lahteine
ab7fb5b2e3 Use Arduino 1.8.5 for Travis CI 2018-01-10 05:23:06 -06:00
Scott Lahteine
3df0d62725 Updates to TMC support 2018-01-10 04:32:49 -06:00
Scott Lahteine
d1ce0bc071 M915 Z Axis Calibration 2018-01-09 18:55:08 -06:00
Scott Lahteine
9714c9aebe Merge pull request #9128 from fiveangle/bf1-disable_serial_stats_on_usbcon
[1.1.x] SERIAL_STATS_* features not supported on USBCON targets
2018-01-09 18:42:26 -06:00
Dave Johnson
2fcef3e8e2 Enable USE_ZMIN_PLUG on SCARA example (#9125) 2018-01-09 18:41:02 -06:00
Scott Lahteine
d7651ea0d0 Merge pull request #9122 from thinkyhead/bf1_eeprom_debug
[1.1.x] More EEPROM field debugging, 2.0.x parity
2018-01-09 18:33:24 -06:00
Dave Johnson
dd55c98139 SERIAL_STATS_* features not supported on USBCON targets 2018-01-09 16:27:57 -08:00
Scott Lahteine
bb5ba482bc More EEPROM field debugging 2018-01-09 18:10:33 -06:00
GMagician
5903b002ac 1.1.x semitec 104NT-4 added (#9120)
Table is very very similar to old 104-GT2 so I added only the name and recycled old ID
2018-01-09 16:53:44 -06:00
Scott Lahteine
97b6eabe0c Merge pull request #9103 from zarthcode/patch-2
fix fwretract structure reference #9102
2018-01-08 19:27:18 -06:00
Anthony
1326eb4ef7 fix fwretract structure reference #9102
Marlin_main.cpp: In function 'void resume_print(const float&, const float&, int8_t)':

Marlin_main.cpp:6646: error: 'retract_length' was not declared in this scope
         do_pause_e_move(-retract_length, fwretract.retract_feedrate_mm_s);
                          ^
2018-01-08 18:48:19 -06:00
Scott Lahteine
0eee55c0dd Patch TMC current read from EEPROM 2018-01-07 20:49:43 -06:00
Scott Lahteine
f8dee4e726 Merge pull request #9088 from thinkyhead/bf1_mbl_localize
[1.1.x] MBL cleanup, has_mesh() method
2018-01-07 20:10:10 -06:00
Tannoo
2c3bdfe2ea [1.1.x] UBL Mesh Storage Message (#9094) 2018-01-07 20:07:20 -06:00
Scott Lahteine
ffeb4495fe Make mbl.has_mesh() a method 2018-01-07 18:14:37 -06:00
Scott Lahteine
be555e3578 Move MBL functions into the class 2018-01-07 18:14:37 -06:00
Scott Lahteine
eec97a5cf1 Don't wrap mbl.h in conditionals 2018-01-07 00:24:46 -06:00
Scott Lahteine
fa3709451b Set mbl.has_mesh on manual point entry
Based on #9086
2018-01-06 23:32:00 -06:00
Scott Lahteine
eaa6257baf Fix M503 skew output
Followup to 1761cacaa1
2018-01-06 20:53:33 -06:00
Scott Lahteine
f2fd9ab1b0 Merge pull request #9081 from thinkyhead/bf1_patch_m5
[1.1.x] Set laser/spindle PWM to lowest speed on M5
2018-01-06 15:29:51 -06:00
Someone Unknown
b5e98ac1b7 Set laser/spindle PWM to lowest speed on M5 2018-01-06 14:01:58 -06:00
Scott Lahteine
b83c49befb Merge pull request #9078 from GMagician/1.1.x-bmp-fix
[1.1.x] Clockwise bmp fix
2018-01-06 13:53:27 -06:00
GMagician
4cb35a285b Bmp fix
Clockwise arrow fixed
2018-01-06 19:08:37 +01:00
Bob-the-Kuhn
0b5b2a424c Merge pull request #9067 from MarlinFirmware/SD-detect
[bugfix-1.1.x] SD card detect fix
2018-01-05 20:32:33 -06:00
Bob-the-Kuhn
0868907359 works 2018-01-05 19:12:34 -06:00
Scott Lahteine
670df2ea6d Settings FIELD_TEST fix 2018-01-05 19:12:22 -06:00
Scott Lahteine
0970dbcdf3 Merge pull request #9017 from thinkyhead/bf1_better_eeprom_init
[1.1.x] New EEPROM powers
2018-01-05 18:19:27 -06:00
Scott Lahteine
fbda8a2e2b UBL G29 works without settings.load 2018-01-05 15:47:52 -06:00
Scott Lahteine
3d34dddbc0 Squish lcd_advanced_pause_show_message 2018-01-05 15:47:52 -06:00
Scott Lahteine
3b3b7e09ec Add FIELD_TEST to validate storage 2018-01-05 15:47:52 -06:00
Scott Lahteine
5d26f88bd5 Add data size validation 2018-01-05 15:47:52 -06:00
Scott Lahteine
51977c64ee Add a struct defining EEPROM storage 2018-01-05 15:47:51 -06:00
Scott Lahteine
42216f52ab Add MarlinSettings::validate() 2018-01-05 14:40:20 -06:00
Scott Lahteine
760c4e94d5 Write filler for disabled volumetrics 2018-01-05 10:20:17 -06:00
Scott Lahteine
a4e0fd7883 Pretty up TMC current write 2018-01-05 10:20:16 -06:00
Scott Lahteine
2287fa126c Whitespace cleanup 2018-01-05 10:19:15 -06:00
Scott Lahteine
fd4f49512d Merge pull request #9054 from thinkyhead/bf1_fwretract_class
[1.1.x] FWRetract class for 2.0.x parity
2018-01-04 19:40:32 -06:00
MD
7d8acb8def [1.1.x] CheapTRONIC v2.0 pins additions/revisions (#9030) 2018-01-04 18:34:47 -06:00
Scott Lahteine
e7bf7e6031 Make FWRetract class for 2.0.x parity 2018-01-04 17:54:24 -06:00
Scott Lahteine
518d9beb83 Merge pull request #9053 from thinkyhead/bf1_parser_squish
[1.1.x] Reduce process_parsed_command lines
2018-01-04 17:06:14 -06:00
Scott Lahteine
2ed4d4a30a Squish down process_parsed_command 2018-01-04 16:30:12 -06:00
Roxy-3D
d2dc7a53c2 use SERIAL_EOL(); instead of new line string 2018-01-04 16:18:00 -06:00
Roxy-3D
80cc860810 Use SERIAL_EOL(); instead of passing new line string 2018-01-04 16:16:28 -06:00
Roxy-3D
39289a6952 add precision to planner.xy_skew_factor so it doesn't print as 0.00 2018-01-04 16:11:05 -06:00
Roxy-3D
1761cacaa1 Add precision to planner:xy_skew so it doesn't print as 0.00 2018-01-04 16:07:20 -06:00
Scott Lahteine
f33b405152 M603 report in load/unload order 2018-01-04 05:20:56 -06:00
revilor
aec65112b5 Fix for issue #9005, #8942 - Bed PID autotuning (#9037) 2018-01-04 03:26:29 -06:00
Scott Lahteine
cce91eef61 Patch M701 get extruder arg 2018-01-04 02:13:10 -06:00
Scott Lahteine
46a839cbca No default needed 2018-01-03 22:52:25 -06:00
Scott Lahteine
c5e31b1723 Merge pull request #9032 from tcm0116/1.1.x-ultralcd
[1.1.x] Fix 'lcd_temp_menu_e0_filament_change' was not declared error
2018-01-03 21:34:37 -06:00
Scott Lahteine
20d55e5fed Merge pull request #9039 from thinkyhead/bf1_m303_bughunt
[1.1.x] Cleanup, commentary of M303 pid tuning code
2018-01-03 21:33:59 -06:00
Scott Lahteine
01e3ccfd69 Cleanup, commentary of M303 pid tuning code 2018-01-03 20:48:43 -06:00
Scott Lahteine
36541d61ab Merge pull request #9038 from thinkyhead/bf1_fix_resume_pos
[1.1.x] Fix resume_print positioning
2018-01-03 20:46:50 -06:00
Scott Lahteine
a436e89b83 Fix resume_print positioning 2018-01-03 20:12:44 -06:00
Thomas Moore
faf7dda9d3 Fix 'lcd_temp_menu_e0_filament_change' was not declared error 2018-01-03 19:18:34 +00:00
Tannoo
d3139e47f8 [1.1.x] EEPROM init fix (#9002) 2018-01-03 04:28:15 -06:00
Scott Lahteine
c893a90d64 Merge pull request #8988 from tcm0116/1.1.x_ubl
[1.1.x] Fix UBL compilation warnings
2018-01-02 21:37:59 -06:00
Thomas Moore
586d50ff99 Fix UBL compilation warnings 2018-01-02 19:41:02 -06:00
Scott Lahteine
ba9879f8fa Merge pull request #9008 from karkla/bugfix-1.1.x
[1.1.x] Update pins_MKS_BASE.h with Microstepping pin definitions
2018-01-01 18:47:59 -06:00
Scott Lahteine
3cd48db9a9 Merge pull request #8983 from ABH10/bugfix-1.1.x_thermistor-tables
[1.1.x] Update of comments in thermistor table files. No functional changes.
2018-01-01 18:40:29 -06:00
karkla
454a8ae26a Update pins_MKS_BASE.h
Microstepping Pins (reverse engineered at V1.4)
Some new batches have the HR4982 (Heroic) instead of the A4982 (Allegro) as stepper driver. While most of the functionality is similar, the HR variant obviously doesn't work with diode smoothers (no fast decay). But the Heroic has a 128 µStepping mode where the A4982 is doing quarter steps (MS1=L / MS2=H). To achieve comfortable tests with the M350/M351 commands, the following definitions have to made.
2018-01-02 01:29:27 +01:00
Scott Lahteine
9de9e37539 Some temperature code cleanup 2018-01-01 18:03:43 -06:00
Roxy-3D
949191215b Z BabyStepping should not be dependent on a bed leveling system being active 2018-01-01 14:39:28 -06:00
Arne Husth
decf844788 Update of comments in thermistor table files. No functional changes. 2017-12-31 14:46:56 +01:00
Scott Lahteine
0640bd0282 Version 1.1.8 2017-12-31 01:50:08 -06:00
Scott Lahteine
21ba70d587 Fixups for 1.1.8 2017-12-31 01:50:00 -06:00
Scott Lahteine
642dec3625 Fix typo in delta buffer_line call
Fix #8901
2017-12-31 01:38:36 -06:00
Scott Lahteine
8e82dd0b5b Merge pull request #8947 from houseofbugs/bugfix-1.1.x
[1.1.x] SLIM_LCD_MENUS option
2017-12-31 00:56:10 -06:00
Scott Lahteine
5f13e2e336 Merge pull request #8977 from thinkyhead/bf1_sync_up_configs
[1.1.x] Synchronize configs with 2.0.x
2017-12-31 00:55:39 -06:00
Scott Lahteine
4153d76810 Update Marlin_main.cpp 2017-12-31 00:24:57 -06:00
houseofbugs
a66811a597 A specific option to SLIM_LCD_MENUS 2017-12-31 00:15:24 -06:00
Scott Lahteine
839dd66c3b Synchronize configs with 2.0.x 2017-12-31 00:02:22 -06:00
Scott Lahteine
7a8c132ee9 Apply SLIM_LCD_MENUS to example configs 2017-12-30 23:52:53 -06:00
Scott Lahteine
1e18d716c2 Merge pull request #7107 from tcm0116/load_unload
[1.1.x] Add M701 and M702 filament load and unload
2017-12-30 23:34:16 -06:00
Thomas Moore
81193e9338 Add M701 / M702 filament load / unload 2017-12-30 19:48:21 -06:00
Scott Lahteine
d1cad5afa4 Apply FILAMENT_LOAD_UNLOAD_GCODES to example configs 2017-12-30 18:22:31 -06:00
Scott Lahteine
2a535bdce8 Followup to #8964 2017-12-30 16:47:26 -06:00
Claus Näveke
52244f690e Add example config for Tronxy X1 (#8964) 2017-12-30 16:38:42 -06:00
Scott Lahteine
eaf681675a Merge pull request #8965 from thinkyhead/bf1_better_no_reentry
[1.1.x] ultralcd.cpp: Improve no_reentry, use when queuing G-code
2017-12-30 04:24:24 -06:00
Scott Lahteine
2385c06696 Apply some PGM_P pointers 2017-12-30 04:16:50 -06:00
Scott Lahteine
81e0f5bc7d Single pause flag also indicates SD print pause 2017-12-30 04:16:50 -06:00
Scott Lahteine
18e277d9d3 Enqueue commands properly in ultralcd.cpp 2017-12-30 04:16:50 -06:00
Scott Lahteine
025a4558fb Merge pull request #8944 from zarthcode/patch-1
Fix malformed Capabilities report
2017-12-28 21:06:23 -06:00
Scott Lahteine
85ca7fed93 Show bedlevel with Bed temp indicator
…and display a third extruder on character display
2017-12-28 20:21:47 -06:00
Anthony
7637eb863a Fix malformed Capabilities report 2017-12-28 20:03:44 -06:00
Scott Lahteine
f9b7659b56 Merge pull request #8907 from marcio-ao/bugfix-1.1.x
[1.1.x] Multi extruder support for M600 / LCD
2017-12-27 01:30:32 -06:00
Marcio Teixeira
6195f7810a Multi extruder support for M600 and LCD (FR #8672) 2017-12-26 22:59:05 -06:00
Scott Lahteine
ecba9b6738 Merge pull request #8897 from thinkyhead/bf1_lcd_click_redraw
[1.1.x] Clear lcd_clicked on use
2017-12-26 20:54:31 -06:00
Scott Lahteine
93e3b3d5ba Merge pull request #8911 from houseofbugs/patch-1
[1.1.x] Fix NO_VOLUMETRICS compile error
2017-12-26 20:25:20 -06:00
Scott Lahteine
417bdb0488 Fix bug in NO_VOLUMETRICS 2017-12-26 19:56:22 -06:00
Timothy Hoogland
8ea3b29c17 Fix NO_VOLUMETRICS compile error 2017-12-26 19:32:09 -06:00
Scott Lahteine
81f1001b2c Clear lcd_clicked immediately on use 2017-12-25 21:50:58 -06:00
Scott Lahteine
dcd405275c Merge remote-tracking branch 'upstream/bugfix-1.1.x' into release_version_118 2017-12-25 09:50:57 -06:00
Scott Lahteine
99f98890c2 Merge pull request #8892 from thinkyhead/bf1_action_on_action
[1.1.x] Fixes for G29 / 3POINT
2017-12-25 09:08:02 -06:00
Scott Lahteine
5f0026893f Fix some compiler warnings 2017-12-25 08:51:35 -06:00
Scott Lahteine
4f943a73bc Fixes for G29 / 3POINT 2017-12-25 08:35:47 -06:00
Scott Lahteine
e31923be8d lcd_map_control deps on ULTIPANEL 2017-12-25 07:44:32 -06:00
Scott Lahteine
395235a529 Merge pull request #8891 from thinkyhead/bf1_action_on_action
[1.1.x] Allow consecutive uses of G29
2017-12-25 07:30:04 -06:00
Scott Lahteine
55848a4bd8 Allow consecutive uses of G29 2017-12-25 06:32:55 -06:00
Scott Lahteine
19e768d43d Merge pull request #8849 from silentninja1/patch-3
[1.1.x] //Actions on Pause / Resume (M600, M125, etc.)
2017-12-25 04:41:37 -06:00
Scott Lahteine
3c7cdcdc22 General cleanup of config-store, reset_bed_level 2017-12-25 04:23:52 -06:00
Scott Lahteine
e0d487e339 Update TMC2208 config store 2017-12-25 04:08:39 -06:00
Scott Lahteine
defff1e4a8 Fix GT2560 A+ servo pins 2017-12-25 02:20:13 -06:00
Scott Lahteine
05a6d48753 Tweak to M125 code 2017-12-25 01:33:46 -06:00
silentninja1
b12eb33feb Add support for pause and resume action commands on M600 2017-12-25 01:28:17 -06:00
Scott Lahteine
00749d8ef0 Add pause/resume action to example configs 2017-12-25 01:28:16 -06:00
Thomas Moore
59d047c1d7 [1.1.x] Use NOZZLE_PARK_FEATURE for ADVANCED_PAUSE_FEATURE (#8864)
* Use NOZZLE_PARK_FEATURE for ADVANCED_PAUSE_FEATURE
2017-12-24 23:47:05 -06:00
Scott Lahteine
fb6b62a01b Comment return false in motion functions 2017-12-24 22:56:56 -06:00
Scott Lahteine
1bb5791e64 Merge pull request #8888 from thinkyhead/bf1_reduce_jerk_default
[1.1.x] Reduce default jerk
2017-12-24 21:48:39 -06:00
Scott Lahteine
e47316c9d3 Tweak cleaning buffer / SD finished command 2017-12-24 20:33:58 -06:00
Scott Lahteine
88c0688961 Reduce default jerk. XY by half. Z by 1/4 2017-12-24 19:49:51 -06:00
Scott Lahteine
aa9cad0cc6 Merge pull request #8870 from petrzjunior/bugfix-1.1.x
[1.1.x][Language] Update Czech for Dec 2017
2017-12-24 18:48:37 -06:00
Scott Lahteine
0950527437 Fix WELCOME_MSG in PT
From #8879
2017-12-24 18:45:16 -06:00
Scott Lahteine
b7306ef07f Fix WELCOME_MSG in PT
From #8879
2017-12-24 18:42:50 -06:00
Petr Zahradník
0fc3fea8df Update Czech language Dec 2017 2017-12-22 18:33:11 +01:00
Scott Lahteine
b5677907d0 Minor speedup for SCARA scaling
And cleanup of Delta IK macros...
2017-12-21 22:39:06 -06:00
Scott Lahteine
6f40d57e14 Merge pull request #8851 from thinkyhead/bf1_more_scara_scaling
[1.1.x] SCARA Feedrate Scaling for G2/G3 - using HYPOT
2017-12-21 21:35:19 -06:00
Scott Lahteine
20f6a4582d Version 1.1.7 2017-12-21 17:05:52 -06:00
Scott Lahteine
e0dba46271 Merge latest bugfix-1.1.x 2017-12-21 17:05:20 -06:00
Scott Lahteine
2aaf66b789 Merge pull request #8847 from thinkyhead/bf1_restore_position_float
[1.1.x] Restore position_float to LIN_ADVANCE
2017-12-21 16:33:46 -06:00
Scott Lahteine
fdd85a529a Feedrate scaling for G2/G3 2017-12-20 19:33:16 -06:00
Scott Lahteine
477e36afab Revert "[bugfix-1.1.x] COREXY stutter moves (planner.cpp changes) (#8697)"
This reverts commit 86b65e52c4.
2017-12-20 15:59:56 -06:00
Scott Lahteine
1068798465 Restore position_float to LIN_ADVANCE 2017-12-20 06:58:42 -06:00
Scott Lahteine
4f375cd17d Match sign for filwidth across vars 2017-12-20 00:17:32 -06:00
Thomas Moore
98159c0507 [1.1.x][PlatformIO] Stop compiling after first five errors (#8828) 2017-12-19 23:59:19 -06:00
Scott Lahteine
ea345b1db7 Merge pull request #8738 from lumbric/bugfix-1.1.x
Add missing CPP files to Make file, fixes #8731
2017-12-19 23:46:23 -06:00
Scott Lahteine
51a0f7aaba Merge pull request #8845 from thinkyhead/bf1_no_volumetrics
[1.1.x] One setting to validate filament width
2017-12-19 23:31:14 -06:00
Scott Lahteine
ab7f1a0608 A single setting to validate filament width 2017-12-19 21:34:30 -06:00
Scott Lahteine
201bbaacfc Merge pull request #8844 from thinkyhead/bf1_no_volumetrics
[1.1.x] Add option for NO_VOLUMETRICS
2017-12-19 21:14:26 -06:00
Scott Lahteine
3929deed10 Add VOLUMETRIC capability item 2017-12-19 20:33:57 -06:00
Scott Lahteine
435981056e Option to disable all volumetric extrusion 2017-12-19 20:33:41 -06:00
Scott Lahteine
e6f46f3832 Add NO_VOLUMETRICS to example configs 2017-12-19 20:32:40 -06:00
Scott Lahteine
1aea024589 Remove redundant serial sanity check 2017-12-19 19:07:20 -06:00
Scott Lahteine
ce6a691999 Fix #8839 - filament width sensor 2017-12-19 18:24:56 -06:00
Scott Lahteine
10d73155b0 Hide LEVELING item for probeless w/out LCD Leveling 2017-12-17 21:24:46 -06:00
Scott Lahteine
4b1b02a17d Cleanup M503 output for M420 2017-12-17 21:24:46 -06:00
Scott Lahteine
f0bca012a5 Merge pull request #8818 from thinkyhead/bf1_reverting_8735
[1.1.x] Revert #8735 "Initial step correction"
2017-12-17 20:59:27 -06:00
Scott Lahteine
56d355f8de Revert "[Bugfix-1.1.x] initial step correction (#8735)"
This reverts commit ec028bf747.
2017-12-17 02:04:44 -06:00
Scott Lahteine
f5fc851925 Sanity check parity with 2.0.x 2017-12-17 00:56:44 -06:00
Scott Lahteine
7378905053 Add MKS_12864OLED_SSD1306 to example configs
Followup to #8813
2017-12-16 19:58:34 -06:00
Scott Lahteine
76b0df6ba1 Merge pull request #8813 from drdelaney/bugfix-1.1.x
[1.1.x] Adding support for using the MKS_12864OLED with the SSD1306 controller
2017-12-16 18:10:57 -06:00
Dan Delaney
df8420aa62 Adding support for using the MKS_12864OLED with the SSD1306 controller 2017-12-16 17:44:34 -06:00
Scott Lahteine
72a047d549 Fix use_example_configs handling spaces in path 2017-12-16 17:32:32 -06:00
lumbric
3a511e4583 Add all CPP files to Makefile automatically
Fixes build errors occurring when AUTO_BED_LEVELING_UBL is enabled.
2017-12-16 20:29:47 +01:00
Scott Lahteine
e8d3ea803d Update README.md for bugfix 2017-12-15 20:14:25 -06:00
Scott Lahteine
c5a4230a6a Merge pull request #8760 from drdelaney/bugfix-1.1.x
[1.1.x] Support for Tronxy and Zonestar LCD
2017-12-15 19:21:22 -06:00
Dan Delaney
5249765508 Adding support for the Tronxy and Zonestar LCD
Code borrowed and modified from erikkallen/Marlin_tronxy.
Changed the ANET_KEYPAD_LCD to zonestar, since it is the same device.
I kept a define for ANET_KEYPAD_LCD to enable ZONESTAR_LCD.
2017-12-15 19:13:31 -06:00
Scott Lahteine
fdf83f1416 Apply ZONESTAR_LCD to example configs 2017-12-15 19:13:31 -06:00
Scott Lahteine
e1b998e40a More externs and functions in Marlin.h 2017-12-15 18:18:26 -06:00
Scott Lahteine
4277fcb32c Merge pull request #8790 from robpower/NanoDLP_Sync_improvement
[1.1.x] Extended NanoDLP_Z_Move_Sync to G4 & G28,Added option for all axis.
2017-12-15 16:25:02 -06:00
Scott Lahteine
9a4af6bd7c Add NANODLP_ALL_AXIS to config examples 2017-12-15 16:05:29 -06:00
robpower
59265034ae Extended NanoDLP_Z_Move_Sync feature to G4 and G28, Added optional move_sync for all axis. 2017-12-15 16:05:29 -06:00
teemuatlut
0ac0324af2 [1.1.x] TMC driver update (#8712) 2017-12-15 15:02:39 -06:00
Scott Lahteine
f38f2ace5a Correct unskew, after all 2017-12-15 14:23:20 -06:00
Scott Lahteine
b10831d58e Merge pull request #8791 from fiveangle/bf1-HAS_HEAT_BED_conditional
[1.1.x] Missing HAS_HEAT_BED conditional
2017-12-15 13:47:24 -06:00
Dave Johnson
817eb5a5ba Missing HAS_HEAT_BED conditional
Fixes issue found in #8779
2017-12-15 11:36:36 -08:00
Scott Lahteine
f36f91dfb5 Reduce code with no heated bed 2017-12-13 17:59:17 -06:00
Scott Lahteine
172ea8c71c General code/bitmaps cleanup 2017-12-13 17:57:54 -06:00
Scott Lahteine
da9748fb21 Fix Planner::unskew parity with skew 2017-12-13 17:43:07 -06:00
Scott Lahteine
be58e137c5 Merge pull request #8772 from thinkyhead/bf1_filwidth_refinement
[1.1.x] Comment, fix filament width sensor
2017-12-13 16:25:59 -06:00
Scott Lahteine
8519451161 Comment, improve filament width sensor 2017-12-13 02:35:23 -06:00
Scott Lahteine
7c1adff8ad Separate Dual X un-park from movement 2017-12-11 03:12:59 -06:00
Scott Lahteine
eca1509cb2 Skew should apply per-segment
Segmented moves can account for skew points off the edge, while long regular cartesian moves may be off if the skewed destination point is outside movement bounds.

Followup to #8729
2017-12-11 03:12:59 -06:00
Scott Lahteine
17b05c150c Merge pull request #8729 from thinkyhead/bf1_sort_out_leveling
[1.1.x] UBL - Skew and Dual X Carriage
2017-12-11 01:40:20 -06:00
Scott Lahteine
bdf69db0a8 Extend Skew Correction to UBL 2017-12-11 01:31:14 -06:00
Scott Lahteine
ba48ce8586 Travis Test for non-segmented UBL 2017-12-11 00:20:29 -06:00
Scott Lahteine
5cce532a29 One or the other? 2017-12-11 00:20:29 -06:00
Scott Lahteine
a20eacaa48 UBL devel debugging flag 2017-12-11 00:20:29 -06:00
Scott Lahteine
4f042533a5 Fix DUAL_X_CARRIAGE with UBL segmented 2017-12-11 00:20:29 -06:00
Scott Lahteine
6e8da93c42 UBL_DELTA => UBL_SEGMENTED 2017-12-11 00:20:29 -06:00
Scott Lahteine
bb33a26e62 Apply const to axis args 2017-12-11 00:20:29 -06:00
Scott Lahteine
da2eaa6b09 Use array refs where possible 2017-12-11 00:20:29 -06:00
Scott Lahteine
8244284116 _buffer_line => buffer_segment 2017-12-11 00:20:28 -06:00
Scott Lahteine
db204c13f2 Merge pull request #8745 from thinkyhead/bf1_sync_M420_M852
[1.1.x] M852 skew changes position. And, position change reporting.
2017-12-10 23:13:49 -06:00
Scott Lahteine
08d9aeff41 Update current position in M852 2017-12-10 23:05:34 -06:00
Scott Lahteine
aa1b4eded6 Have M420 report a changed position 2017-12-10 23:05:34 -06:00
Scott Lahteine
684692091e Sync and report changed position 2017-12-10 23:05:34 -06:00
Scott Lahteine
ccca1ade2d Always report position on config load/reset 2017-12-10 23:05:33 -06:00
Scott Lahteine
dc9e469c4c Tweak M114 detail 2017-12-10 19:15:37 -06:00
Bob-the-Kuhn
ec028bf747 [Bugfix-1.1.x] initial step correction (#8735)
* tested

* forgot one item
2017-12-09 18:20:25 -06:00
Scott Lahteine
009920f393 Followup to #8713 2017-12-09 08:06:22 -06:00
Scott Lahteine
666d95285b Mention that segments interpolate more 2017-12-09 06:18:41 -06:00
Scott Lahteine
b692d91ca3 Merge pull request #8666 from jkur/bugfix-1.1.x
[1.1.x] Add board Mini RAMBo 1.0a
2017-12-09 00:06:13 -06:00
jkur
f4c31565bc Board definition and PIN assignments for Mini RAMBo1.0a 2017-12-08 23:41:34 -06:00
Scott Lahteine
cf0604da07 Use MB() for Megatronics 3.1 2017-12-08 23:39:47 -06:00
Scott Lahteine
55acb65e27 Updates for stepper parity with 2.0.x
Matching changes from #8725
2017-12-08 23:07:52 -06:00
Scott Lahteine
4f465c2d07 Merge pull request #8721 from thinkyhead/bf1_better_reverse_pass
[1.1.x] Improved Planner::reverse_pass
2017-12-08 21:20:23 -06:00
Scott Lahteine
77519e9f14 Tweaks to planner.h 2017-12-08 21:11:17 -06:00
AnHardt
22baf3356a Apply @AnHardt reverse_pass changes
Plus: 3 times 2 float / to 1 float / and 2 float *
      and, reciprocal is an optimized operation
2017-12-08 21:11:17 -06:00
Bob-the-Kuhn
360c553228 Merge pull request #8718 from Bob-the-Kuhn/1.1x-planner-speed-improvemenr
[bugfix-1.1.x] minor planner.cpp speed improvement (follow up to COREXY stutter changes PR #8697)
2017-12-08 18:40:41 -06:00
Scott Lahteine
b4d69527e6 Followup to #8716 2017-12-08 18:18:06 -06:00
Scott Lahteine
4aba382b01 Merge pull request #8715 from thinkyhead/bf1_followup_8713
Followup to #8713
2017-12-08 18:14:57 -06:00
Scott Lahteine
2c445743e9 Merge pull request #8716 from bjarchi/fix-11x-8604
[1.1.x] Fix for #8604
2017-12-08 18:09:38 -06:00
Bob-the-Kuhn
6f38814541 speed improvement 2017-12-08 18:02:57 -06:00
Scott Lahteine
7251850028 Followup to #8713
Fix indentation, use min for constraint, remove obsolete error check
2017-12-08 17:52:44 -06:00
Scott Lahteine
6eb268f63f Remove old UBL description text 2017-12-08 17:52:44 -06:00
Jonathan Barchi
ae547c3044 Nozzle.cpp: replace incorrect M_2_PI (2/pi) with 2.0 * M_PI 2017-12-08 15:33:24 -08:00
Roxy-3D
23dd2cb6e7 Better off mesh behavior for UBL (#8713)
* Better off mesh behaviour for UBL

* Spacing changes...
2017-12-08 16:36:03 -06:00
Scott Lahteine
8385cddd8d Followup to #8705 2017-12-08 03:48:24 -06:00
Scott Lahteine
ab5133514c Merge pull request #8707 from thinkyhead/bf1_splits_are_expendable
[1.1.x] Discard "continued" blocks on interrupted move
2017-12-08 02:29:13 -06:00
Scott Lahteine
75eb93140f Discard all CONTINUED blocks on interrupted move 2017-12-08 02:13:51 -06:00
Scott Lahteine
8be7a0b131 FORCE_INLINE before static 2017-12-08 01:31:59 -06:00
Scott Lahteine
cd6468d6de Fix TEMP_BED_PIN for Mightyboard Rev.E
Based on #8685
2017-12-07 21:52:43 -06:00
Scott Lahteine
822254291f Merge pull request #8702 from bjarchi/fix-1.1.x-probe_bounds
Fix - Conditionals_post.h - allow overriding of [min,max] probe point
2017-12-07 21:49:04 -06:00
Scott Lahteine
e29bf84f06 Merge pull request #8705 from thinkyhead/bf1_multi_probe
[1.1.x] MULTIPLE_PROBING — Why stop at 2?
2017-12-07 21:21:30 -06:00
Scott Lahteine
44800e9899 PROBE_DOUBLE_TOUCH => MULTIPLE_PROBING 2017-12-07 16:46:06 -06:00
Scott Lahteine
6e85c060a9 Apply MULTIPLE_PROBING to example configs 2017-12-07 16:18:53 -06:00
Jonathan Barchi
7c6d33b0d2 Fix - Conditionals_post.h - allow overriding of [min,max] probe points as expected 2017-12-07 10:40:32 -08:00
Bob-the-Kuhn
86b65e52c4 [bugfix-1.1.x] COREXY stutter moves (planner.cpp changes) (#8697) 2017-12-07 00:08:48 -06:00
Scott Lahteine
6310a00d7e feed_factor => inverse_secs 2017-12-06 23:02:37 -06:00
Scott Lahteine
6b93d20e4e Sanity-check skew+UBL 2017-12-06 22:56:20 -06:00
Scott Lahteine
909fac6d90 Update commentary on M48 2017-12-06 22:50:13 -06:00
Scott Lahteine
6c328ec096 Merge pull request #8690 from thinkyhead/bf1_clean_blocks_on_trigger
[1.1.x] Purge blocks on endstop/probe hit
2017-12-06 22:26:08 -06:00
Scott Lahteine
1951d3a37a Simplify G26 user_canceled 2017-12-06 22:03:46 -06:00
Scott Lahteine
aa7236e03c Shorten error text in ubl::G29 2017-12-06 21:43:26 -06:00
Scott Lahteine
574153a810 No lcd_map_control needed in quick_stop 2017-12-06 21:43:26 -06:00
Scott Lahteine
3b30cc90f1 Clean on trigger instead of split_first_move flag 2017-12-06 21:43:26 -06:00
Scott Lahteine
f30b774f26 Merge pull request #8696 from thinkyhead/bf1_fixes_DEC6
[1.1.x] Cleanup, bugfixes, parity with 2.0.x
2017-12-06 21:41:38 -06:00
Scott Lahteine
1063b3b2b8 Changes for parity with 2.0.x 2017-12-06 21:19:17 -06:00
Scott Lahteine
93560836de Allow buffer clean without release command 2017-12-06 21:12:55 -06:00
Scott Lahteine
ff26b7446c Standardize LCD interface code for UBL a little 2017-12-06 21:12:55 -06:00
Scott Lahteine
7b6ad28a5d General UBL/G26 code cleanup 2017-12-06 21:12:55 -06:00
Scott Lahteine
5d01a2f467 Move temperature reporting to Temperature class 2017-12-06 21:12:55 -06:00
Scott Lahteine
6e197d4a42 Fix M503 S parameter 2017-12-06 21:12:55 -06:00
Scott Lahteine
a5b20fec2f Whitespace clean 2017-12-06 16:19:49 -06:00
Scott Lahteine
348e989a50 Merge pull request #8687 from AnHardt/1_first_move_probing_homing
[1.1.x] Don't split first_move while homing or probing
2017-12-06 11:54:44 -06:00
AnHardt
b19846aca1 Don't split first_move while homing or probing
While homing or probing it might be bad if the stop/trobe triggers during the first part and the second is still in the buffer.
2017-12-06 14:56:37 +01:00
Scott Lahteine
d951ba83e6 Show "Level Bed Corners" item with UBL too
Addressing #8676
2017-12-05 21:56:04 -06:00
Scott Lahteine
203a445bc1 Minimal include for speed_lookuptable 2017-12-05 21:44:59 -06:00
Scott Lahteine
9edefa645d Remove skew warning that could crash the planner 2017-12-05 20:25:53 -06:00
Scott Lahteine
4608e1f590 Merge pull request #8681 from thinkyhead/bf1_pidtempbed_fix
[1.1.x] Change K1 to required option PID_K1
2017-12-05 20:11:52 -06:00
Scott Lahteine
794f8f1329 Update K1 => PID_K1 2017-12-05 19:59:01 -06:00
revilor
b1f3dfab28 Fix for #8669 (#8677) 2017-12-05 19:40:57 -06:00
Scott Lahteine
2d6c84a817 Cleanup constexpr in planner.cpp 2017-12-05 18:54:25 -06:00
Scott Lahteine
23291a0466 Fix SKEW_CORRECTION without leveling 2017-12-05 18:47:19 -06:00
Scott Lahteine
83a1a70103 Creality pins spacing, MINIPANEL CS pin 2017-12-05 02:00:33 -06:00
Scott Lahteine
47f6fc1e07 Set initial endstops state
Addressing #8662
2017-12-05 01:08:39 -06:00
Scott Lahteine
88b34d2bb6 Merge pull request #8655 from kein0r/bugfix-1.1.x
Added Support for RAMPS 1.4 Plus board
2017-12-05 01:07:19 -06:00
kein0r
f36fdc74ac Added RAMPS v1.4 Plus board
Conflicts:
	Marlin/boards.h
2017-12-05 00:43:02 -06:00
Scott Lahteine
ff258d43e7 Merge pull request #8661 from lumbric/bugfix-1.1.x
Add missing library in Makefile
2017-12-04 23:50:34 -06:00
Scott Lahteine
d8ef6faa80 Cleanup for dogm_bitmaps 2017-12-04 21:19:59 -06:00
Scott Lahteine
59eb77fd28 One fewer move required… 2017-12-04 20:35:33 -06:00
lumbric (antares)
dde0e9ee0a Add missing library in Makefile
When using RELOC_WORKAROUND library needs to be linked explicitly, otherwise
eeprom functions are not available.

Thanks to @rfjakob for finding the crucial hint to solve this issue.
2017-12-05 00:20:58 +01:00
Dave Johnson
860d98a897 [1.1.x] SERIAL_XON_XOFF not supported on USB-native AVR devices (#8653)
* SERIAL_XON_XOFF not supported on USB-native AVR devices

User could enable SERIAL_XON_XOFF on USB-native devices and it would not be enabled without warning, but M115 would report the capability as available.
2017-12-04 16:48:19 -06:00
Scott Lahteine
3abd307691 Merge pull request #8658 from thinkyhead/backup_1_split_first
[1.1.x] Split first move to planner for better chaining
2017-12-04 16:17:14 -06:00
Scott Lahteine
000818f5e4 Split first move to planner for better chaining 2017-12-04 15:43:28 -06:00
Scott Lahteine
1bbf55a7f7 Merge pull request #8648 from thinkyhead/bf1_planner_split_first
[1.1.x] Revert PR #8608 — split first planner move
2017-12-03 17:58:36 -06:00
Scott Lahteine
298a357a43 Revert "Merge pull request #8608 from thinkyhead/bf1_planner_split_first"
This reverts commit 0eef0ff0de, reversing
changes made to d8582b7506.
2017-12-03 17:49:24 -06:00
Scott Lahteine
44d2c5ef88 Fix M49 console hang 2017-12-03 03:36:12 -06:00
Scott Lahteine
1600f7d4ee Merge pull request #8635 from fiveangle/bf1_report_xonxoff
[1.1.x] Report SERIAL_XON_XOFF in M115
2017-12-03 02:19:28 -06:00
Scott Lahteine
71a4c04dd5 Merge pull request #8636 from thinkyhead/bf1_ubl_uses_LSL
[1.1.x] Use custom segment length for UBL Cartesian
2017-12-03 01:57:32 -06:00
Scott Lahteine
0eef0ff0de Merge pull request #8608 from thinkyhead/bf1_planner_split_first
[1.1.x] Split first planner move for better chaining
2017-12-03 01:50:58 -06:00
Scott Lahteine
1d0ee83e18 Split first move to planner for better chaining
Address #8573, #8595
2017-12-03 01:44:33 -06:00
Scott Lahteine
db8631e49a Use custom segment length for UBL Cartesian 2017-12-03 00:02:28 -06:00
Unknown
2e295759f2 [1.1.x] Report SERIAL_XON_XOFF in M115
-Report SERIAL_XON_XOFF in Extended Capabilites M115 report for hosts
-Remove outdated 256 size limitation from comments on RX_BUFFER_SIZE defines
config updates
-Update error checking conditions
2017-12-02 21:02:02 -08:00
Scott Lahteine
d8582b7506 Bring configurations up to date 2017-12-02 21:42:36 -06:00
dot-bob
7f656b867f Example configuration files for the Wanhao Duplicator 6 for bugfix-1.1.x (#8614)
* Add default configuration files for the Wanhao Duplicator 6.

* Update Configuration.h
2017-12-02 21:31:14 -06:00
Scott Lahteine
077fed1d88 Fix a homing comment 2017-12-02 20:57:35 -06:00
Scott Lahteine
152c5d2616 Followup to #8613 2017-12-02 20:47:33 -06:00
Scott Lahteine
26c5bbc5a7 Rename inverse_mm_s => inverse_secs 2017-12-02 20:13:31 -06:00
Jonathan Barchi
344e6b857a configuration_store.cpp: Fix in MarlinSettings::load for updated size of DELTA variables (#8630) 2017-12-02 19:04:52 -06:00
Roxy-3D
81e52138cc More corrections for Bi-Linear to work with G26 2017-12-02 14:13:19 -06:00
Roxy-3D
a27a9b63e4 Get Bi_Linear macros correct to work with G26
G26 uses logic that looks like:
```
ex = _GET_MESH_X(i + 1) - (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS));
```
The Bi-Linear macros need parenthesis to work correctly.
2017-12-02 14:04:41 -06:00
Scott Lahteine
8b7c274db5 Comment/cleanup motion code 2017-12-02 01:42:37 -06:00
Scott Lahteine
7bed539fdb Fix missing return values in G33_auto_tune 2017-12-02 01:06:14 -06:00
Scott Lahteine
e990fd23f1 Merge pull request #8623 from thinkyhead/bf1_skew_correction
[1.1] Skew Correction
2017-12-02 00:43:38 -06:00
Scott Lahteine
172ce67344 New feature: BED_SKEW_CORRECTION 2017-12-01 19:43:32 -06:00
Scott Lahteine
a8d83aec89 Add SKEW_CORRECTION to example configs 2017-12-01 19:43:31 -06:00
Scott Lahteine
38e5883d44 Apply const to thermal_runaway_protection args 2017-12-01 19:43:31 -06:00
Scott Lahteine
e7c6abd767 Update V45 Settings header 2017-11-30 22:26:21 -06:00
Roxy-3D
9f7405b3f0 Restore correct gMax 1.5+ G26 values 2017-11-30 18:11:01 -06:00
Scott Lahteine
d3f8111fe7 Use some int types in Planner 2017-11-30 18:03:51 -06:00
Scott Lahteine
ab43113f73 Merge pull request #8613 from thinkyhead/bf1_planner_parity
[1.1.x] Fix some planner bugs
2017-11-30 17:37:10 -06:00
Scott Lahteine
d1a807fdf8 Drop obsolete Planner::position_float 2017-11-30 17:28:40 -06:00
Scott Lahteine
8df42a84a4 Fix fade bug in (un)apply_leveling 2017-11-30 17:28:40 -06:00
Scott Lahteine
8f462b5717 Add Planner::set_filament_size for 2.0.x parity 2017-11-30 16:52:19 -06:00
Scott Lahteine
ace3e50898 Merge pull request #8488 from Tannoo/1.1.x-led_control_menu
[1.1.x] led control menu
2017-11-30 00:18:07 -06:00
Scott Lahteine
68c1f05aeb Cleanups/changes to led control menu 2017-11-30 00:04:43 -06:00
Scott Lahteine
1f770bb103 Config updates, spacing mainly 2017-11-29 20:57:38 -06:00
Tannoo
e25567a5dd New feature: LED_CONTROL_MENU 2017-11-29 20:57:38 -06:00
Scott Lahteine
9951f28892 Apply const to some planner vars 2017-11-29 20:57:38 -06:00
Scott Lahteine
83ab68b36f Merge pull request #8596 from thinkyhead/bf1_cartesian_segments
[1.1.x] Segmented mesh moves
2017-11-29 17:25:27 -06:00
Scott Lahteine
80929c2637 Apply SEGMENT_LEVELED_MOVES to example configs 2017-11-29 16:58:16 -06:00
Scott Lahteine
d786fb99e2 Add an option to segment leveled moves 2017-11-29 16:58:15 -06:00
Scott Lahteine
a0fc5f7b52 Minor planner.cpp style changes 2017-11-29 15:00:33 -06:00
Scott Lahteine
a6d39b7192 Fix up git helper scripts 2017-11-28 19:03:35 -06:00
Scott Lahteine
ea87cd975d Tweak to check_axes_activity 2017-11-28 18:39:29 -06:00
Scott Lahteine
417a82fd95 #8589 followup 2017-11-28 17:58:47 -06:00
Scott Lahteine
b781f76711 Merge pull request #8589 from fiveangle/bf11_babystepping_travis_options
[1.1.x] Additional Travis BABYSTEPPING tests
2017-11-28 17:53:17 -06:00
Dave Johnson
228d6050a4 Additional Travis BABYSTEPPING options for AVR 2017-11-28 17:49:26 -06:00
Scott Lahteine
fd50f452ff Whitespace cleanup 2017-11-28 17:49:25 -06:00
Scott Lahteine
6eedb64777 Merge pull request #8586 from AnHardt/1_Fix_WDTO_during_long_DELTA_moves
[1.1.x] Fix WDTO during long delta moves
2017-11-28 17:27:08 -06:00
Scott Lahteine
46776de90b Fix M290 boolval bug
Fix #8577
2017-11-28 17:25:14 -06:00
Scott Lahteine
dfcef11bca Fix #8579
Fan speed code fell into a curly brace
2017-11-28 16:09:37 -06:00
AnHardt
f1757f30cb Fix Watchdog time out during long lasting DELTA moves
During long lasting moves of a delta machine neither the temperatures are maintained nor buttons checked nor ... .
The fix is to call 'manage_heater()' and 'idle()' every now and then in the loop where the move is segmented. 
The code is abot the same as in G2_G3 wher we had the same problem with too large circles lasting too long.
Fixing #7510
2017-11-28 17:10:18 +01:00
Scott Lahteine
ddab1533c5 Simplify midpos calculation 2017-11-27 14:01:42 -06:00
Scott Lahteine
44c7f86f49 Merge pull request #8574 from thinkyhead/push_to_upstream
[1.1.x] Make MBL work more like PROBE_MANUALLY
2017-11-27 12:54:54 -06:00
Scott Lahteine
915c4b9ce2 Make MBL work more like PROBE_MANUALLY 2017-11-27 00:09:23 -06:00
Scott Lahteine
d7cc26cc17 Allow override of probe bounds in configs 2017-11-26 20:57:00 -06:00
Scott Lahteine
5bc5ba7ee3 More reliable set characters after bootscreen 2017-11-26 20:02:51 -06:00
Scott Lahteine
82df656cc7 Tweak readDir code 2017-11-26 18:23:34 -06:00
Scott Lahteine
51d09bb9c9 Tweak BLOCK_BUFFER_SIZE config 2017-11-26 17:33:33 -06:00
Scott Lahteine
5a1f1305f0 SD Menu patches 2017-11-26 01:10:06 -06:00
Scott Lahteine
3cf31205bc Tweaks to bed leveling menus 2017-11-26 00:06:10 -06:00
Scott Lahteine
26a40373fc Adjustments to blocking moves 2017-11-25 23:32:53 -06:00
Scott Lahteine
6b9e7defac M211 output in current workspace 2017-11-25 20:47:36 -06:00
Scott Lahteine
a63d9cc550 Loosen HAS_BED_PROBE definition 2017-11-25 20:10:03 -06:00
Scott Lahteine
1e84cded98 Parity with 2.0.x bitmap functions
Based on #8565
2017-11-25 19:56:22 -06:00
Scott Lahteine
bb0cc1bbbc Fix gcode_G26 error return 2017-11-25 19:51:03 -06:00
Scott Lahteine
941ffea81c Fix Micromake C1 config 2017-11-25 18:42:42 -06:00
Scott Lahteine
737cee4b8c Syntax tweaks 2017-11-25 18:15:16 -06:00
Scott Lahteine
d3165cca4f Move BABYSTEP_ZPROBE_GFX_OVERLAY up 2017-11-25 17:28:12 -06:00
Scott Lahteine
2060ba3556 M290 report on change, P0 to leave Probe Z Offset unchanged 2017-11-25 16:51:00 -06:00
Scott Lahteine
e56ead5e1c Followup to G33 patch 2017-11-25 16:01:55 -06:00
Scott Lahteine
4c93153194 Merge pull request #8556 from LVD-AC/1.1.x]-probe-errors
[1.1.x] G33 probe error handing
2017-11-25 15:51:55 -06:00
LVD-AC
8b9e68c32d [1.1.x] G33 probe error handing 2017-11-25 15:44:30 -06:00
Scott Lahteine
b2d3fffe74 Patches for M290, M851 2017-11-25 14:10:49 -06:00
Scott Lahteine
b5c5b175f1 Dont use Z_MIN_PROBE_ENDSTOP for DELTA 2017-11-24 18:28:27 -06:00
Thomas Moore
ecf19344f6 Initialize mixing virtual tools to behave like standard a multi-extruder setup (#6853)
* Initialize mixing virtual tools to behave like standard a multi-extruder setup

* Update Marlin_main.cpp

* Update Marlin_main.cpp
2017-11-24 18:06:32 -06:00
Scott Lahteine
b2473e57dd Apply LINEAR_UNIT to M503 output for M200 2017-11-24 17:31:00 -06:00
Scott Lahteine
d38aaa0c7e Merge pull request #8550 from thinkyhead/bf1_fix_probe_pt
Fix #8540
2017-11-24 17:15:05 -06:00
Scott Lahteine
8696f98c3b Merge pull request #8552 from revilor/bugfix-1.1.x
MK2_MULTIPLEXER does not require E2/E3 stepper pins
2017-11-24 17:14:25 -06:00
Scott Lahteine
adee17847c Fix #8540
Does it?
2017-11-24 17:05:42 -06:00
oliver
a7d82bd73b MK2_MULTIPLEXER does not require E2/E3 stepper pins 2017-11-24 23:58:37 +01:00
Scott Lahteine
de67c3f235 Merge pull request #8548 from thinkyhead/bf1_mesh_gfx_overlay
[1.1.x] Adapt MESH_EDIT_GFX_OVERLAY
2017-11-24 16:17:52 -06:00
Scott Lahteine
59a699063a Fix #8537 2017-11-24 15:54:03 -06:00
Scott Lahteine
ff800e08fd Phatter arrows for Z offset overlay 2017-11-24 15:54:03 -06:00
Scott Lahteine
c0190eff00 Adapt MESH_EDIT_GFX_OVERLAY for 1.1.x 2017-11-24 15:54:02 -06:00
Scott Lahteine
4e445f2c55 Keep Micromake C1 name on LCD? 2017-11-24 13:18:34 -06:00
Scott Lahteine
9da817eae0 Make LCD_LANGUAGE consistent in all configs 2017-11-24 13:18:34 -06:00
Scott Lahteine
a77e513443 Combine some travis tests 2017-11-24 13:06:18 -06:00
Scott Lahteine
664d386623 Merge pull request #8337 from robpower/NanoDLP_Z_Move_Sync
[1.1.x] Added optional NanoDLP Z movement synchronization
2017-11-24 12:55:58 -06:00
Scott Lahteine
7cf4009838 Fix MK2_MULTIPLEXER stepper indirection
Addressing #8544
2017-11-24 12:47:10 -06:00
Rob Power
f8e30f49d7 Add NanoDLP Z movement synchronization option
Implemented synchronization message output for NanoDLP printers (nanodlp.com).
If optional feature is enabled in `Configuration_adv.h`, Marlin will ouput "Z_move_comp" string to serial after completing any G0/G1 Z-axis movements. This feature patched on previous versions(1.0) is used by NanoDLP to synchronize Z-axis movement with projector exposure in DLP stereolithography printers.
2017-11-24 00:32:03 -06:00
Scott Lahteine
5c087727a9 Merge pull request #8522 from Roxy-3D/bugfix-1.1.x
[1.1.x] Make G26 work with other meshes too
2017-11-23 23:17:00 -06:00
Scott Lahteine
3b431f2f72 Arrange G26 functions in dependency order 2017-11-23 22:30:22 -06:00
Scott Lahteine
e5b43d48ee Apply G26 for meshes to all configs 2017-11-23 21:41:27 -06:00
Roxy-3D
8282d732c1 Make G26 work with all mesh leveling.
Example Configuration.h files are not updated yet.   You need to cross
your settings over to the default Configuration.h file in the \Marlin
directory.   (UBL_G26_MESH_VALIDATION enablement has moved to a new
location in the file.)
2017-11-23 21:41:27 -06:00
Scott Lahteine
82f41d6e46 fix fan kickstart 2017-11-23 21:40:31 -06:00
Scott Lahteine
b8c65078fc NEOPIXEL_RGBW_LED => NEOPIXEL_LED 2017-11-23 16:41:04 -06:00
Scott Lahteine
04419af419 Reorganize check_axes_activity 2017-11-23 15:29:35 -06:00
Scott Lahteine
ed6a5ff7e5 Merge pull request #8524 from GMagician/1.1.x-tool-change-bad-behaviour-fix
[1.1.x] Tool change bad behaviour fix
2017-11-22 20:23:02 -06:00
Scott Lahteine
956680104b Tweak char_mode init 2017-11-22 19:10:54 -06:00
Scott Lahteine
3958ff8627 Merge pull request #8526 from thinkyhead/bf1_lcd_init_charset
[1.1.x] Fix up LCD init / charset
2017-11-22 18:58:36 -06:00
Scott Lahteine
99b71c1dde Move lcd_map_control to UBL
For parity with bugfix-2.0.x
2017-11-22 18:45:55 -06:00
Scott Lahteine
73ddc762c8 Fix up LCD init / charset 2017-11-22 18:07:03 -06:00
GMagician
7a5b3a1e6a [1.1.x] Tool change bad behaviour fix
Just aligned with version 2.0. Here bug was not present
2017-11-22 23:51:07 +01:00
Scott Lahteine
e2568d7589 Fix delta_safe_distance_from_top 2017-11-22 14:11:04 -06:00
Scott Lahteine
0b1d754e7d Fix G42 2017-11-22 14:11:04 -06:00
Scott Lahteine
bbc2ee6da1 Don't re-init graphical LCD after boot screen
Followup to 13a3fb1acc
2017-11-21 18:21:50 -06:00
Scott Lahteine
6ebf8ea230 Merge pull request #8496 from GMagician/tool-change-fix-1.0
[1.1.x]  tool change bad behaviours
2017-11-20 20:36:42 -06:00
GMagician
b96ceb4256 [1.1.x] tool change bad behaviours
This PR will address two issues reported in #8492. Just one is left because I don't know if it is an issue or not

1) when no home is done ("no_move" is set) tool change should never move X & Y because... I don't know where I am...only Z should be adjusted to avoid bed collision if other nozzle is lower than current.
2) Since no move no bed level matrix should be applied
    When SWITCHING_NOZZLE is enabled and system is homed there are two movements to go to destination, but first can move Z to older position and then crash on the bed
2017-11-20 16:39:32 -06:00
Scott Lahteine
b6dbc4c5c1 Merge pull request #8426 from SteveGotthardt/bugfixes
[1.1.x]Update Anet A8 default values from my Anet A8 experience
2017-11-20 15:12:46 -06:00
Bob-the-Kuhn
12b018e619 Merge pull request #8487 from Bob-the-Kuhn/M43-compatibility-1.1.x
[1.1.x] M43 end pin correction/compatibility
2017-11-19 11:01:10 -06:00
Bob-the-Kuhn
9b80e1e04a change to L for end pin for M43 Toggle command 2017-11-18 13:48:53 -06:00
Scott Lahteine
bf6a1816b4 Display volumetric ratio in terms of E mm 2017-11-18 07:03:18 -06:00
Scott Lahteine
4f05a66ee1 Fixes #8472 2017-11-18 05:14:31 -06:00
Scott Lahteine
dcc9b0d437 Merge pull request #8458 from thinkyhead/bf1_no_mesh_alter
[1.1] No retroactive adjustment with M851 Z
2017-11-18 04:49:39 -06:00
Scott Lahteine
622d100c30 No retroactive changes with M851 Z 2017-11-18 03:37:07 -06:00
Scott Lahteine
74997a5251 Fix comment in planner.h 2017-11-18 02:30:41 -06:00
Roxy-3D
50148f7185 Update the UBL Probable Area for Delta's
This is a non-intuitive change.   @oldmcg says in this post https://github.com/MarlinFirmware/Marlin/issues/7572#issuecomment-340641207 that using DELTA_PRINTABLE_RADIUS is better than DELTA_PROBABLE_RADIUS for setting the probe limits.   This is because the automatic probe code checks all locations for being reachable by the probe prior to doing the probe.
2017-11-17 16:41:31 -06:00
Scott Lahteine
8f57a3e28a Apply coding standards to Max7219 code 2017-11-17 15:33:55 -06:00
Scott Lahteine
2511e869e2 Update Configuration.h 2017-11-16 23:18:55 -06:00
Scott Lahteine
aa612124f2 Merge pull request #8452 from tcm0116/1.1.x-pio_deps
[1.1.x] Fix PlatformIO dependencies
2017-11-16 22:54:15 -06:00
Scott Lahteine
3e050fb35a Merge pull request #8454 from GMagician/1.1.x-gitignore
[1.1] gitignore visual studio update
2017-11-16 22:39:30 -06:00
Scott Lahteine
3dee10636c Merge pull request #8459 from thinkyhead/bf1_filwidth_fix
[1.1] Fix FILAMENT_LCD_DISPLAY, disabled state, optimize
2017-11-16 17:58:51 -06:00
Scott Lahteine
eb3bdb7550 Fix FILAMENT_LCD_DISPLAY, disabled state, optimize 2017-11-16 17:46:08 -06:00
GMagician
33fdb9ab8b [1.1] visual studio update
aligned with marlin 2.0 gitgnore to support visual studio  community edition
2017-11-16 22:43:31 +01:00
Thomas Moore
97c19de8b9 Fix PlatformIO dependencies 2017-11-16 15:16:21 -06:00
Scott Lahteine
4e19c59ab3 Miscellaneous cleanup 2017-11-16 01:18:05 -06:00
Scott Lahteine
9cf5b96971 Fix M503 output for M145
Fixes #7978
2017-11-15 04:00:39 -06:00
Scott Lahteine
0eed5e0667 Merge pull request #8437 from thinkyhead/bf1_thermistor_ov
[1.1] Add OV() macro for thermistor tables
2017-11-15 03:50:42 -06:00
Scott Lahteine
69a710fef1 Add OV() macro for thermistor tables 2017-11-15 03:20:36 -06:00
Scott Lahteine
d2613ce077 Merge pull request #8432 from thinkyhead/bf1_fix_M32_subroutines
[1.1] Fix 'M32 P' subroutines
2017-11-15 02:31:21 -06:00
Scott Lahteine
f2e222b9e8 Merge pull request #8419 from RowanMeara/rm-dithering-1.1.x
[1.1.x] Fix Software Fan PWM
2017-11-15 02:29:59 -06:00
Scott Lahteine
a6ee4a0468 Apply SDCARD_SORT_ALPHA changes from 2.0.x 2017-11-15 01:09:13 -06:00
Scott Lahteine
d3b8f30818 Fix M32 P subroutine handling 2017-11-15 01:09:06 -06:00
Scott Lahteine
2390f6d3ab Cleanup, apply standards to SD lib, cardreader 2017-11-15 01:09:06 -06:00
Scott Lahteine
d8b1343279 Merge pull request #8431 from thinkyhead/bf1_fix_parser_value
[1.1] Fix parser value handling
2017-11-15 00:50:01 -06:00
Scott Lahteine
eacb6b6e8b Fix parser value handling 2017-11-14 23:23:22 -06:00
Steven Gotthardt
7efffc1548 Update Anet A8 default values from my Anet A8 experience 2017-11-14 10:47:30 -07:00
RowanMeara
10e366ebd7 Change dithering behavior to intended. 2017-11-14 00:36:35 -08:00
Scott Lahteine
95590adf07 Make sure leveled[] is enabled for use 2017-11-14 02:12:20 -06:00
Scott Lahteine
be67acbd48 Merge pull request #8417 from thinkyhead/bf1_M114_DETAIL
[1.1] Add M114_DETAIL to Configuration_adv.h
2017-11-14 00:28:48 -06:00
Scott Lahteine
8d06cf7b84 Add M114_DETAIL to Configuration_adv.h 2017-11-14 00:06:35 -06:00
Scott Lahteine
216f9b45cc Merge pull request #8411 from SteveGotthardt/AnetWarningFixes
[1.1] Fix compile warnings for REPRAPWORLD_KEYPAD
2017-11-13 22:33:11 -06:00
Steven Gotthardt
645b586041 Fix warnings for REPRAPWORLD_KEYPAD 2017-11-13 22:25:17 -06:00
Scott Lahteine
1962c13455 Merge pull request #8412 from thinkyhead/bf1_mesh_test_pins
[1.1] Move test extrusion options under G26
2017-11-13 21:22:42 -06:00
Scott Lahteine
069ec3f9a9 Move Filament Width Sensor to Configuration_adv.h 2017-11-13 21:06:40 -06:00
Scott Lahteine
56035e9965 Move mesh test options under G26 option 2017-11-13 21:06:40 -06:00
Scott Lahteine
4e3b566f72 Merge pull request #7286 from cscott/printrboard-rev-f
[1.1.x] Update pin definitions for PRINTRBOARD REV F.
2017-11-13 16:08:14 -06:00
Scott Lahteine
d65c99f38b Drop unused LARGE_FLASH option 2017-11-13 15:47:03 -06:00
Scott Lahteine
90c7d28055 Extrudrboard support for Printrboard Rev.F 2017-11-13 15:47:03 -06:00
Scott Lahteine
8b684637bc Merge pull request #8397 from RowanMeara/rm-M428-1.1.x
[1.1.x] Fix M428
2017-11-13 15:11:36 -06:00
Rowan Meara
d2df00bfca [1.1.x] Fix compilation warnings (#8395)
* Fix up Travis CI and compile warnings/errors

* No ULTRA_LCD with REPRAP_DISCOUNT_SMART_CONTROLLER

* No point in setting all the endstop plugs
2017-11-13 04:18:19 -06:00
Scott Lahteine
25ec0fecfa Apply native workspace fixes to G92, G53-59 2017-11-13 01:53:44 -06:00
RowanMeara
227b96b28b Fix M428
This fixes the old implementation of M428 which was broken, did not
match the website, and made no sense.
2017-11-13 01:34:43 -06:00
Scott Lahteine
a2fc7da587 Merge pull request #8398 from thinkyhead/bf1_fix_printrboard_pins
[1.1] Fix Printrboard pins for parity with 2.0
2017-11-13 01:07:18 -06:00
Scott Lahteine
a2c013c8c7 Fix LCD pins for Printrboard v1 2017-11-13 00:10:27 -06:00
Scott Lahteine
f27196214b Fix Printrboard pins for parity with 2.0 2017-11-13 00:03:11 -06:00
Scott Lahteine
aa616cd410 No leveling data in M114 without leveling 2017-11-12 23:06:16 -06:00
Scott Lahteine
5926159890 Fix report_current_position
Thanks @RowanMeara!
2017-11-12 22:57:57 -06:00
Roxy-3D
c9f88297b8 Provide more clearance for BL-Touch probe 2017-11-12 13:09:10 -06:00
Scott Lahteine
5cc87abb3a Merge pull request #8381 from thinkyhead/bf1_native_followup
[1.1] Remove offsets from soft endstops, tool change
2017-11-11 23:13:40 -06:00
Scott Lahteine
355dfed437 Coding standard patch of M290 2017-11-11 22:16:13 -06:00
Scott Lahteine
802ae73b13 Turn off laser power pin when PWM goes to 0 2017-11-11 22:02:19 -06:00
Scott Lahteine
549c814e8d Remove offsets from soft endstops, tool change 2017-11-11 21:28:32 -06:00
Scott Lahteine
564fbc8dec M290 constrain patch 2017-11-11 20:50:16 -06:00
Scott Lahteine
972248c333 Merge pull request #8357 from tcm0116/1.1.x-M600
[1.1.x] Normalize load/unload length in M600
2017-11-10 21:01:30 -06:00
Scott Lahteine
df44bcc5ae Use do_blocking_move_to where possible 2017-11-10 20:37:41 -06:00
Scott Lahteine
3293823642 Add pre-calculated planner.e_factor 2017-11-10 20:09:59 -06:00
Scott Lahteine
24b302c001 Fix cold/lengthy extrusion handling 2017-11-10 20:09:59 -06:00
Thomas Moore
4714fb8fcb Normalize load/unload length in M600 2017-11-10 19:59:26 -06:00
Scott Lahteine
2a54fd1444 Merge pull request #8325 from LVD-AC/1.1.x-manual-probe
[1.1.x] PROBE_SELECTED etc.
2017-11-10 19:28:53 -06:00
Scott Lahteine
b0ff3a4c6d Cleanup around updatePID 2017-11-10 19:17:46 -06:00
Scott Lahteine
7aadfe32e7 Prevent position_is_reachable disaster 2017-11-10 19:17:45 -06:00
LVD-AC
8ce9306b27 PROBE_SELECTED etc. 2017-11-10 19:17:45 -06:00
Scott Lahteine
438e894899 Merge pull request #8347 from cheton/translation
[1.1.x] Translation updates for Traditional Chinese
2017-11-10 04:53:31 -06:00
Scott Lahteine
80682ec61e Updates Traditional Chinese, rebase for bugfix-1.1.x 2017-11-10 04:49:09 -06:00
Scott Lahteine
deaa70c2cc Update macros for parity with 2.0.x 2017-11-10 04:32:27 -06:00
Scott Lahteine
7535c21894 Remove some trailing white-space 2017-11-10 03:38:58 -06:00
Roxy-3D
8327667988 Correct gMax 1.5+ nozzle size to the right number
Also...   Doing a 'Direct Commit' to see if that is 'acceptable' for small changes like this.   I want to look at the commit history and see how the logs handle this type of change.
2017-11-09 20:00:55 -06:00
Scott Lahteine
b6b4bf0959 Merge pull request #8345 from tcm0116/1.1.x-delta_height
[1.1.x] Add delta_height variable in lieu of using home_offset
2017-11-09 01:19:48 -06:00
Scott Lahteine
d60619f8e5 Merge pull request #8342 from thinkyhead/bf1_fixes_for_117
[1.1] Fix PROBE_MANUALLY on kinematic bots
2017-11-08 23:51:50 -06:00
Thomas Moore
658e1ebe5a Add delta_height variable in lieu of using home_offset 2017-11-08 23:21:02 -06:00
Scott Lahteine
54963cc898 Fix _manual_goto_xy on kinematic systems 2017-11-08 23:18:55 -06:00
Scott Lahteine
ad879a1f90 Clarify some motion code 2017-11-08 23:18:55 -06:00
Scott Lahteine
513f25d42c Remove redundant dual stepper driver entries 2017-11-08 20:26:54 -06:00
Scott Lahteine
2559745f54 Tweaks to core motion code 2017-11-08 20:08:20 -06:00
Scott Lahteine
7326fe1136 Fix tilt_mesh_based_on_probed_grid output bug 2017-11-08 20:07:02 -06:00
Scott Lahteine
97a43f0c2f Fix G26 Y position argument 2017-11-08 19:19:21 -06:00
Scott Lahteine
279b73fecd Merge pull request #8335 from thinkyhead/bf1_fix_get_destination
[1.1] Fix gcode_get_destination E axis
2017-11-08 12:55:06 -06:00
Scott Lahteine
87b655e59e Fix gcode_get_destination E axis 2017-11-08 12:50:40 -06:00
Roxy-3D
677d490b5c Add defaults for basic extrusion to Configuration.h files (#8331) 2017-11-08 11:02:47 -06:00
Roxy-3D
6ee4ba6932 We need motion even with !HAS_MESH (#8330)
Thank You MagoKimbra !
2017-11-08 09:58:18 -06:00
Scott Lahteine
77cef3bef2 Merge pull request #8322 from thinkyhead/bf1_sprintf_p_fix
[1.1] Followup to G33/LCD patch #8318
2017-11-08 01:00:18 -06:00
Scott Lahteine
4a857f1af6 Followup to G33/LCD patch #8318 2017-11-08 00:46:30 -06:00
Scott Lahteine
50a1352f7f Merge pull request #8318 from thinkyhead/bf1_sprintf_p_fix
[1.1] Patch G33 misuse of PROBE_MANUALLY
2017-11-07 22:40:15 -06:00
Scott Lahteine
1d0739d6d1 Patch G33 misuse of PROBE_MANUALLY 2017-11-07 22:28:54 -06:00
Scott Lahteine
69a7d4e0a5 Conditionals updates from #7979 2017-11-07 21:20:38 -06:00
Scott Lahteine
2fb35f7991 Merge pull request #8315 from thinkyhead/bf1_sprintf_p_fix
[1.1] Patch abuse of sprintf_P in G33
2017-11-07 17:50:31 -06:00
Scott Lahteine
5fe15c7f10 Patch abuse of sprintf_P in G33 2017-11-07 17:35:32 -06:00
Rowan Meara
094bebcc2d [1.1.x] Update Thermal Protection Documentation (#8282)
* Fix thermal protection documentation.

Even before the recent thermal protection changes, the documentation of
the thermal protection feature in the config files did not match the
implementation.  I fixed the documentation and reconciled the M303
implementation with the documentation.

* Applied documentation changes to sample config files

* Renamed hysteresis to watch_temp_increase

* Added gcodes back into documentation.
2017-11-07 15:52:28 -06:00
Scott Lahteine
abb15bc30a Followup patch for G92 2017-11-07 13:08:38 -06:00
Scott Lahteine
8e18e05d1d Merge pull request #8309 from thinkyhead/bf1_fixes_for_117
[1.1] Fix G92 for native workspace
2017-11-07 12:52:55 -06:00
Scott Lahteine
aa80882bdf Merge pull request #8306 from Kaibob2/patch-4
Length fix and translation
2017-11-07 12:27:37 -06:00
Scott Lahteine
e4466b55b5 Fix G92 for native workspace 2017-11-07 12:27:05 -06:00
Scott Lahteine
60ea0f1222 Merge pull request #8305 from tcm0116/1.1.x-delta_eeprom
[1.1x] Fix Delta EEPROM
2017-11-07 12:04:26 -06:00
Kai
b60efb4230 Length fix and translation
If #define MSG_Z_FADE_HEIGHT is xx.xx then the last character is crashing into the value
2017-11-07 18:16:30 +01:00
Thomas Moore
2f4a42b313 Fix Delta EEPROM 2017-11-07 16:55:06 +00:00
Scott Lahteine
fff4d71ba5 Merge pull request #8296 from thinkyhead/bf1_incidentals
[1.1] Misc. fixes picked up from 2.0.x
2017-11-06 22:58:54 -06:00
Scott Lahteine
e1ab285435 Fix some section sizes in EEPROM head comment 2017-11-06 22:41:27 -06:00
Scott Lahteine
26ebeadfaa Eliminate some compiler warnings 2017-11-06 22:41:27 -06:00
Scott Lahteine
30e4b85587 Fix M118 parameters, with strict guideline 2017-11-06 22:41:27 -06:00
Scott Lahteine
44edffa0a9 Fix SLOW_PWM_HEATERS, issues already patched in 2.0.x 2017-11-06 22:40:44 -06:00
Scott Lahteine
20b57f9d38 Merge pull request #8295 from thinkyhead/bf1_fix_fallback_font
[1.1] Fix non-extended font option
2017-11-06 21:54:13 -06:00
Scott Lahteine
ddf5d68815 Fix non-extended font option 2017-11-06 21:43:18 -06:00
Scott Lahteine
298863c2d0 Tweak an EEPROM loop 2017-11-06 20:16:57 -06:00
Rowan Meara
8e8787ad63 Fixed EEPROM CRC (#8283)
Fix EEPROM reversion.
2017-11-06 19:18:42 -06:00
Roxy-3D
12151e62ee Fix G26's circle drawing... (#8291)
* Fix G26's circle drawing...

This mostly catches the bugfix-v1.1.x branch up to bugfix-v2.0.0

I'll have to do something similar to get bugfix-v2.0.0 caught up to
bugfix-v1.1.x

* only use planner.leveling_active if appropriate
2017-11-06 18:26:47 -06:00
Scott Lahteine
efc1029226 Update bilinear for native workspace 2017-11-06 17:03:34 -06:00
Scott Lahteine
1b09733e7c Fix FWRETRACT un-hop 2017-11-05 18:33:10 -06:00
Scott Lahteine
d8ef9bda18 Fix point_t pointer in Nozzle::zigzag 2017-11-05 18:32:32 -06:00
Scott Lahteine
1b870377b1 Merge pull request #8248 from thinkyhead/bf1_nozzle_cleanup
[1.1] Cleanup Nozzle class, fix XY vs Z move order
2017-11-05 18:26:53 -06:00
Scott Lahteine
267c247da7 Cleanup Nozzle class, fix XY vs Z move order 2017-11-05 18:14:18 -06:00
Scott Lahteine
95296191a2 Merge pull request #8200 from thinkyhead/bf1_asterisk_not_special
[1.1.x] CNC_COORDINATE_SYSTEMS
2017-11-04 22:49:02 -05:00
Scott Lahteine
8ab368559a Implement CNC_COORDINATE_SYSTEMS 2017-11-04 22:30:23 -05:00
Scott Lahteine
bb111b928b Add CNC_COORDINATE_SYSTEMS to configs 2017-11-04 22:30:23 -05:00
Scott Lahteine
91abf07087 Cleanup and fix G33 2017-11-04 22:30:23 -05:00
Scott Lahteine
e642a64b68 Prettify some EEPROM code 2017-11-04 22:00:45 -05:00
Scott Lahteine
64f077fd2a Remove I2CPEM workspace offset 2017-11-04 22:00:45 -05:00
Scott Lahteine
5fefa200ba Tweaks to cubic_b_sline code style 2017-11-04 22:00:45 -05:00
Scott Lahteine
4388719c5d Merge pull request #8243 from Augustus22/kkersey/anet-lcd-ramps
[1.1] Add Anet Keypad LCD pins for RAMPS
2017-11-04 21:49:07 -05:00
Kris Kersey
46c2841904 Added support for Anet LCD on Ramps board.
Working pin map for Anet LCD display.
Pins 1 and 2 must be swapped on cable.
2017-11-04 21:30:08 -05:00
Scott Lahteine
03904697ac Merge pull request #8257 from thinkyhead/bf1_git_scripts
[1.1] Update git helper scripts
2017-11-04 21:03:06 -05:00
Scott Lahteine
9bd230cf64 Update git helper scripts 2017-11-04 18:35:06 -05:00
Scott Lahteine
309890cb8c Merge pull request #8229 from thinkyhead/bf1_native_operation
[1.1.x] Operate in Native Machine Space
2017-11-04 14:37:13 -05:00
Scott Lahteine
f9f0ee0f21 Update G2/G3 Workspace Planes 2017-11-04 14:35:25 -05:00
Scott Lahteine
640526f0c8 Operate in Native Machine Space 2017-11-03 22:40:30 -05:00
Scott Lahteine
9af9596f69 Merge pull request #8241 from machaj/fix-links-to-probes
Fix probes configuration url
2017-11-03 13:36:20 -05:00
Scott Lahteine
6e9093c288 Merge pull request #8239 from AnHardt/1.1_boot/kill_screen_cleanup
[1.1] Some cleanup around 'lcd_bootscreen()' and 'lcd_kill_screen()'
2017-11-03 13:32:52 -05:00
Jan Macháček
0c4e9980fb Fix probes configuration url 2017-11-03 14:42:02 +01:00
AnHardt
13a3fb1acc Some cleanup around 'lcd_bootscreen()' and 'lcd_kill_screen()'
Move 'lcd_bootscreen()' from `lcd_init()` to 'setup()' where it is cexecute exactly once. Saves 'bool show_bootscreen'.
Move the call of 'lcd_custom_bootscreen()' to the begin of 'lcd_bootscreen()'.
Move the delays into the related functions.
Move the picture loop around 'lcd_kill_screen()' into the function.
2017-11-03 12:16:42 +01:00
Scott Lahteine
343dd1c0b8 Remove G33 trailing whitespace 2017-11-03 04:06:38 -05:00
Scott Lahteine
64029ef8a6 Merge pull request #8179 from thinkyhead/bf1_config_tweak
[1.1.x] Faster menu navigation for Anet A8
2017-11-03 03:59:21 -05:00
Scott Lahteine
524f4ee0cf Tweak to M330 thermal protection 2017-11-03 03:57:11 -05:00
Scott Lahteine
34aeaec553 Remove ADKey steps acceleration 2017-11-03 03:42:52 -05:00
Luc Van Daele
0e4b6b373d [1.1.x] G33 magic numbers (#8173)
* [1.1.x] G33 magic numbers

* oops

* comments

* oops

* warning

* better comment section

* remarks

* extra grids
2017-11-03 03:35:53 -05:00
Scott Lahteine
193a0e9273 pid_autotune parity with 2.0.x 2017-11-03 03:26:47 -05:00
Rowan Meara
39cc36d3f1 [1.1.x] M303 thermal runaway protection (#8209)
* Added M303 thermal runaway protection

Currently, thermal runaway protection is not available during M303.
Therefore, if someone plugs the thermistors in incorrectly and goes to
autotune their printer, the printer temperature could runaway and damage
could occur.

* Replace removed line, clarifying its logic
2017-11-03 03:16:39 -05:00
Scott Lahteine
87d3a1ae4d Merge pull request #8228 from tcm0116/1.0.x-dual_stepper
[1.1.x] Fix automatic stepper assignment for X/Y/Z dual stepper drivers
2017-11-03 03:08:43 -05:00
Scott Lahteine
5289c4135a Merge pull request #8230 from AnHardt/1.1_watchdog
[1.1] Fix watchdog in WATCHDOG_RESET_MANUAL mode AVR
2017-11-03 03:06:45 -05:00
AnHardt
dcd7949544 Fix watchdog in WATCHDOG_RESET_MANUAL mode AVR 2017-11-03 04:45:13 +01:00
Thomas Moore
277eb16d67 Fix automatic stepper assignment for X/Y/Z dual stepper drivers 2017-11-02 18:50:25 -05:00
Scott Lahteine
41ba4e507e Merge pull request #8216 from jmdearras/bugfix-1.1.x
Restore MKS_GEN_L
2017-11-02 16:58:27 -05:00
jmdearras
c9980c0a5c Restore MKS_GEN_L
Removed by accident, I presume, when the file was cleaned up
2017-11-02 12:14:54 -04:00
jmdearras
3e9504d306 Fix case light "off" function (#8205)
* Fix case light "off" function

It would only turn the light off if brightness was 255

* Update Marlin_main.cpp
2017-11-01 21:17:23 -05:00
Scott Lahteine
1b68ee82ce Merge pull request #8196 from thinkyhead/bf1_asterisk_not_special
[1.1.x] Allow asterisks in G-Code commands
2017-10-31 21:53:26 -05:00
Scott Lahteine
4bf0e15653 Allow asterisks in G-Code commands
Addressing #6655
2017-10-31 21:14:56 -05:00
Scott Lahteine
b63a55666d Merge pull request #8193 from thinkyhead/bf1_silver_gate
[1.1.x] Support for SilverGate Board
2017-10-31 16:25:46 -05:00
Scott Lahteine
f02ca2a9a3 Organize boards.h by architecture 2017-10-31 16:12:07 -05:00
Scott Lahteine
4fb3ce4739 Support for SilverGate Board 2017-10-31 15:26:27 -05:00
Scott Lahteine
704640bf98 Faster menu navigation for Anet A8
Addressing #8166
2017-10-31 14:44:48 -05:00
Scott Lahteine
b48a77c88a Merge pull request #8182 from thinkyhead/bf1_fix_bootscreen_repeat
[1.1.x] Only show custom bootscreen once
2017-10-31 02:37:24 -05:00
Scott Lahteine
db6de76acb Only show custom bootscreen once 2017-10-31 01:52:35 -05:00
GMagician
15be1cb9a9 [1.1.x] Fix NO_MOTION_BEFORE_HOMING unwanted behaviour (#8177)
* [1.1.x] Fix NO_MOTION_BEFORE_HOMING unwanted behaviour

NO_MOTION_BEFORE_HOMING should prevent XYZ movements only when homing is not done.
E axes should be allowed

* Update Marlin_main.cpp

* Update Marlin_main.cpp

* Update Marlin_main.cpp
2017-10-30 22:50:50 -05:00
Scott Lahteine
4817c0d055 Merge pull request #8167 from thinkyhead/bf1_config_tweak
[1.1.x] Kinematic clamp_to_software_endstops
2017-10-30 19:20:45 -05:00
Scott Lahteine
893092ff7f Kinematic clamp_to_software_endstops 2017-10-30 16:24:45 -05:00
Scott Lahteine
8b7c1e9cec Fix for MAX_VFAT_ENTRIES sanity check 2017-10-30 16:24:45 -05:00
Scott Lahteine
393ceb28fc The plural of 'axis' is 'axes' 2017-10-30 14:49:51 -05:00
Scott Lahteine
d9cb7be444 Merge pull request #8160 from thinkyhead/bf1_fixup_sd_reprint
[1.1.x] Simplify SD_REPRINT_LAST_SELECTED_FILE
2017-10-29 23:57:44 -05:00
Scott Lahteine
5837f067cf Tweak to QUICK_HOME comment 2017-10-29 23:50:02 -05:00
Scott Lahteine
5e5a177934 No hacks needed for SD_REPRINT_LAST_SELECTED_FILE 2017-10-29 22:44:03 -05:00
Scott Lahteine
0b5b03d9dc Tweak for soft endstops 2017-10-29 20:16:22 -05:00
Scott Lahteine
9288d80613 Merge pull request #8156 from thinkyhead/bf1_anet_10_servo
[1.1.x] Define a default SERVO0_PIN for Anet 1.0
2017-10-29 19:53:49 -05:00
Scott Lahteine
6698db29de Update LCD draw condition 2017-10-29 19:17:32 -05:00
Scott Lahteine
25e86a520d Merge pull request #8114 from thinkyhead/bf1_print_sd_file_again
[1.1.x] Cleanup for SD Print Again
2017-10-29 19:09:34 -05:00
Scott Lahteine
a6f7cda23e Merge pull request #8143 from thinkyhead/bf1_dual_xyz_endstops
Followup to #8123 - to match 2.0.x changes
2017-10-29 19:04:33 -05:00
Scott Lahteine
b0e282a74b Cleanups for SD_REPRINT_LAST_SELECTED_FILE 2017-10-29 19:02:17 -05:00
Scott Lahteine
46ed54cd8e Include time scale in some planner vars 2017-10-29 18:48:14 -05:00
Scott Lahteine
9c870baf84 Add a hidden 8s watchdog option for easier debugging 2017-10-29 18:34:57 -05:00
Scott Lahteine
21249f7c3d Add mfup to mfpub for safety 2017-10-29 18:34:57 -05:00
Scott Lahteine
471c2b5d5c Provide a default SERVO0_PIN for Anet 1.0 2017-10-29 18:34:57 -05:00
Scott Lahteine
e792c2b234 Followup to #8123 - to match 2.0.x changes 2017-10-29 05:39:44 -05:00
Scott Lahteine
daa85f71e1 Merge pull request #8123 from thinkyhead/bf1_dual_xyz_endstops
[1.1.x] Dual endstops XYZ
2017-10-29 04:36:09 -05:00
Rowan Meara
9850ba0cbd [1.1.x] Fix M303 thermal protection #8103 (#8126)
* Fixed M303 thermal protection

The temperature sanity checking logic was not being applied during M303
(pid autotuning) because instead of setting a target temperature, it
directly manipulated the pwm values.  When PIDTEMP/PIDTEMPBED is
enabled, PWM values rather than the target temperature determine whether
the heater is on.  I changed this to look directly at the PWM amount
when pid is enabled.

* Turn off heaters on M303 error

Currently, PID autotuning stops if it overshoots the temperature by 20C
or if if the temperature does not change for 20 minutes and it times
out.  I added calls to disable the heaters in these scenarios.

* Removed unnecessary if statement.

Added changes suggested by GMagician.

* Update temperature.cpp

* Update temperature.cpp

* Update temperature.cpp
2017-10-29 04:34:47 -05:00
Scott Lahteine
c0a8275cb0 Merge pull request #8137 from LVD-AC/(1.1.x)bug_G33
(1.1.x) serious bug G33
2017-10-29 04:11:54 -05:00
Scott Lahteine
318c419f77 Implement support for Dual X and Y endstops 2017-10-29 03:49:45 -05:00
Scott Lahteine
7e1232269a Add Dual Steppers / Endstops to configs 2017-10-29 03:49:45 -05:00
Scott Lahteine
62d52d62dc Cleanup for DIGIPOTS settings 2017-10-29 03:49:32 -05:00
LVD-AC
77cf42588f (1.1.x) serious bug G33 2017-10-29 00:22:55 +02:00
Scott Lahteine
50f6c645de Add scripts for .travis.yml to append config options 2017-10-27 19:59:01 -05:00
Scott Lahteine
7ade65d44b Merge pull request #8128 from thinkyhead/bf1_revert_babystep_mult
[1.1.x] Revert default BABYSTEP_MULTIPLICATOR to 1
2017-10-27 19:55:11 -05:00
Scott Lahteine
a979c428ee Revert default BABYSTEP_MULTIPLICATOR to 1 2017-10-27 19:42:51 -05:00
jmdearras
6920769a9a Added MKS GEN L board (#8088)
[1.1.x] Add MKS GEN L board
2017-10-27 02:13:41 -05:00
Scott Lahteine
410aa0716d Concise SD_REPRINT_LAST_SELECTED_FILE description 2017-10-27 00:10:04 -05:00
Scott Lahteine
445a7f65cd Clean up trailing whitespace 2017-10-27 00:02:35 -05:00
Luc Van Daele
e64cfb13b8 (1.1.x) auto tune calibration parameters (#8031)
* auto tune calibration parameters

* solve warnings

* Tweaks to formatting

* review Thinkyhead

* Error
2017-10-26 23:49:20 -05:00
Scott Lahteine
e374d87ac4 Merge pull request #8112 from thinkyhead/bf1_fwretract_fix_oct26
[1.1.x] Improved Firmware Retraction logic
2017-10-26 23:06:27 -05:00
Scott Lahteine
2296d98845 Tweak neopixel self-test 2017-10-26 22:46:11 -05:00
Scott Lahteine
9aac3d8773 Add some Polish translations
Thanks @SCiunczyk
2017-10-26 22:44:23 -05:00
Scott Lahteine
6569b9ba56 Fix FWRETRACT logic, apply common sense 2017-10-26 22:36:41 -05:00
Bob-the-Kuhn
7ab9abe4ef Merge pull request #8107 from Bob-the-Kuhn/1.1.x-reduced-font-fix
(bug fix) 1.1.x - save 1400 bytes of FLASH by using reduced font for some languages
2017-10-26 16:09:52 -05:00
Bob-the-Kuhn
3357170b18 give this language an unique name 2017-10-26 15:48:00 -05:00
Roxy-3D
2e746f2b8b Initial conflict resolution of SD_REPRINT_LAST_SELECTED_FILE (#8104)
* Initial conflict resolution

All previous items resolved:
- Use of ELAPSED() on timer code
- Switch to use of defer_return_to_status=true as much as possible
- Update & Clean Up of Max7219 routines

* Resolve non-SD case in ultralcd.cpp
2017-10-26 11:44:55 -05:00
Bob-the-Kuhn
594c075377 1.1.x - save 1400 bytes of FLASH by using reduced font for some languages (#8095)
* use reduced sized font for some languages

* Fit Portuguese language files to existing scheme

* Rename language_pl-DOGM.h to language_pl_utf8.h

* Rename language_pl_utf8.h to language_pl-DOGM.h

* Update dogm_font_data_ISO10646_1.h

* Update dogm_font_data_ISO10646_1.h
2017-10-25 18:32:38 -05:00
Scott Lahteine
8bb1e91afd More specific M100 description 2017-10-25 16:11:09 -05:00
Scott Lahteine
a12d1b21b5 Merge pull request #8048 from madmo/mks-mini-gt2560
[1.1.x] Add MKS MINI 12864 support to GT2560
2017-10-25 01:13:07 -05:00
Scott Lahteine
5bed2f351a Fix spacing, use single instances of similar pins 2017-10-24 19:12:40 -05:00
Scott Lahteine
209560fcd2 Merge pull request #8043 from thinkyhead/bf1_mesh_consolidate
[1.1.x] Simplify mesh bounds config
2017-10-24 18:56:54 -05:00
Scott Lahteine
ec9d7b639d Encourage users to re-examine their configs 2017-10-24 18:33:31 -05:00
Scott Lahteine
1c97c1582c Move UBL_SAVE_ACTIVE_ON_M500 to Configuration.h 2017-10-24 18:25:50 -05:00
Scott Lahteine
f06f4b40b8 Apply physical limits to mesh bounds 2017-10-24 16:49:00 -05:00
Scott Lahteine
3235beef6d Merge pull request #8073 from thinkyhead/bf1_fix_M600
[1.1.x] Fix position sync in M600 pause/resume
2017-10-24 14:56:01 -05:00
Scott Lahteine
e5ab783b08 Merge pull request #8061 from thinkyhead/bf1_general_cleanup
[1.1.x] Patch up some verbiage in configs
2017-10-24 14:44:31 -05:00
Scott Lahteine
355ebec92d Fix position sync in M600 pause/resume 2017-10-24 14:41:54 -05:00
montri2025
fa157f08ff lcd <20 disply Bed Temperature cast ty (#8068) 2017-10-23 23:46:26 -05:00
Scott Lahteine
39a545b3f8 Patch up some verbiage in configs 2017-10-22 17:14:50 -05:00
Scott Lahteine
226fe192a1 Fix Neopixel Travis test 2017-10-22 16:54:11 -05:00
Roxy-3D
e9bc9a2ab4 change to better (more clear) names (#8049)
set_destination_to_current() changed to set_destination_from_current()

set_current_to_destination() changed to set_current_from_destination()
2017-10-21 10:58:17 -05:00
Moritz Bitsch
b22c87183f Add MKS MINI 12864 support for GT2560 2017-10-21 13:05:21 +02:00
tweichselbaumer
fa44130734 Add M290 babystepping (#8014)
* Add M290 babystepping

* Allow `Z` for `M290`

* fix spacing

* Support BABYSTEP_XY in M290

* Not just Z

* Extend M290 for BABYSTEP_ZPROBE_OFFSET

* tweak
2017-10-21 03:58:53 -05:00
MetalSearch
9b3f27f02a Fix:EndStops doesn't working with BOARD_RAMPS_14_EFB on Micromake C1 (#8041)
[1.1.x] Fix EndStops don't work with BOARD_RAMPS_14_EFB on Micromake C1
2017-10-21 00:24:22 -05:00
Scott Lahteine
1d5fb360cc Merge pull request #8020 from thinkyhead/bf1_scroll_longnames
[1.1.x] Add SCROLL_LONG_FILENAMES to reveal longer filenames
2017-10-20 21:34:11 -05:00
Scott Lahteine
a7398a0459 Prevent SDCARD_SORT_ALPHA from exploding 2017-10-20 19:14:11 -05:00
Scott Lahteine
91c5c2538a Add SCROLL_LONG_FILENAMES advanced option
Based on #7637 by @marcio-ao
2017-10-20 19:14:10 -05:00
Scott Lahteine
259cf1b0b2 BQ enables this in the config. Remove here 2017-10-18 23:23:56 -05:00
Scott Lahteine
2338632270 Simplify Cartesian probing bounds
Followup to #8011
2017-10-18 17:16:14 -05:00
Luc Van Daele
2a88a3fd33 boolval revised (#8017) 2017-10-18 14:19:01 -05:00
Thomas Moore
84470f6b2a Update UBL mesh boundaries to accomidate beds centered at 0, 0 (#8011) 2017-10-18 10:03:00 -05:00
Scott Lahteine
10d72f31c2 Merge pull request #7991 from thinkyhead/bf1_M106_memorize
[1.1.x] Add EXTRA_FAN_SPEED feature
2017-10-16 05:19:32 -05:00
studiodyne
e04902f589 Add EXTRA_FAN_SPEED feature 2017-10-16 02:32:30 -05:00
Scott Lahteine
31d0b77df7 Fix usage line in temperature table script 2017-10-16 00:17:06 -05:00
Scott Lahteine
9e82533eb9 Fix spelling in temperature table script 2017-10-16 00:16:25 -05:00
Scott Lahteine
4410aac60b Update temp table script for current format 2017-10-16 00:14:02 -05:00
Scott Lahteine
d63d08ef8b Merge pull request #7948 from gallynero/patch-1
Enable change feedrate in delta
2017-10-15 16:28:45 -05:00
Scott Lahteine
5911dc597a Merge pull request #7988 from thinkyhead/bf1_progress_percentage
Add Capability BUILD_PERCENT
2017-10-15 03:12:31 -05:00
Scott Lahteine
5c2ff6ed19 Add Capability BUILD_PERCENT 2017-10-15 03:01:36 -05:00
Scott Lahteine
6efad5e495 Merge pull request #7986 from thinkyhead/bf1_progress_percentage
[1.1.x] Add M73 (LCD_SET_PROGRESS_MANUALLY)
2017-10-15 02:43:30 -05:00
Scott Lahteine
5f708d47ce Add LCD_SET_PROGRESS_MANUALLY 2017-10-15 02:21:09 -05:00
Scott Lahteine
23dbaaf03b Merge pull request #7983 from thinkyhead/bf1_micromake_c1
[1.1.x] Micromake C1 Configurations, French for HD44780
2017-10-14 20:30:06 -05:00
Scott Lahteine
3b4b9c6d68 Unaccented French for Character Display 2017-10-14 20:17:29 -05:00
MetalSearch
8df47d76c7 Add control board MAKEBOARD Mini
+Add French language without accent for japanese LCD
2017-10-14 20:10:03 -05:00
Scott Lahteine
be55a49946 Merge pull request #7980 from thinkyhead/bf1_granular_sw_endstops
[1.1.x] Software endstop options by axis
2017-10-14 17:37:35 -05:00
Scott Lahteine
e05af35678 Add MIN_SOFTWARE_ENDSTOP_[XYZ] to example configs 2017-10-14 17:14:19 -05:00
Scott Lahteine
060d16d26b Split the software endstop capability by axis.
Based on #7975 and #7979
2017-10-14 17:14:08 -05:00
Scott Lahteine
0976d22225 Merge pull request #7977 from thinkyhead/bf1_fix_emergency_parser
[1.1.x] Fix Emergency Parser
2017-10-14 17:13:04 -05:00
Scott Lahteine
8dc10fb4c2 Version 1.1.6 2017-10-14 16:04:53 -05:00
Scott Lahteine
3571dd0ad6 Fix Emergency Parser
Followup to #7459
2017-10-14 16:04:53 -05:00
Scott Lahteine
e17869ca20 Fix Emergency Parser
Followup to #7459
2017-10-14 15:58:07 -05:00
Scott Lahteine
1c3d06876e Merge pull request #7965 from thinkyhead/bf1_ubl_remove_z_offset
[1.1.x] Unify Z fade factor
2017-10-14 02:57:13 -05:00
Scott Lahteine
662105c1b6 ADC sensor fix inspired by 'Evgen2' on Twitter 2017-10-14 02:39:13 -05:00
Scott Lahteine
b8ddae61e2 ubl_state no longer needed 2017-10-14 02:39:13 -05:00
Scott Lahteine
ece14af556 Improve LCD leveling value edits 2017-10-14 02:39:13 -05:00
Scott Lahteine
b07a2aa23c Add HAS_MESH conditional 2017-10-14 02:39:12 -05:00
Scott Lahteine
88857e8028 Move fade_scaling_factor_for_z to Planner 2017-10-14 02:10:46 -05:00
Scott Lahteine
8e808fcadc General cleanup, apply const 2017-10-13 16:13:36 -05:00
Scott Lahteine
da93a272a0 Move leveling_is_active to a macro 2017-10-13 16:11:27 -05:00
Scott Lahteine
fcd3b326e9 Merge pull request #7961 from thinkyhead/bf1_ubl_remove_z_offset
[1.1.x] Remove obsolete UBL z_offset
2017-10-13 09:06:38 -05:00
Scott Lahteine
3d5b10735f Remove obsolete UBL z_offset 2017-10-13 08:23:01 -05:00
gallynero
94228d4522 Enable change feedrate in delta
Enable change the relative feedrate on a printing job in delta machines with UBL
2017-10-12 01:55:51 +02:00
Scott Lahteine
22c968ee32 Merge remote-tracking branch 'upstream/bugfix-1.1.x' into 1.1.x 2017-10-10 02:47:02 -05:00
Scott Lahteine
f054f566b4 Merge pull request #7918 from thinkyhead/bf1_neopixel_full
[1.1.x] Different NEOPIXEL types
2017-10-10 02:35:56 -05:00
Slawomir Ciunczyk
167058b61f Different NEOPIXEL types
Changes to support NEOPIXEL LED strips
- Support for different NEOPIXEL as defined in Adafruit_NeoPixel.h
- ability to setup startup brightness
- ability to define sequential/non-sequential transition of color change during heating-up
- additional parameter to M150 P<brightness>
2017-10-10 01:58:40 -05:00
Scott Lahteine
f835245ee1 Merge pull request #7908 from thinkyhead/bf1_goodbye_legacy_advance
[1.1.x] Remove legacy ADVANCE feature
2017-10-10 00:31:39 -05:00
Scott Lahteine
98c7bde514 Merge pull request #7917 from thinkyhead/bf1_lcd_segmented_moves
[1.1.x] Segmented manual moves for kinematics
2017-10-10 00:28:44 -05:00
Scott Lahteine
38110e220d Segmented manual moves for kinematics 2017-10-09 23:10:17 -05:00
Scott Lahteine
75e4867d22 Merge pull request #7915 from thinkyhead/bf1_probeless_ubl
[1.1.x] Allow UBL G29 and G26 to build without a probe
2017-10-09 18:59:01 -05:00
deram
9239fcf0da Allow UBL G29 and G26 to build without a probe 2017-10-09 18:37:53 -05:00
Scott Lahteine
73c5675485 Merge pull request #7867 from thinkyhead/bf1_add_some_lcds
[1.1.x] Add support for 4 new LCDs
2017-10-09 18:27:42 -05:00
Scott Lahteine
381ebc043f Add support for ST7565-64128N
Based on #7447 by @Bob-the-Kuhn
2017-10-09 17:39:03 -05:00
jmdearras
c7e0a49c94 Add some new LCD displays
- Original CR-10
- MKS Mini Display
2017-10-09 17:39:03 -05:00
Scott Lahteine
067622fcc6 Apply some tweaks based on 2.0.x 2017-10-09 17:39:03 -05:00
Scott Lahteine
ae256576e1 Bring configs into parity with 2.0.x 2017-10-09 17:38:39 -05:00
Scott Lahteine
cbfcce09fa Remove legacy ADVANCE feature 2017-10-09 04:27:45 -05:00
Scott Lahteine
a21201a713 LCD filename already concatentated 2017-10-07 15:14:58 -05:00
Scott Lahteine
53f2f188f2 LCD filename already concatenated 2017-10-07 15:11:28 -05:00
Scott Lahteine
a6e95c7d25 Fix display issue with SD_ALPHA_SORT caching 2017-10-07 15:07:05 -05:00
Dave Johnson
97e6663bb3 [1.1.x] Auto-enable DISABLE_REDUCED_ACCURACY_WARNING if HOME_AFTER_DEACTIVATE enabled (#7878)
* Auto-enable DISABLE_REDUCED_ACCURACY_WARNING if HOME_AFTER_DEACTIVATE enabled

If HOME_AFTER_DEACTIVATE, there is no need to warn on LCD since printer will home prior to starting print.  Saves 60 bytes PROGMEM.
add HD44780 too

* Reduce lines used

* Reduce lines used
2017-10-07 15:00:56 -05:00
Scott Lahteine
e2ceb1b800 Merge pull request #7632 from GMagician/Wrong-sanitycheck-message-fix
Addressing #7612
2017-10-07 02:25:35 -05:00
Scott Lahteine
8c93295d62 Merge pull request #7873 from thinkyhead/bf1_anet_encoder_pulses
[1.1.x] Fixing ANET encoder pulses
2017-10-07 01:21:14 -05:00
Phr3d13
c26242a553 Fixing #7833 2017-10-07 00:07:24 -05:00
Scott Lahteine
b825bc87ae Merge pull request #7871 from thinkyhead/bf1_fix_sd_listing_bug
[1.1.x] Fix sd file list display bug
2017-10-07 00:01:59 -05:00
Scott Lahteine
dac5f20a01 Patch SD file draw bug 2017-10-06 23:53:08 -05:00
Scott Lahteine
b211fa4e1f Remove extra NEWPANEL settings in Conditionals_LCD.h 2017-10-06 17:23:32 -05:00
Scott Lahteine
a4954a68e0 Merge pull request #7865 from thinkyhead/bf1_finally_G33_is_done
[1.1.x] G33 completely fixed and done
2017-10-06 16:01:47 -05:00
LVD-AC
355cba4aa7 Fixes for G33 2017-10-06 15:52:53 -05:00
Scott Lahteine
2f0164b995 Merge pull request #7864 from thinkyhead/bf1_mapper_c2c3c4_sk
Tweak spacing in utf8_mapper.h
2017-10-06 15:19:13 -05:00
Scott Lahteine
e287e14354 Tweak spacing in utf8_mapper.h 2017-10-06 15:11:27 -05:00
Scott Lahteine
5e63ba970d Merge pull request #7862 from thinkyhead/bf1_mapper_c2c3c4_sk
[1.1.x] Added Slovak C2C3C4 mapper implementation.
2017-10-06 14:56:26 -05:00
Roman Moravčík
2a46ab288e Added Slovak C2C3C4 mapper implementation. 2017-10-06 14:40:15 -05:00
Scott Lahteine
7999249a5c Set TEMP_SENSOR_0 to 1 in CR-10 example config
As pointed out in #7692 by @totalitarian
2017-10-06 14:29:00 -05:00
Scott Lahteine
0ec9a7f090 Fix xon_xoff_state initialization 2017-10-04 12:10:15 -05:00
Scott Lahteine
a47c5c093d Merge pull request #7459 from ejtagle/xon-xoff-sdxfer
[1.1.x] XON/XOFF serial handshake (for faster transfers to SD)
2017-10-02 23:52:41 -05:00
Scott Lahteine
5a674a8e10 Merge pull request #7828 from thinkyhead/bf1_dualx_movex
[1.1.x] Fix DUAL_X_CARRIAGE manual move
2017-10-02 23:49:46 -05:00
Scott Lahteine
bcb8722513 Fix DUAL_X_CARRIAGE manual move
Addressing #7745
2017-10-02 23:28:52 -05:00
Scott Lahteine
4c34b3ad9c Stop redundant E4_IS_TMC2130 current control 2017-10-02 23:10:34 -05:00
Scott Lahteine
1b8b5c4b06 Make prepare_move_to_destination_dualx a full move function 2017-10-02 23:10:18 -05:00
Eduardo José Tagle
451c1fb5f9 Merge pull request #1 from thinkyhead/bf1_xon_xoff_for_sd
XON/XOFF changes
2017-10-02 14:17:47 -03:00
Scott Lahteine
4e19ff75b6 XON/XOFF corrections, tweaks, formatting, etc. 2017-10-02 03:52:42 -05:00
Scott Lahteine
94caabf89a Add XON/XOFF options to example configs 2017-10-02 03:52:41 -05:00
Scott Lahteine
f365448338 Merge pull request #7811 from thinkyhead/bf1_fix_resume_print
[1.1.x] Fix broken M600 resume_print
2017-10-01 22:54:34 -05:00
Scott Lahteine
3d1536a1b2 Merge pull request #7814 from thinkyhead/bf1_inhibit_option
[1.1.x] Option to disallow motion before homing
2017-10-01 22:53:06 -05:00
GMagician
8ab426c3a4 Updated all examples configurations
Forgot to update examples configurations. Done now
2017-10-01 21:04:12 -05:00
GMagician
33d28c24bf Implementing [FR] #7548
Added new configuration to inhibit XYZ movements when home is not done
2017-10-01 21:02:42 -05:00
Scott Lahteine
ac70048945 Only MarlinConfig.h ahead of feature block 2017-10-01 20:55:14 -05:00
MasterPIC
40a4a716e1 Fix filament change bug in resume_print
Expected behaviour: while (auto)extruding the new filament, the nozzle should not move. It should move (from filament replacement position to printing position) only after the user has confirmed the successful filament replacement and extrusion.

Actual behaviour: while (auto)extruding the new filament, the nozzle moves from filament replacement position back to printing position.
So the extrusion step is mixed with the movement required to go back to the printing position.

The provided code seems to be working but probably a better fix is required.
2017-10-01 18:42:29 -05:00
Scott Lahteine
802f147686 Remove some excess whitepsace 2017-10-01 18:25:04 -05:00
Scott Lahteine
80a0f935a1 Fix G10-G11 by adding a synchronize
Based on #7792 by @tcm0116
2017-09-30 17:46:31 -05:00
Scott Lahteine
de3c9bade6 Merge pull request #7773 from thinkyhead/bf1_lcd_leveling_status
[1.1.x] Show leveling status on character LCD
2017-09-27 13:10:37 -05:00
MasterPIC
7f8ff0a724 Show leveling status on character LCD 2017-09-27 12:18:41 -05:00
Scott Lahteine
3a8923be74 Merge pull request #7772 from thinkyhead/bf1_user_menu_return
[1.1.x] User menu return-to-status option
2017-09-27 11:52:18 -05:00
Scott Lahteine
723a34d9c7 Add confirmation to Init EEPROM command 2017-09-27 11:27:47 -05:00
Scott Lahteine
2efd5b119d Add USER_SCRIPT_RETURN option 2017-09-27 11:23:34 -05:00
Scott Lahteine
b105e47cb5 Move SERVO0 pin on GT2560 A+ with BLTOUCH enabled
Based on #7769
2017-09-27 10:39:44 -05:00
Scott Lahteine
0c2cefed8f Merge pull request #7766 from thinkyhead/bf1_melzi_fixes
Melzi fixes
2017-09-27 03:21:05 -05:00
DecoyPlatypus
41dcbe89dd Fixed ST7920_DELAY typo
Fixed typo where ST7920_DELAY_2 was being #defined after a check for #ifndef ST7920_DELAY_3
2017-09-27 03:01:09 -05:00
DecoyPlatypus
70a64355f6 Fixed LCD_FOR_MELZI SanityCheck
Sanity Check for LCD_FOR_MELZI  would fail with "Please select no more than one LCD controller option" any time #define LCD_FOR_MELZI was enabled in Configuration.h, even if there were no other LCD options enabled.
2017-09-27 03:01:09 -05:00
Scott Lahteine
aefd2a5c4b Merge pull request #7762 from thinkyhead/bf1_g3d_and_babystep
[1.1.x] Fix G3D_PANEL encoder steps, babystep label
2017-09-27 01:08:20 -05:00
Scott Lahteine
e37a1ded0d Increase BABYSTEP_MULTIPLICATOR to 100
Ideally, it should be calculated based on Z steps per unit so that each
babystep corresponds to around 0.025mm. Smaller than this is largely
insignificant for typical layer heights.
2017-09-27 00:14:26 -05:00
Scott Lahteine
3e28243076 No need for LCD_PINS_Dn when unused 2017-09-27 00:12:20 -05:00
Scott Lahteine
bbb94b8f68 babystepping tweak 2017-09-27 00:12:20 -05:00
Scott Lahteine
a277b43e30 Fix babystep menu display 2017-09-27 00:12:20 -05:00
Scott Lahteine
8a994fb1b1 Fix encoder pulses for G3D_PANEL 2017-09-27 00:12:20 -05:00
Scott Lahteine
9ee92f1246 Fix ADVANCED_PAUSE_FEATURE in .travis.yml 2017-09-26 17:12:05 -05:00
Scott Lahteine
ac2ac99e15 Fix bad logic in autostart
As pointed out by @marcio-ao in #7638
2017-09-24 17:52:35 -05:00
Scott Lahteine
72e9534d11 Merge pull request #7725 from thinkyhead/bf1_creality_fun
More featureful CR-10 configurations
2017-09-24 17:08:32 -05:00
Scott Lahteine
c1cc79176c Full-featured Creality configs 2017-09-24 16:52:42 -05:00
Scott Lahteine
f25dccd6d1 Disable BABYSTEP_XY by default in all configs 2017-09-24 16:52:42 -05:00
Scott Lahteine
cd09a83cfa Add size note to SDSORT_LIMIT 2017-09-24 16:52:41 -05:00
Scott Lahteine
9bbc2df217 General code cleanup, spacing 2017-09-24 16:52:41 -05:00
Luc Van Daele
74d430cb97 matrix names update (#7697)
* matrix names update

* symplified names

* new angle normalization

* ABC

* axis

* least squares

* recalc_delta_settings

* endstop_adj

* 0p

* bug
2017-09-24 01:45:31 -05:00
Scott Lahteine
ca13f4c3dd Merge pull request #7720 from thinkyhead/bf1_caselight_fix
Fix caselight compile issues
2017-09-23 22:15:58 -05:00
Scott Lahteine
9d4d53e2fd Update links to old wiki page 2017-09-23 22:06:45 -05:00
Scott Lahteine
00896f1713 Fix LEVEL_BED_CORNERS (No leveling required) 2017-09-23 22:00:45 -05:00
Scott Lahteine
c3a9e95a5f Define drawmenu items once, in ultralcd.cpp 2017-09-23 22:00:45 -05:00
Scott Lahteine
0afd25a010 Fix caselight compile issues 2017-09-23 22:00:44 -05:00
GMagician
5b87843fae Addressing #7612
Replaced extruder with hotend
2017-09-07 19:07:36 +02:00
Scott Lahteine
386b74f8c2 Merge pull request #7593 from marcio-ao/bugfix-1.1.x
Added option for graphical overlay for Z-offset (Resubmission of #7350 and #7586)
2017-09-02 00:01:38 -05:00
Tannoo
2a963fb5d1 UBL LCD Bugfixes (#7598) 2017-09-01 16:59:06 -05:00
Marcio Teixeira
d69c5317df Added option for graphical overlay for Z-offset 2017-08-31 14:21:39 -06:00
Scott Lahteine
9c00cff898 Version 1.1.5 2017-08-28 18:46:39 -05:00
Scott Lahteine
f9b9df2497 Merge branch 'bugfix-1.1.x' into new_release_115 2017-08-28 18:42:13 -05:00
etagle
2864ef8c7f Slight improvement to the line parsing logic, saving 8 cycles per character 2017-08-08 02:57:55 -03:00
etagle
534bbb81ff Adding XON/XOFF and STATISTICS implementation 2017-08-08 02:46:37 -03:00
etagle
3e5485de92 Enforcing requirements so XON/XOFF software handshake works and no drops of data are experienced while transferring data to an SD Card. I tested this with a CH340 USB to serial adapter (quite typical) at baudrates as high as 1000000 on a Atmega2560 running at 16Mhz, with no problems at all. We need a 1024 byte RX buffer. Less than that and we will have drops, higher than that is not needed 2017-08-08 02:30:04 -03:00
etagle
9e147e9ac4 Adding XON/XOFF and STATISTICS configuration settings and proper documentation on their usage for serial port 2017-08-08 02:22:33 -03:00
etagle
8ab2e420f6 Adding separate RX_BUFFER_SIZE configuration setting and proper documentation on its usage 2017-08-08 02:18:42 -03:00
etagle
b4c53af07d Adding a new macro to be able to determine if a given integer value is a power of 2 2017-08-08 02:09:50 -03:00
Scott Lahteine
d3bc877007 Version 1.1.4 2017-07-05 17:17:10 -05:00
Scott Lahteine
700549ee5d Merging from bugfix 2017-07-05 17:16:39 -05:00
Scott Lahteine
b2c20a8c0f Version 1.1.3 2017-06-04 17:30:24 -05:00
Scott Lahteine
ece7a2bf36 Unused var in Stepper 2017-06-04 17:30:24 -05:00
Scott Lahteine
d87845052d Ensure safe temperature for M600 2017-06-04 17:30:23 -05:00
Scott Lahteine
ea74ceb791 Maintain message scroll rate 2017-06-04 17:30:22 -05:00
Scott Lahteine
87b591bf53 Merge remote-tracking branch 'upstream/bugfix-1.1.x' into release_113 2017-06-04 12:38:19 -05:00
Scott Lahteine
515f05093f Version 1.1.2 2017-05-30 17:55:55 -05:00
Scott Lahteine
b6d5886dce Patch M24 / M125 for delta 2017-05-30 17:55:55 -05:00
Scott Lahteine
17f8a494bf Merge latest bugfix 2017-05-30 16:03:17 -05:00
Scott Lahteine
5996c3a907 1.1.1 Readme / Version 2017-05-12 05:37:35 -05:00
Scott Lahteine
bb7e3f1d07 Patch configuration temp units 2017-05-07 23:09:40 -05:00
Scott Lahteine
c9bfe7004c Adjust spacing of "spaces" 2017-05-07 23:09:40 -05:00
Scott Lahteine
fa9e54146a Patch redundant lcd settings 2017-05-07 23:09:40 -05:00
Scott Lahteine
0079166388 Spacing adjustment, ubl_G29 2017-05-07 23:09:40 -05:00
Scott Lahteine
232f5d235d Patch mfqp for use directly with MarlinDocumentation 2017-05-07 23:09:40 -05:00
Scott Lahteine
41cf1c9e6a Note 5 extruders in config comments 2017-05-07 23:09:40 -05:00
Scott Lahteine
2e61c1fb37 Patch missing const in temp_abs 2017-05-07 23:09:39 -05:00
Brian
a68084f417 Improve BLTOUCH_HEATERS_OFF functionality
- rename to PROBING_HEATERS_OFF
 - move heater pausing functionality into thermalManager
   - add variables, pause(), ispaused(), other functions
 - add fan pausing functionality -> PROBING_FANS_OFF
 - add probing_pause() wrapper
 - move pausing into do_homing_move() and do_probe_move() to minimize quiet time and so other probe types can benefit
 - example configs
2017-05-07 23:09:39 -05:00
Scott Lahteine
d5346a0689 Adjust spacing in LSF 2017-05-07 23:09:39 -05:00
Roxy-3D
c45b668142 More misc UBL fixes and update gMax examples (#6632)
I think I forgot to Sync before I committed last time.   Some UBL
changes did not stick.

Also, update the gMax configuaration.h file so other than unique numbers
and settings, it exactly matches the default configuration.h file.
2017-05-07 23:09:39 -05:00
Roxy-3D
ad0e5928f5 misc. UBL fixes (#6631)
* Restore LSF functionality

Some of the typo's persisted...   Hopefully this gets them all fixed.

* Restore user's expectations of how G28 should behave

* Allow Nozzle size control with ornery host programs
2017-05-07 23:09:39 -05:00
lrpirlet
06ca56a13c G29 P1 stops reporting Invalid location with this patch 2017-05-07 23:09:39 -05:00
Scott Lahteine
fbd021a756 Support temperature units in M503 2017-05-07 23:09:38 -05:00
bgort
d99794f11d Various improvements - mostly UBL-related (#6607)
UBL Clean up.
2017-05-07 23:09:38 -05:00
Scott Lahteine
c0f1052efb Fix mfrb and mfpub 2017-05-07 23:09:38 -05:00
Scott Lahteine
bf7ecc761f Edit configuration comments 2017-05-07 23:09:38 -05:00
Scott Lahteine
d0480c15ef Tweak git helper scripts 2017-05-07 23:09:38 -05:00
Scott Lahteine
771f42744a Tweak command index increment 2017-05-07 23:09:38 -05:00
Scott Lahteine
3a44157ee8 Minor fix in K8200 readme 2017-05-07 23:09:38 -05:00
Max Matveev
a666ff1255 Fixed USE_CONTROLLER_FAN #define usage 2017-05-07 23:09:37 -05:00
bgort
264f0960f7 fix error in M105 output -- use SERIAL_PROTOCOL for ints instead of SERIAL_PROTOCOL_F (#6584)
also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
2017-05-07 23:09:37 -05:00
Scott Lahteine
03f94a7a18 1.1.0 ReadMe, Version, helper scripts 2017-05-07 23:09:37 -05:00
1824 changed files with 283965 additions and 1278809 deletions

View File

@@ -1,19 +0,0 @@
# editorconfig.org
root = true
[{*.patch,syntax_test_*}]
trim_trailing_whitespace = false
[{*.c,*.cpp,*.h}]
charset = utf-8
[{*.c,*.cpp,*.h,Makefile}]
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
[{*.py,*.conf,*.sublime-project}]
indent_style = tab
indent_size = 4

1
.gitattributes vendored
View File

@@ -17,3 +17,4 @@
*.png binary
*.jpg binary
*.fon binary

4
.github/FUNDING.yml vendored
View File

@@ -1,3 +1 @@
github: [thinkyhead]
patreon: thinkyhead
custom: ["http://www.thinkyhead.com/donate-to-marlin"]
custom: http://www.thinkyhead.com/donate-to-marlin

View File

@@ -1,7 +0,0 @@
Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases.
Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR.
It may help to set your fork's default branch to `bugfix-2.0.x`.
See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.

View File

@@ -1,34 +0,0 @@
#
# bump-date.yml
# Bump the distribution date once per day
#
name: Bump Distribution Date
on:
schedule:
- cron: '0 0 * * *'
jobs:
bump_date:
runs-on: ubuntu-latest
steps:
- name: Check out bugfix-2.0.x
uses: actions/checkout@v2
with:
ref: bugfix-2.0.x
- name: Bump Distribution Date
run: |
# Inline Bump Script
[[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push

View File

@@ -1,27 +0,0 @@
#
# comment-pr.yml
# Add a comment to any PR directed to a release branch
#
name: PR Bad Target
on:
pull_request:
branches:
- 1.0.x
- 1.1.x
- 2.0.x
jobs:
bad_target:
name: PR Bad Target
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: harupy/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: bad-target.md

View File

@@ -1,103 +0,0 @@
#
# test-builds.yml
# Do test builds to catch compile errors
#
name: CI
on:
pull_request:
branches:
- bugfix-2.0.x
- dev-2.1.x
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
jobs:
test_builds:
runs-on: ubuntu-latest
strategy:
matrix:
test-platform:
# Base Environments
- DUE
- esp32
- linux_native
- megaatmega2560
- teensy31
- teensy35
- SAMD51_grandcentral_m4
# Extended AVR Environments
- FYSETC_F6_13
- megaatmega1280
- rambo
- sanguino_atmega1284p
- sanguino_atmega644p
# Extended STM32 Environments
- STM32F103RC_bigtree
- STM32F103RC_bigtree_USB
- STM32F103RE_bigtree
- STM32F103RE_bigtree_USB
- STM32F103RC_fysetc
- jgaurora_a5s_a1
- STM32F103VE_longer
- STM32F407VE_black
- BIGTREE_SKR_PRO
- mks_robin
- ARMED
- FYSETC_S6
# Put lengthy tests last
- LPC1768
- LPC1769
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
#- STM32F4
#- STM32F7
# Non-working environment tests
#- BIGTREE_BTT002
#- at90usb1286_cdc
#- at90usb1286_dfu
#- STM32F103CB_malyan
#- mks_robin_lite
#- mks_robin_mini
#- mks_robin_nano
steps:
- name: Select Python 3.7
uses: actions/setup-python@v1
with:
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install PlatformIO
run: |
pip install -U https://github.com/platformio/platformio-core/archive/master.zip
platformio update
- name: Check out the PR
uses: actions/checkout@v2
- name: Run ${{ matrix.test-platform }} Tests
run: |
# Inline tests script
[[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
chmod +x buildroot/bin/*
chmod +x buildroot/share/tests/*
export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
run_tests . ${{ matrix.test-platform }}

47
.gitignore vendored
View File

@@ -1,9 +1,9 @@
#
# Marlin 3D Printer Firmware
# Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
# Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
#
# Based on Sprinter and grbl.
# Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
# Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@ _Version.h
applet/
*.DS_Store
#
# Misc
#
@@ -119,35 +120,7 @@ tags
.pio*
.pioenvs
.piolibdeps
.clang_complete
.gcc-flags.json
/lib/
# Workaround for Deviot+platformio quirks
Marlin/lib
Marlin/platformio.ini
Marlin/*/platformio.ini
Marlin/*/*/platformio.ini
Marlin/*/*/*/platformio.ini
Marlin/*/*/*/*/platformio.ini
Marlin/.travis.yml
Marlin/*/.travis.yml
Marlin/*/*/.travis.yml
Marlin/*/*/*/.travis.yml
Marlin/*/*/*/*/.travis.yml
Marlin/.gitignore
Marlin/*/.gitignore
Marlin/*/*/.gitignore
Marlin/*/*/*/.gitignore
Marlin/*/*/*/*/.gitignore
Marlin/readme.txt
Marlin/*/readme.txt
Marlin/*/*/readme.txt
Marlin/*/*/*/readme.txt
Marlin/*/*/*/*/readme.txt
# Secure Credentials
Configuration_Secure.h
lib/readme.txt
#Visual Studio
*.sln
@@ -169,18 +142,8 @@ vc-fileutils.settings
#cmake
CMakeLists.txt
src/CMakeLists.txt
Marlin/CMakeLists.txt
CMakeListsPrivate.txt
#CLion
cmake-build-*
#Eclipse
.project
.cproject
.pydevproject
.settings
.classpath
#Python
__pycache__

389
.travis.yml Normal file
View File

@@ -0,0 +1,389 @@
dist: bionic
sudo: true
#
language: c
#
notifications:
email: false
#
before_install:
#
# Fetch the tag information for the current branch
- git fetch origin --tags
#
# Publish the buildroot script folder
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${PATH}
#
# Start fb X server
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
- sleep 3
- export DISPLAY=:1.0
#
install:
#
# Install arduino 1.8.5
- wget http://downloads.arduino.cc/arduino-1.8.9-linux64.tar.xz
- tar xf arduino-1.8.9-linux64.tar.xz
- sudo mv arduino-1.8.9 /usr/local/share/arduino
- ln -s /usr/local/share/arduino/arduino ${TRAVIS_BUILD_DIR}/buildroot/bin/arduino
#
# Install: LiquidCrystal_I2C library
- git clone https://github.com/kiyoshigawa/LiquidCrystal_I2C.git
- mv LiquidCrystal_I2C/LiquidCrystal_I2C /usr/local/share/arduino/libraries/LiquidCrystal_I2C
#
# Install: LiquidTWI2 library
- git clone https://github.com/lincomatic/LiquidTWI2.git
- sudo mv LiquidTWI2 /usr/local/share/arduino/libraries/LiquidTWI2
#
# Install: Monochrome Graphics Library for LCDs and OLEDs
- git clone https://github.com/olikraus/U8glib_Arduino.git
- sudo mv U8glib_Arduino /usr/local/share/arduino/libraries/U8glib
#
# Install: L6470 Stepper Motor Driver library
# - git clone https://github.com/ameyer/Arduino-L6470.git
# - sudo mv Arduino-L6470/L6470 /usr/local/share/arduino/libraries/L6470
#
# Install: TMC26X Stepper Motor Controller library
# - git clone https://github.com/trinamic/TMC26XStepper.git
# - sudo mv TMC26XStepper /usr/local/share/arduino/libraries/TMC26XStepper
#
# Install: TMC2130 Stepper Motor Controller library
- git clone https://github.com/teemuatlut/TMC2130Stepper.git
- sudo mv TMC2130Stepper /usr/local/share/arduino/libraries/TMC2130Stepper
#
# Install: TMC2208 Stepper Motor Controller library
- git clone https://github.com/teemuatlut/TMC2208Stepper.git
- sudo mv TMC2208Stepper /usr/local/share/arduino/libraries/TMC2208Stepper
#
# Install: Adafruit Neopixel library
- git clone https://github.com/adafruit/Adafruit_NeoPixel.git
- sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel
#
before_script:
#
# Change current working directory to the build dir
- cd ${TRAVIS_BUILD_DIR}
#
# Generate custom version include
- generate_version_header_for_marlin ${TRAVIS_BUILD_DIR}/Marlin
- cat ${TRAVIS_BUILD_DIR}/Marlin/_Version.h
#
script:
#
# Backup Configuration.h, Configuration_adv.h, and pins_RAMPS.h
#
- cp Marlin/Configuration.h Marlin/Configuration.h.backup
- cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup
- cp Marlin/pins_RAMPS.h Marlin/pins_RAMPS.h.backup
#
# Build with the default configurations
#
- build_marlin
#
# Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
# Test a "Fix Mounted" Probe with Safe Homing, some arc options,
# linear bed leveling, M48, leveling debug, and firmware retraction.
#
- opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
- opt_set EXTRUDERS 2
- opt_set TEMP_SENSOR_0 -2
- opt_set TEMP_SENSOR_1 1
- opt_set TEMP_SENSOR_BED 1
- opt_set POWER_SUPPLY 1
- opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS PINS_DEBUGGING
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
- opt_enable_adv ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE
- opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING
- opt_set GRID_MAX_POINTS_X 16
- opt_set_adv FANMUX0_PIN 53
- build_marlin
#
# Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders
#
- restore_configs
- opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
- opt_set EXTRUDERS 5
- opt_set TEMP_SENSOR_1 1
- opt_set TEMP_SENSOR_2 5
- opt_set TEMP_SENSOR_3 20
- opt_set TEMP_SENSOR_4 999
- opt_set TEMP_SENSOR_BED 1
- opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION
- opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
- opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC QUICK_HOME JUNCTION_DEVIATION MAX7219_DEBUG
- opt_set_adv MAX7219_ROTATE 270
- build_marlin
#
# Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language
#
- opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE S_CURVE_ACCELERATION
- opt_set LCD_LANGUAGE kana_utf8
- opt_disable SEGMENT_LEVELED_MOVES
- opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING
- build_marlin
#
# Test a Servo Probe
# ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
#
- restore_configs
- opt_enable NUM_SERVOS Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
- opt_set NUM_SERVOS 1
- opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
- opt_enable_adv NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
- build_marlin
#
# Test MESH_BED_LEVELING feature, with LCD
#
- restore_configs
- opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
- build_marlin
#
# Test MINIRAMBO for PWM_MOTOR_CURRENT
# PROBE_MANUALLY feature, with LCD support,
# ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
# PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
# Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
# ADVANCED_PAUSE_FEATURE, ADVANCED_PAUSE_CONTINUOUS_PURGE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU, M114_DETAIL
# EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
# INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
#
- restore_configs
- opt_set MOTHERBOARD BOARD_MINIRAMBO
- opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING ULTIMAKERCONTROLLER
- opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
- opt_enable ULTIMAKERCONTROLLER SDSUPPORT
- opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632
- opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
- opt_enable_adv ADVANCED_PAUSE_FEATURE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE LCD_INFO_MENU M114_DETAIL
- opt_set_adv PWM_MOTOR_CURRENT {1300,1300,1250}
- opt_set_adv I2C_SLAVE_ADDRESS 63
- build_marlin
#
# Mixing Extruder with 5 steppers, Cyrillic
#
- restore_configs
- opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
- opt_enable MIXING_EXTRUDER CR10_STOCKDISPLAY
- opt_set MIXING_STEPPERS 5
- opt_set LCD_LANGUAGE ru
- build_marlin
#
# Test DUAL_X_CARRIAGE
#
- restore_configs
- opt_set MOTHERBOARD BOARD_RUMBA
- opt_set EXTRUDERS 2
- opt_set TEMP_SENSOR_1 1
- opt_enable USE_XMAX_PLUG
- opt_enable_adv DUAL_X_CARRIAGE
- build_marlin
#
# Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
#
#- restore_configs
#- opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D
#- opt_set LCD_FEEDBACK_FREQUENCY_DURATION_MS 10
#- opt_set LCD_FEEDBACK_FREQUENCY_HZ 100
#- opt_enable BQ_LCD_SMART_CONTROLLER SPEAKER
#
# Test SWITCHING_EXTRUDER
#
- restore_configs
- opt_set MOTHERBOARD BOARD_RUMBA
- opt_set EXTRUDERS 2
- opt_enable NUM_SERVOS
- opt_set NUM_SERVOS 1
- opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
- build_marlin
#
# Enable COREXY
#
#- restore_configs
#- opt_enable COREXY
#- build_marlin
#
# Test many less common options
#
- restore_configs
- opt_enable COREYX
- opt_set_adv FAN_MIN_PWM 50
- opt_set_adv FAN_KICKSTART_TIME 100
- opt_set_adv XY_FREQUENCY_LIMIT 15
- opt_enable_adv SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER FAN_KICKSTART_TIME
- opt_enable_adv ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED ADVANCED_OK
- opt_enable_adv VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS ACTION_ON_KILL
- opt_enable_adv EXTRA_FAN_SPEED FWERETRACT Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
- opt_enable_adv MENU_ADDAUTOSTART SDCARD_SORT_ALPHA
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
- opt_enable FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR
- opt_enable ENDSTOP_INTERRUPTS_FEATURE FAN_SOFT_PWM SDSUPPORT
- opt_enable USE_XMAX_PLUG
- build_marlin
#
######## Other Standard LCD/Panels ##############
#
# ULTRA_LCD
#
#- restore_configs
#- opt_enable ULTRA_LCD
#- build_marlin
#
# DOGLCD
#
#- restore_configs
#- opt_enable DOGLCD
#- build_marlin
#
# MAKRPANEL
# Needs to use Melzi and Sanguino hardware
#
#- restore_configs
#- opt_enable MAKRPANEL
#- build_marlin
#
# REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, BABYSTEPPING, RIGIDBOARD_V2, and DAC_MOTOR_CURRENT_DEFAULT
#
#- restore_configs
#- opt_set MOTHERBOARD BOARD_RIGIDBOARD_V2
#- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
#- build_marlin
# #
# G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
#
#- restore_configs
#- opt_enable G3D_PANEL SDSUPPORT
#- opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
#- opt_set_adv SDSORT_GCODE true
#- opt_set_adv SDSORT_USES_RAM true
#- opt_set_adv SDSORT_USES_STACK true
#- opt_set_adv SDSORT_CACHE_NAMES true
#- build_marlin
#
# REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with LIGHTWEIGHT_UI
#
- restore_configs
- opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
- opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES LIGHTWEIGHT_UI
- opt_set_adv SDSORT_GCODE true
- opt_set_adv SDSORT_USES_RAM true
- opt_set_adv SDSORT_USES_STACK true
- opt_set_adv SDSORT_CACHE_NAMES true
- build_marlin
#
# REPRAPWORLD_KEYPAD
#
# Cant find configuration details to get it to compile
#- restore_configs
#- opt_enable ULTRA_LCD REPRAPWORLD_KEYPAD REPRAPWORLD_KEYPAD_MOVE_STEP
#- build_marlin
#
# RA_CONTROL_PANEL
#
#- restore_configs
#- opt_enable RA_CONTROL_PANEL PINS_DEBUGGING
#- build_marlin
#
######## I2C LCD/PANELS ##############
#
# !!!ATTENTION!!!
# Most I2C configurations are failing at the moment because they require
# a different Liquid Crystal library "LiquidTWI2".
#
# LCD_SAINSMART_I2C_1602
#
#- restore_configs
#- opt_enable LCD_SAINSMART_I2C_1602
#- build_marlin
#
# LCD_I2C_PANELOLU2
#
#- restore_configs
#- opt_enable LCD_I2C_PANELOLU2
#- build_marlin
#
# LCD_I2C_VIKI
#
#- restore_configs
#- opt_enable LCD_I2C_VIKI
#- build_marlin
#
# LCM1602
#
#- restore_configs
#- opt_enable LCM1602
#- build_marlin
#
# Language files test with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#
#- restore_configs
#- opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
#- for lang in an bg ca zh_CN zh_TW cz da de el el-gr en es eu fi fr gl hr it jp-kana ko_KR nl pl pt pt-br ru sk tr uk test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; build_marlin
#
#- restore_configs
#- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT
#- for lang in an bg ca zh_CN zh_TW cz da de el el-gr en es eu fi fr gl hr it jp-kana ko_KR nl pl pt pt-br ru sk tr uk test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; build_marlin
#
#
######## Example Configurations ##############
#
# BQ Hephestos 2
#- restore_configs
#- use_example_configs Hephestos_2
#- build_marlin
#
# Delta Config (generic) + ABL bilinear + PROBE_MANUALLY
- use_example_configs delta/generic
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
- build_marlin
#
# Delta Config (generic) + UBL + ALLEN_KEY + OLED_PANEL_TINYBOY2 + EEPROM_SETTINGS
#
- use_example_configs delta/generic
- opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT
- opt_enable OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
- build_marlin
#
# Delta Config (FLSUN AC because it's complex)
#
- use_example_configs delta/FLSUN/auto_calibrate
- build_marlin
#
# Makibox Config need to check board type for Teensy++ 2.0
#
#- use_example_configs makibox
#- build_marlin
#
# SCARA with TMC2130
#
- use_example_configs SCARA
- opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER
- opt_set X_DRIVER_TYPE TMC2130
- opt_set Y_DRIVER_TYPE TMC2130
- opt_set Z_DRIVER_TYPE TMC2130
- opt_set E0_DRIVER_TYPE TMC2130
- opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD SENSORLESS_HOMING
- build_marlin
#
# TMC2208 Config
#
- restore_configs
- opt_set X_DRIVER_TYPE TMC2208
- opt_set Y_DRIVER_TYPE TMC2208
- opt_set Z_DRIVER_TYPE TMC2208
- opt_set E0_DRIVER_TYPE TMC2208
- opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG
- build_marlin
#
# tvrrug Config need to check board type for sanguino atmega644p
#
#- use_example_configs tvrrug/Round2
#- build_marlin
#
#
######## Board Types #############
#
# To be added in nightly test branch
#

View File

@@ -3,7 +3,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -634,7 +634,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (c) {year} {name of author}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -654,7 +654,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (c) {year} {fullname}
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,11 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* feature/fanmux.h - Cooling Fan Multiplexer support functions
* Conditionals.h
* OBSOLETE: Replaced by Conditionals_LCD.h and Conditionals_post.h
*/
extern void fanmux_switch(const uint8_t e);
extern void fanmux_init();
#error "Old configurations? Please delete all #include lines from Configuration.h and Configuration_adv.h."

562
Marlin/Conditionals_LCD.h Normal file
View File

@@ -0,0 +1,562 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Conditionals_LCD.h
* Conditionals that need to be set before Configuration_adv.h or pins.h
*/
#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first
#define CONDITIONALS_LCD_H
#define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
#if ENABLED(CARTESIO_UI)
#define DOGLCD
#define ULTIPANEL
#define DEFAULT_LCD_CONTRAST 90
#define LCD_CONTRAST_MIN 60
#define LCD_CONTRAST_MAX 140
#elif ENABLED(MAKRPANEL)
#define U8GLIB_ST7565_64128N
#elif ENABLED(ZONESTAR_LCD)
#define REPRAPWORLD_KEYPAD
#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
#define ADC_KEYPAD
#define ADC_KEY_NUM 8
#define ULTIPANEL
// this helps to implement ADC_KEYPAD menus
#define ENCODER_PULSES_PER_STEP 1
#define ENCODER_STEPS_PER_MENU_ITEM 1
#define ENCODER_FEEDRATE_DEADZONE 2
#define REVERSE_MENU_DIRECTION
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#elif ENABLED(BQ_LCD_SMART_CONTROLLER)
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define ULTRA_LCD //general LCD support, also 16x2
#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
#if ENABLED(miniVIKI)
#define LCD_CONTRAST_MIN 75
#define LCD_CONTRAST_MAX 115
#define DEFAULT_LCD_CONTRAST 95
#define U8GLIB_ST7565_64128N
#elif ENABLED(VIKI2)
#define LCD_CONTRAST_MIN 0
#define LCD_CONTRAST_MAX 255
#define DEFAULT_LCD_CONTRAST 140
#define U8GLIB_ST7565_64128N
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define LCD_CONTRAST_MIN 90
#define LCD_CONTRAST_MAX 130
#define DEFAULT_LCD_CONTRAST 110
#define U8GLIB_LM6059_AF
#define SD_DETECT_INVERTED
#endif
#elif ENABLED(OLED_PANEL_TINYBOY2)
#define U8GLIB_SSD1306
#define ULTIPANEL
#define REVERSE_ENCODER_DIRECTION
#define REVERSE_MENU_DIRECTION
#elif ENABLED(RA_CONTROL_PANEL)
#define LCD_I2C_TYPE_PCA8574
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define ULTIPANEL
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define DOGLCD
#define U8GLIB_ST7920
#define ULTIPANEL
#elif ENABLED(CR10_STOCKDISPLAY)
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif
#elif ENABLED(MKS_12864OLED)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define U8GLIB_SH1106
#elif ENABLED(MKS_12864OLED_SSD1306)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define U8GLIB_SSD1306
#elif ENABLED(MKS_MINI_12864)
#define MINIPANEL
#endif
#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
#define DOGLCD
#define ULTIPANEL
#define DEFAULT_LCD_CONTRAST 17
#endif
#if ENABLED(ULTI_CONTROLLER)
#define U8GLIB_SSD1309
#define REVERSE_ENCODER_DIRECTION
#define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
#define LCD_CONTRAST_MIN 0
#define LCD_CONTRAST_MAX 254
#define DEFAULT_LCD_CONTRAST 127
#define ENCODER_PULSES_PER_STEP 2
#define ENCODER_STEPS_PER_MENU_ITEM 2
#endif
// Generic support for SSD1306 / SSD1309 / SH1106 OLED based LCDs.
#if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SSD1309) || ENABLED(U8GLIB_SH1106)
#define ULTRA_LCD //general LCD support, also 16x2
#define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SSD1309 / SH1106 graphic Display Family)
#endif
#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
#define ULTIMAKERCONTROLLER
#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define LCD_WIDTH 16
#define LCD_HEIGHT 2
#endif
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER)
#define DOGLCD
#define U8GLIB_ST7920
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#endif
#if ENABLED(ULTIMAKERCONTROLLER) \
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
|| ENABLED(G3D_PANEL) \
|| ENABLED(RIGIDBOT_PANEL) \
|| ENABLED(ULTI_CONTROLLER)
#define ULTIPANEL
#endif
#if ENABLED(REPRAPWORLD_KEYPAD)
#define NEWPANEL
#if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP)
#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
#endif
#endif
/**
* I2C PANELS
*/
#if ENABLED(LCD_SAINSMART_I2C_1602) || ENABLED(LCD_SAINSMART_I2C_2004)
#define LCD_I2C_TYPE_PCF8575
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define ULTRA_LCD
#if ENABLED(LCD_SAINSMART_I2C_2004)
#define LCD_WIDTH 20
#define LCD_HEIGHT 4
#endif
#elif ENABLED(LCD_I2C_PANELOLU2)
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
#define LCD_I2C_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
#define ULTIPANEL
#elif ENABLED(LCD_I2C_VIKI)
/**
* Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
*
* This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
* Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
* Note: The pause/stop/resume LCD button pin should be connected to the Arduino
* BTN_ENC pin (or set BTN_ENC to -1 if not used)
*/
#define LCD_I2C_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
#define ULTIPANEL
#define ENCODER_FEEDRATE_DEADZONE 4
#define STD_ENCODER_PULSES_PER_STEP 1
#define STD_ENCODER_STEPS_PER_MENU_ITEM 2
#elif ENABLED(G3D_PANEL)
#define STD_ENCODER_PULSES_PER_STEP 2
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
|| ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|| ENABLED(OLED_PANEL_TINYBOY2) \
|| ENABLED(BQ_LCD_SMART_CONTROLLER) \
|| ENABLED(LCD_I2C_PANELOLU2) \
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define STD_ENCODER_PULSES_PER_STEP 4
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#ifndef STD_ENCODER_PULSES_PER_STEP
#define STD_ENCODER_PULSES_PER_STEP 5
#endif
#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
#endif
#ifndef ENCODER_FEEDRATE_DEADZONE
#define ENCODER_FEEDRATE_DEADZONE 6
#endif
// Shift register panels
// ---------------------
// 2 wire Non-latching LCD SR from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
#if ENABLED(SAV_3DLCD)
#define SR_LCD_2W_NL // Non latching 2 wire shift register
#define ULTIPANEL
#endif
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
#ifndef LCD_WIDTH
#ifdef LCD_WIDTH_OVERRIDE
#define LCD_WIDTH LCD_WIDTH_OVERRIDE
#else
#define LCD_WIDTH 22
#endif
#endif
#ifndef LCD_HEIGHT
#define LCD_HEIGHT 5
#endif
#endif
#if ENABLED(NO_LCD_MENUS)
#undef ULTIPANEL
#endif
#if ENABLED(ULTIPANEL)
#define NEWPANEL // Disable this if you actually have no click-encoder panel
#define ULTRA_LCD
#ifndef LCD_WIDTH
#define LCD_WIDTH 20
#endif
#ifndef LCD_HEIGHT
#define LCD_HEIGHT 4
#endif
#elif ENABLED(ULTRA_LCD) // no panel but just LCD
#ifndef LCD_WIDTH
#define LCD_WIDTH 16
#endif
#ifndef LCD_HEIGHT
#define LCD_HEIGHT 2
#endif
#endif
#if ENABLED(DOGLCD)
/* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
// \x00 intentionally skipped to avoid problems in strings
#define LCD_STR_REFRESH "\x01"
#define LCD_STR_FOLDER "\x02"
#define LCD_STR_ARROW_RIGHT "\x03"
#define LCD_STR_UPLEVEL "\x04"
#define LCD_STR_CLOCK "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_BEDTEMP "\x07"
#define LCD_STR_THERMOMETER "\x08"
#define LCD_STR_DEGREE "\x09"
#define LCD_STR_SPECIAL_MAX '\x09'
// Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
// Symbol characters
#define LCD_STR_FILAM_DIA "\xf8"
#define LCD_STR_FILAM_MUL "\xa4"
#else
// Custom characters defined in the first 8 characters of the LCD
#define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string!
#define LCD_DEGREE_CHAR 0x01
#define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
#define LCD_UPLEVEL_CHAR 0x03
#define LCD_STR_REFRESH "\x04"
#define LCD_STR_FOLDER "\x05"
#define LCD_FEEDRATE_CHAR 0x06
#define LCD_CLOCK_CHAR 0x07
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
#endif
/**
* Default LCD contrast for dogm-like LCD displays
*/
#if ENABLED(DOGLCD)
#define HAS_LCD_CONTRAST ( \
ENABLED(MAKRPANEL) \
|| ENABLED(CARTESIO_UI) \
|| ENABLED(VIKI2) \
|| ENABLED(miniVIKI) \
|| ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
)
#if HAS_LCD_CONTRAST
#ifndef LCD_CONTRAST_MIN
#define LCD_CONTRAST_MIN 0
#endif
#ifndef LCD_CONTRAST_MAX
#define LCD_CONTRAST_MAX 63
#endif
#ifndef DEFAULT_LCD_CONTRAST
#define DEFAULT_LCD_CONTRAST 32
#endif
#endif
#endif
// Boot screens
#if DISABLED(ULTRA_LCD)
#undef SHOW_BOOTSCREEN
#elif !defined(BOOTSCREEN_TIMEOUT)
#define BOOTSCREEN_TIMEOUT 2500
#endif
#define HAS_DEBUG_MENU (ENABLED(ULTIPANEL) && ENABLED(LCD_PROGRESS_BAR_TEST))
/**
* Extruders have some combination of stepper motors and hotends
* so we separate these concepts into the defines:
*
* EXTRUDERS - Number of Selectable Tools
* HOTENDS - Number of hotends, whether connected or separate
* E_STEPPERS - Number of actual E stepper motors
* E_MANUAL - Number of E steppers for LCD move options
*
*/
#if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
#if EXTRUDERS > 4
#define E_STEPPERS 3
#elif EXTRUDERS > 2
#define E_STEPPERS 2
#else
#define E_STEPPERS 1
#endif
#if DISABLED(SWITCHING_NOZZLE)
#define HOTENDS E_STEPPERS
#endif
#define E_MANUAL EXTRUDERS
#elif ENABLED(MIXING_EXTRUDER)
#define E_STEPPERS MIXING_STEPPERS
#define E_MANUAL 1
#else
#define E_STEPPERS EXTRUDERS
#define E_MANUAL EXTRUDERS
#endif
// No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE
#if ENABLED(MK2_MULTIPLEXER) || ENABLED(SWITCHING_NOZZLE)
#undef DISABLE_INACTIVE_EXTRUDER
#endif
// MK2 Multiplexer forces SINGLENOZZLE
#if ENABLED(MK2_MULTIPLEXER)
#define SINGLENOZZLE
#endif
#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
#undef HOTENDS
#define HOTENDS 1
#undef TEMP_SENSOR_1_AS_REDUNDANT
#undef HOTEND_OFFSET_X
#undef HOTEND_OFFSET_Y
#endif
#ifndef HOTENDS
#define HOTENDS EXTRUDERS
#endif
#define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
/**
* DISTINCT_E_FACTORS affects how some E factors are accessed
*/
#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
#define XYZE_N (XYZ + E_STEPPERS)
#if ENABLED(HANGPRINTER)
#define NUM_AXIS_N (ABCD + E_STEPPERS)
#else
#define NUM_AXIS_N (XYZ + E_STEPPERS)
#endif
#define E_AXIS_N (E_AXIS + extruder)
#else
#undef DISTINCT_E_FACTORS
#define XYZE_N XYZE
#if ENABLED(HANGPRINTER)
#define NUM_AXIS_N ABCDE
#else
#define NUM_AXIS_N XYZE
#endif
#define E_AXIS_N E_AXIS
#endif
/**
* The BLTouch Probe emulates a servo probe
* and uses "special" angles for its state.
*/
#if ENABLED(BLTOUCH)
#ifndef Z_PROBE_SERVO_NR
#define Z_PROBE_SERVO_NR 0
#endif
#ifndef NUM_SERVOS
#define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
#endif
#undef DEACTIVATE_SERVOS_AFTER_MOVE
#if NUM_SERVOS == 1
#undef SERVO_DELAY
#define SERVO_DELAY { 50 }
#endif
#ifndef BLTOUCH_DELAY
#define BLTOUCH_DELAY 375
#endif
#undef Z_SERVO_ANGLES
#define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
#define BLTOUCH_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
#define BLTOUCH_DEPLOY 10
#define BLTOUCH_SW_MODE 60
#define BLTOUCH_STOW 90
#define BLTOUCH_SELFTEST 120
#define BLTOUCH_MODE_STORE 130
#define BLTOUCH_5V_MODE 140
#define BLTOUCH_OD_MODE 150
#define BLTOUCH_RESET 160
/**
* The following commands require different minimum delays.
*
* 500ms required for a reliable Reset.
*
* 750ms required for Deploy/Stow, otherwise the alarm state
* will not be seen until the following move command.
*/
#ifndef BLTOUCH_SET5V_DELAY
#define BLTOUCH_SET5V_DELAY 150
#endif
#ifndef BLTOUCH_SETOD_DELAY
#define BLTOUCH_SETOD_DELAY 150
#endif
#ifndef BLTOUCH_MODE_STORE_DELAY
#define BLTOUCH_MODE_STORE_DELAY 150
#endif
#ifndef BLTOUCH_DEPLOY_DELAY
#define BLTOUCH_DEPLOY_DELAY 750
#endif
#ifndef BLTOUCH_STOW_DELAY
#define BLTOUCH_STOW_DELAY 750
#endif
#ifndef BLTOUCH_RESET_DELAY
#define BLTOUCH_RESET_DELAY 500
#endif
#define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)
// Always disable probe pin inverting for BLTouch
#undef Z_MIN_PROBE_ENDSTOP_INVERTING
#define Z_MIN_PROBE_ENDSTOP_INVERTING false
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
#undef Z_MIN_ENDSTOP_INVERTING
#define Z_MIN_ENDSTOP_INVERTING Z_MIN_PROBE_ENDSTOP_INVERTING
#define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN)
#else
#define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN_PROBE)
#endif
#endif
/**
* Set a flag for a servo probe
*/
#define HAS_Z_SERVO_PROBE (defined(Z_PROBE_SERVO_NR) && Z_PROBE_SERVO_NR >= 0)
/**
* Set flags for enabled probes
*/
#define HAS_BED_PROBE (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_PROBE || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
#define PROBE_SELECTED (HAS_BED_PROBE || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING))
#if !HAS_BED_PROBE
// Clear probe pin settings when no probe is selected
#undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#undef Z_MIN_PROBE_ENDSTOP
#elif ENABLED(Z_PROBE_ALLEN_KEY)
// Extra test for Allen Key Probe
#define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
#endif
#define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
#define USE_MARLINSERIAL !(defined(__AVR__) && defined(USBCON))
#endif // CONDITIONALS_LCD_H

1423
Marlin/Conditionals_post.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,920 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Marlin Firmware -- G26 - Mesh Validation Tool
*/
#include "MarlinConfig.h"
#if ENABLED(G26_MESH_VALIDATION)
#include "Marlin.h"
#include "planner.h"
#include "stepper.h"
#include "temperature.h"
#include "ultralcd.h"
#include "parser.h"
#include "serial.h"
#include "bitmap_flags.h"
#if ENABLED(MESH_BED_LEVELING)
#include "mesh_bed_leveling.h"
#elif ENABLED(AUTO_BED_LEVELING_UBL)
#include "ubl.h"
#endif
#define EXTRUSION_MULTIPLIER 1.0
#define RETRACTION_MULTIPLIER 1.0
#define PRIME_LENGTH 10.0
#define OOZE_AMOUNT 0.3
#define INTERSECTION_CIRCLE_RADIUS 5
#define CROSSHAIRS_SIZE 3
#if CROSSHAIRS_SIZE >= INTERSECTION_CIRCLE_RADIUS
#error "CROSSHAIRS_SIZE must be less than INTERSECTION_CIRCLE_RADIUS."
#endif
#define G26_OK false
#define G26_ERR true
/**
* G26 Mesh Validation Tool
*
* G26 is a Mesh Validation Tool intended to provide support for the Marlin Unified Bed Leveling System.
* In order to fully utilize and benefit from the Marlin Unified Bed Leveling System an accurate Mesh must
* be defined. G29 is designed to allow the user to quickly validate the correctness of her Mesh. It will
* first heat the bed and nozzle. It will then print lines and circles along the Mesh Cell boundaries and
* the intersections of those lines (respectively).
*
* This action allows the user to immediately see where the Mesh is properly defined and where it needs to
* be edited. The command will generate the Mesh lines closest to the nozzle's starting position. Alternatively
* the user can specify the X and Y position of interest with command parameters. This allows the user to
* focus on a particular area of the Mesh where attention is needed.
*
* B # Bed Set the Bed Temperature. If not specified, a default of 60 C. will be assumed.
*
* C Current When searching for Mesh Intersection points to draw, use the current nozzle location
* as the base for any distance comparison.
*
* D Disable Disable the Unified Bed Leveling System. In the normal case the user is invoking this
* command to see how well a Mesh as been adjusted to match a print surface. In order to do
* this the Unified Bed Leveling System is turned on by the G26 command. The D parameter
* alters the command's normal behaviour and disables the Unified Bed Leveling System even if
* it is on.
*
* H # Hotend Set the Nozzle Temperature. If not specified, a default of 205 C. will be assumed.
*
* F # Filament Used to specify the diameter of the filament being used. If not specified
* 1.75mm filament is assumed. If you are not getting acceptable results by using the
* 'correct' numbers, you can scale this number up or down a little bit to change the amount
* of filament that is being extruded during the printing of the various lines on the bed.
*
* K Keep-On Keep the heaters turned on at the end of the command.
*
* L # Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used.
*
* O # Ooooze How much your nozzle will Ooooze filament while getting in position to print. This
* is over kill, but using this parameter will let you get the very first 'circle' perfect
* so you have a trophy to peel off of the bed and hang up to show how perfectly you have your
* Mesh calibrated. If not specified, a filament length of .3mm is assumed.
*
* P # Prime Prime the nozzle with specified length of filament. If this parameter is not
* given, no prime action will take place. If the parameter specifies an amount, that much
* will be purged before continuing. If no amount is specified the command will start
* purging filament until the user provides an LCD Click and then it will continue with
* printing the Mesh. You can carefully remove the spent filament with a needle nose
* pliers while holding the LCD Click wheel in a depressed state. If you do not have
* an LCD, you must specify a value if you use P.
*
* Q # Multiplier Retraction Multiplier. Normally not needed. Retraction defaults to 1.0mm and
* un-retraction is at 1.2mm These numbers will be scaled by the specified amount
*
* R # Repeat Prints the number of patterns given as a parameter, starting at the current location.
* If a parameter isn't given, every point will be printed unless G26 is interrupted.
* This works the same way that the UBL G29 P4 R parameter works.
*
* NOTE: If you do not have an LCD, you -must- specify R. This is to ensure that you are
* aware that there's some risk associated with printing without the ability to abort in
* cases where mesh point Z value may be inaccurate. As above, if you do not include a
* parameter, every point will be printed.
*
* S # Nozzle Used to control the size of nozzle diameter. If not specified, a .4mm nozzle is assumed.
*
* U # Random Randomize the order that the circles are drawn on the bed. The search for the closest
* undrawn cicle is still done. But the distance to the location for each circle has a
* random number of the size specified added to it. Specifying S50 will give an interesting
* deviation from the normal behaviour on a 10 x 10 Mesh.
*
* X # X Coord. Specify the starting location of the drawing activity.
*
* Y # Y Coord. Specify the starting location of the drawing activity.
*/
// External references
extern Planner planner;
// Private functions
static uint16_t circle_flags[16], horizontal_mesh_line_flags[16], vertical_mesh_line_flags[16];
float g26_e_axis_feedrate = 0.025,
random_deviation = 0.0;
static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched
// retracts/recovers won't result in a bad state.
static float g26_extrusion_multiplier,
g26_retraction_multiplier,
g26_layer_height,
g26_prime_length,
g26_x_pos, g26_y_pos;
static int16_t g26_bed_temp,
g26_hotend_temp;
static int8_t g26_prime_flag;
#if ENABLED(ULTIPANEL)
/**
* If the LCD is clicked, cancel, wait for release, return true
*/
bool user_canceled() {
if (!is_lcd_clicked()) return false; // Return if the button isn't pressed
lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
#if ENABLED(ULTIPANEL)
lcd_quick_feedback(true);
#endif
wait_for_release();
return true;
}
bool exit_from_g26() {
lcd_setstatusPGM(PSTR("Leaving G26"), -1);
wait_for_release();
return G26_ERR;
}
#endif
void G26_line_to_destination(const float &feed_rate) {
const float save_feedrate = feedrate_mm_s;
feedrate_mm_s = feed_rate;
prepare_move_to_destination(); // will ultimately call ubl.line_to_destination_cartesian or ubl.prepare_linear_move_to for UBL_SEGMENTED
feedrate_mm_s = save_feedrate;
}
void move_to(const float &rx, const float &ry, const float &z, const float &e_delta) {
float feed_value;
static float last_z = -999.99;
bool has_xy_component = (rx != current_position[X_AXIS] || ry != current_position[Y_AXIS]); // Check if X or Y is involved in the movement.
if (z != last_z) {
last_z = z;
feed_value = planner.max_feedrate_mm_s[Z_AXIS]/(3.0); // Base the feed rate off of the configured Z_AXIS feed rate
destination[X_AXIS] = current_position[X_AXIS];
destination[Y_AXIS] = current_position[Y_AXIS];
destination[Z_AXIS] = z; // We know the last_z==z or we wouldn't be in this block of code.
destination[E_CART] = current_position[E_CART];
G26_line_to_destination(feed_value);
set_destination_from_current();
}
// Check if X or Y is involved in the movement.
// Yes: a 'normal' movement. No: a retract() or recover()
feed_value = has_xy_component ? PLANNER_XY_FEEDRATE() / 10.0 : planner.max_feedrate_mm_s[E_AXIS] / 1.5;
if (g26_debug_flag) SERIAL_ECHOLNPAIR("in move_to() feed_value for XY:", feed_value);
destination[X_AXIS] = rx;
destination[Y_AXIS] = ry;
destination[E_CART] += e_delta;
G26_line_to_destination(feed_value);
set_destination_from_current();
}
FORCE_INLINE void move_to(const float where[XYZE], const float &de) { move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], de); }
void retract_filament(const float where[XYZE]) {
if (!g26_retracted) { // Only retract if we are not already retracted!
g26_retracted = true;
move_to(where, -1.0 * g26_retraction_multiplier);
}
}
void recover_filament(const float where[XYZE]) {
if (g26_retracted) { // Only un-retract if we are retracted.
move_to(where, 1.2 * g26_retraction_multiplier);
g26_retracted = false;
}
}
/**
* Prime the nozzle if needed. Return true on error.
*/
inline bool prime_nozzle() {
#if ENABLED(ULTIPANEL)
float Total_Prime = 0.0;
if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged
lcd_external_control = true;
lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
lcd_chirp();
set_destination_from_current();
recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
while (!is_lcd_clicked()) {
lcd_chirp();
destination[E_CART] += 0.25;
#ifdef PREVENT_LENGTHY_EXTRUDE
Total_Prime += 0.25;
if (Total_Prime >= EXTRUDE_MAXLENGTH) return G26_ERR;
#endif
G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
set_destination_from_current();
planner.synchronize(); // Without this synchronize, the purge is more consistent,
// but because the planner has a buffer, we won't be able
// to stop as quickly. So we put up with the less smooth
// action to give the user a more responsive 'Stop'.
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
}
wait_for_release();
lcd_setstatusPGM(PSTR("Done Priming"), 99);
lcd_quick_feedback(true);
lcd_external_control = false;
}
else
#endif
{
#if ENABLED(ULTRA_LCD)
lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
lcd_quick_feedback(true);
#endif
set_destination_from_current();
destination[E_CART] += g26_prime_length;
G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
set_destination_from_current();
retract_filament(destination);
}
return G26_OK;
}
mesh_index_pair find_closest_circle_to_print(const float &X, const float &Y) {
float closest = 99999.99;
mesh_index_pair return_val;
return_val.x_index = return_val.y_index = -1;
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
if (!is_bitmap_set(circle_flags, i, j)) {
const float mx = _GET_MESH_X(i), // We found a circle that needs to be printed
my = _GET_MESH_Y(j);
// Get the distance to this intersection
float f = HYPOT(X - mx, Y - my);
// It is possible that we are being called with the values
// to let us find the closest circle to the start position.
// But if this is not the case, add a small weighting to the
// distance calculation to help it choose a better place to continue.
f += HYPOT(g26_x_pos - mx, g26_y_pos - my) / 15.0;
// Add in the specified amount of Random Noise to our search
if (random_deviation > 1.0)
f += random(0.0, random_deviation);
if (f < closest) {
closest = f; // We found a closer location that is still
return_val.x_index = i; // un-printed --- save the data for it
return_val.y_index = j;
return_val.distance = closest;
}
}
}
}
bitmap_set(circle_flags, return_val.x_index, return_val.y_index); // Mark this location as done.
return return_val;
}
/**
* print_line_from_here_to_there() takes two cartesian coordinates and draws a line from one
* to the other. But there are really three sets of coordinates involved. The first coordinate
* is the present location of the nozzle. We don't necessarily want to print from this location.
* We first need to move the nozzle to the start of line segment where we want to print. Once
* there, we can use the two coordinates supplied to draw the line.
*
* Note: Although we assume the first set of coordinates is the start of the line and the second
* set of coordinates is the end of the line, it does not always work out that way. This function
* optimizes the movement to minimize the travel distance before it can start printing. This saves
* a lot of time and eliminates a lot of nonsensical movement of the nozzle. However, it does
* cause a lot of very little short retracement of th nozzle when it draws the very first line
* segment of a 'circle'. The time this requires is very short and is easily saved by the other
* cases where the optimization comes into play.
*/
void print_line_from_here_to_there(const float &sx, const float &sy, const float &sz, const float &ex, const float &ey, const float &ez) {
const float dx_s = current_position[X_AXIS] - sx, // find our distance from the start of the actual line segment
dy_s = current_position[Y_AXIS] - sy,
dist_start = HYPOT2(dx_s, dy_s), // We don't need to do a sqrt(), we can compare the distance^2
// to save computation time
dx_e = current_position[X_AXIS] - ex, // find our distance from the end of the actual line segment
dy_e = current_position[Y_AXIS] - ey,
dist_end = HYPOT2(dx_e, dy_e),
line_length = HYPOT(ex - sx, ey - sy);
// If the end point of the line is closer to the nozzle, flip the direction,
// moving from the end to the start. On very small lines the optimization isn't worth it.
if (dist_end < dist_start && (INTERSECTION_CIRCLE_RADIUS) < ABS(line_length))
return print_line_from_here_to_there(ex, ey, ez, sx, sy, sz);
// Decide whether to retract & bump
if (dist_start > 2.0) {
retract_filament(destination);
//todo: parameterize the bump height with a define
move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + 0.500, 0.0); // Z bump to minimize scraping
move_to(sx, sy, sz + 0.500, 0.0); // Get to the starting point with no extrusion while bumped
}
move_to(sx, sy, sz, 0.0); // Get to the starting point with no extrusion / un-Z bump
const float e_pos_delta = line_length * g26_e_axis_feedrate * g26_extrusion_multiplier;
recover_filament(destination);
move_to(ex, ey, ez, e_pos_delta); // Get to the ending point with an appropriate amount of extrusion
}
inline bool look_for_lines_to_connect() {
float sx, sy, ex, ey;
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
#if ENABLED(ULTIPANEL)
if (user_canceled()) return true; // Check if the user wants to stop the Mesh Validation
#endif
if (i < GRID_MAX_POINTS_X) { // We can't connect to anything to the right than GRID_MAX_POINTS_X.
// This is already a half circle because we are at the edge of the bed.
if (is_bitmap_set(circle_flags, i, j) && is_bitmap_set(circle_flags, i + 1, j)) { // check if we can do a line to the left
if (!is_bitmap_set(horizontal_mesh_line_flags, i, j)) {
//
// We found two circles that need a horizontal line to connect them
// Print it!
//
sx = _GET_MESH_X( i ) + (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // right edge
ex = _GET_MESH_X(i + 1) - (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // left edge
sx = constrain(sx, X_MIN_POS + 1, X_MAX_POS - 1);
sy = ey = constrain(_GET_MESH_Y(j), Y_MIN_POS + 1, Y_MAX_POS - 1);
ex = constrain(ex, X_MIN_POS + 1, X_MAX_POS - 1);
if (position_is_reachable(sx, sy) && position_is_reachable(ex, ey)) {
if (g26_debug_flag) {
SERIAL_ECHOPAIR(" Connecting with horizontal line (sx=", sx);
SERIAL_ECHOPAIR(", sy=", sy);
SERIAL_ECHOPAIR(") -> (ex=", ex);
SERIAL_ECHOPAIR(", ey=", ey);
SERIAL_CHAR(')');
SERIAL_EOL();
//debug_current_and_destination(PSTR("Connecting horizontal line."));
}
print_line_from_here_to_there(sx, sy, g26_layer_height, ex, ey, g26_layer_height);
}
bitmap_set(horizontal_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if we skipped it
}
}
if (j < GRID_MAX_POINTS_Y) { // We can't connect to anything further back than GRID_MAX_POINTS_Y.
// This is already a half circle because we are at the edge of the bed.
if (is_bitmap_set(circle_flags, i, j) && is_bitmap_set(circle_flags, i, j + 1)) { // check if we can do a line straight down
if (!is_bitmap_set( vertical_mesh_line_flags, i, j)) {
//
// We found two circles that need a vertical line to connect them
// Print it!
//
sy = _GET_MESH_Y( j ) + (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // top edge
ey = _GET_MESH_Y(j + 1) - (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // bottom edge
sx = ex = constrain(_GET_MESH_X(i), X_MIN_POS + 1, X_MAX_POS - 1);
sy = constrain(sy, Y_MIN_POS + 1, Y_MAX_POS - 1);
ey = constrain(ey, Y_MIN_POS + 1, Y_MAX_POS - 1);
if (position_is_reachable(sx, sy) && position_is_reachable(ex, ey)) {
if (g26_debug_flag) {
SERIAL_ECHOPAIR(" Connecting with vertical line (sx=", sx);
SERIAL_ECHOPAIR(", sy=", sy);
SERIAL_ECHOPAIR(") -> (ex=", ex);
SERIAL_ECHOPAIR(", ey=", ey);
SERIAL_CHAR(')');
SERIAL_EOL();
#if ENABLED(AUTO_BED_LEVELING_UBL)
debug_current_and_destination(PSTR("Connecting vertical line."));
#endif
}
print_line_from_here_to_there(sx, sy, g26_layer_height, ex, ey, g26_layer_height);
}
bitmap_set(vertical_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if skipped
}
}
}
}
}
}
return false;
}
/**
* Turn on the bed and nozzle heat and
* wait for them to get up to temperature.
*/
inline bool turn_on_heaters() {
millis_t next = millis() + 5000UL;
#if HAS_HEATED_BED
#if ENABLED(ULTRA_LCD)
if (g26_bed_temp > 25) {
lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
lcd_quick_feedback(true);
#if ENABLED(ULTIPANEL)
lcd_external_control = true;
#endif
#endif
thermalManager.setTargetBed(g26_bed_temp);
while (ABS(thermalManager.degBed() - g26_bed_temp) > 3) {
#if ENABLED(ULTIPANEL)
if (is_lcd_clicked()) return exit_from_g26();
#endif
if (ELAPSED(millis(), next)) {
next = millis() + 5000UL;
thermalManager.print_heaterstates();
SERIAL_EOL();
}
idle();
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
}
#if ENABLED(ULTRA_LCD)
}
lcd_setstatusPGM(PSTR("G26 Heating Nozzle."), 99);
lcd_quick_feedback(true);
#endif
#endif
// Start heating the nozzle and wait for it to reach temperature.
thermalManager.setTargetHotend(g26_hotend_temp, 0);
while (ABS(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
#if ENABLED(ULTIPANEL)
if (is_lcd_clicked()) return exit_from_g26();
#endif
if (ELAPSED(millis(), next)) {
next = millis() + 5000UL;
thermalManager.print_heaterstates();
SERIAL_EOL();
}
idle();
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
}
#if ENABLED(ULTRA_LCD)
lcd_reset_status();
lcd_quick_feedback(true);
#endif
return G26_OK;
}
float valid_trig_angle(float d) {
while (d > 360.0) d -= 360.0;
while (d < 0.0) d += 360.0;
return d;
}
/**
* G26: Mesh Validation Pattern generation.
*
* Used to interactively edit the mesh by placing the
* nozzle in a problem area and doing a G29 P4 R command.
*
* Parameters:
*
* B Bed Temperature
* C Continue from the Closest mesh point
* D Disable leveling before starting
* F Filament diameter
* H Hotend Temperature
* K Keep heaters on when completed
* L Layer Height
* O Ooze extrusion length
* P Prime length
* Q Retraction multiplier
* R Repetitions (number of grid points)
* S Nozzle Size (diameter) in mm
* U Random deviation (50 if no value given)
* X X position
* Y Y position
*/
void gcode_G26() {
SERIAL_ECHOLNPGM("G26 command started. Waiting for heater(s).");
// Don't allow Mesh Validation without homing first,
// or if the parameter parsing did not go OK, abort
if (axis_unhomed_error()) return;
g26_extrusion_multiplier = EXTRUSION_MULTIPLIER;
g26_retraction_multiplier = RETRACTION_MULTIPLIER;
g26_layer_height = MESH_TEST_LAYER_HEIGHT;
g26_prime_length = PRIME_LENGTH;
g26_bed_temp = MESH_TEST_BED_TEMP;
g26_hotend_temp = MESH_TEST_HOTEND_TEMP;
g26_prime_flag = 0;
float g26_nozzle = MESH_TEST_NOZZLE_SIZE,
g26_filament_diameter = DEFAULT_NOMINAL_FILAMENT_DIA,
g26_ooze_amount = parser.linearval('O', OOZE_AMOUNT);
bool g26_continue_with_closest = parser.boolval('C'),
g26_keep_heaters_on = parser.boolval('K');
if (parser.seenval('B')) {
g26_bed_temp = parser.value_celsius();
if (g26_bed_temp && !WITHIN(g26_bed_temp, 40, 140)) {
SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible (40-140C).");
return;
}
}
if (parser.seenval('L')) {
g26_layer_height = parser.value_linear_units();
if (!WITHIN(g26_layer_height, 0.0, 2.0)) {
SERIAL_PROTOCOLLNPGM("?Specified layer height not plausible.");
return;
}
}
if (parser.seen('Q')) {
if (parser.has_value()) {
g26_retraction_multiplier = parser.value_float();
if (!WITHIN(g26_retraction_multiplier, 0.05, 15.0)) {
SERIAL_PROTOCOLLNPGM("?Specified Retraction Multiplier not plausible.");
return;
}
}
else {
SERIAL_PROTOCOLLNPGM("?Retraction Multiplier must be specified.");
return;
}
}
if (parser.seenval('S')) {
g26_nozzle = parser.value_float();
if (!WITHIN(g26_nozzle, 0.1, 1.0)) {
SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible.");
return;
}
}
if (parser.seen('P')) {
if (!parser.has_value()) {
#if ENABLED(ULTIPANEL)
g26_prime_flag = -1;
#else
SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
return;
#endif
}
else {
g26_prime_flag++;
g26_prime_length = parser.value_linear_units();
if (!WITHIN(g26_prime_length, 0.0, 25.0)) {
SERIAL_PROTOCOLLNPGM("?Specified prime length not plausible.");
return;
}
}
}
if (parser.seenval('F')) {
g26_filament_diameter = parser.value_linear_units();
if (!WITHIN(g26_filament_diameter, 1.0, 4.0)) {
SERIAL_PROTOCOLLNPGM("?Specified filament size not plausible.");
return;
}
}
g26_extrusion_multiplier *= sq(1.75) / sq(g26_filament_diameter); // If we aren't using 1.75mm filament, we need to
// scale up or down the length needed to get the
// same volume of filament
g26_extrusion_multiplier *= g26_filament_diameter * sq(g26_nozzle) / sq(0.3); // Scale up by nozzle size
if (parser.seenval('H')) {
g26_hotend_temp = parser.value_celsius();
if (!WITHIN(g26_hotend_temp, 165, 280)) {
SERIAL_PROTOCOLLNPGM("?Specified nozzle temperature not plausible.");
return;
}
}
if (parser.seen('U')) {
randomSeed(millis());
// This setting will persist for the next G26
random_deviation = parser.has_value() ? parser.value_float() : 50.0;
}
int16_t g26_repeats;
#if ENABLED(ULTIPANEL)
g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
#else
if (!parser.seen('R')) {
SERIAL_PROTOCOLLNPGM("?(R)epeat must be specified when not using an LCD.");
return;
}
else
g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
#endif
if (g26_repeats < 1) {
SERIAL_PROTOCOLLNPGM("?(R)epeat value not plausible; must be at least 1.");
return;
}
g26_x_pos = parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position[X_AXIS];
g26_y_pos = parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position[Y_AXIS];
if (!position_is_reachable(g26_x_pos, g26_y_pos)) {
SERIAL_PROTOCOLLNPGM("?Specified X,Y coordinate out of bounds.");
return;
}
/**
* Wait until all parameters are verified before altering the state!
*/
set_bed_leveling_enabled(!parser.seen('D'));
if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
set_current_from_destination();
}
if (turn_on_heaters() != G26_OK) goto LEAVE;
current_position[E_CART] = 0.0;
sync_plan_position_e();
if (g26_prime_flag && prime_nozzle() != G26_OK) goto LEAVE;
/**
* Bed is preheated
*
* Nozzle is at temperature
*
* Filament is primed!
*
* It's "Show Time" !!!
*/
ZERO(circle_flags);
ZERO(horizontal_mesh_line_flags);
ZERO(vertical_mesh_line_flags);
// Move nozzle to the specified height for the first layer
set_destination_from_current();
destination[Z_AXIS] = g26_layer_height;
move_to(destination, 0.0);
move_to(destination, g26_ooze_amount);
#if ENABLED(ULTIPANEL)
lcd_external_control = true;
#endif
//debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern."));
#if DISABLED(ARC_SUPPORT)
/**
* Pre-generate radius offset values at 30 degree intervals to reduce CPU load.
*/
#define A_INT 30
#define _ANGS (360 / A_INT)
#define A_CNT (_ANGS / 2)
#define _IND(A) ((A + _ANGS * 8) % _ANGS)
#define _COS(A) (trig_table[_IND(A) % A_CNT] * (_IND(A) >= A_CNT ? -1 : 1))
#define _SIN(A) (-_COS((A + A_CNT / 2) % _ANGS))
#if A_CNT & 1
#error "A_CNT must be a positive value. Please change A_INT."
#endif
float trig_table[A_CNT];
for (uint8_t i = 0; i < A_CNT; i++)
trig_table[i] = INTERSECTION_CIRCLE_RADIUS * cos(RADIANS(i * A_INT));
#endif // !ARC_SUPPORT
mesh_index_pair location;
do {
location = g26_continue_with_closest
? find_closest_circle_to_print(current_position[X_AXIS], current_position[Y_AXIS])
: find_closest_circle_to_print(g26_x_pos, g26_y_pos); // Find the closest Mesh Intersection to where we are now.
if (location.x_index >= 0 && location.y_index >= 0) {
const float circle_x = _GET_MESH_X(location.x_index),
circle_y = _GET_MESH_Y(location.y_index);
// If this mesh location is outside the printable_radius, skip it.
if (!position_is_reachable(circle_x, circle_y)) continue;
// Determine where to start and end the circle,
// which is always drawn counter-clockwise.
const uint8_t xi = location.x_index, yi = location.y_index;
const bool f = yi == 0, r = xi >= GRID_MAX_POINTS_X - 1, b = yi >= GRID_MAX_POINTS_Y - 1;
#if ENABLED(ARC_SUPPORT)
#define ARC_LENGTH(quarters) (INTERSECTION_CIRCLE_RADIUS * M_PI * (quarters) / 2)
float sx = circle_x + INTERSECTION_CIRCLE_RADIUS, // default to full circle
ex = circle_x + INTERSECTION_CIRCLE_RADIUS,
sy = circle_y, ey = circle_y,
arc_length = ARC_LENGTH(4);
// Figure out where to start and end the arc - we always print counterclockwise
if (xi == 0) { // left edge
sx = f ? circle_x + INTERSECTION_CIRCLE_RADIUS : circle_x;
ex = b ? circle_x + INTERSECTION_CIRCLE_RADIUS : circle_x;
sy = f ? circle_y : circle_y - INTERSECTION_CIRCLE_RADIUS;
ey = b ? circle_y : circle_y + INTERSECTION_CIRCLE_RADIUS;
arc_length = (f || b) ? ARC_LENGTH(1) : ARC_LENGTH(2);
}
else if (r) { // right edge
sx = b ? circle_x - INTERSECTION_CIRCLE_RADIUS : circle_x;
ex = f ? circle_x - INTERSECTION_CIRCLE_RADIUS : circle_x;
sy = b ? circle_y : circle_y + INTERSECTION_CIRCLE_RADIUS;
ey = f ? circle_y : circle_y - INTERSECTION_CIRCLE_RADIUS;
arc_length = (f || b) ? ARC_LENGTH(1) : ARC_LENGTH(2);
}
else if (f) {
sx = circle_x + INTERSECTION_CIRCLE_RADIUS;
ex = circle_x - INTERSECTION_CIRCLE_RADIUS;
sy = ey = circle_y;
arc_length = ARC_LENGTH(2);
}
else if (b) {
sx = circle_x - INTERSECTION_CIRCLE_RADIUS;
ex = circle_x + INTERSECTION_CIRCLE_RADIUS;
sy = ey = circle_y;
arc_length = ARC_LENGTH(2);
}
const float arc_offset[2] = {
circle_x - sx,
circle_y - sy
};
const float dx_s = current_position[X_AXIS] - sx, // find our distance from the start of the actual circle
dy_s = current_position[Y_AXIS] - sy,
dist_start = HYPOT2(dx_s, dy_s);
const float endpoint[XYZE] = {
ex, ey,
g26_layer_height,
current_position[E_CART] + (arc_length * g26_e_axis_feedrate * g26_extrusion_multiplier)
};
if (dist_start > 2.0) {
retract_filament(destination);
//todo: parameterize the bump height with a define
move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + 0.500, 0.0); // Z bump to minimize scraping
move_to(sx, sy, g26_layer_height + 0.500, 0.0); // Get to the starting point with no extrusion while bumped
}
move_to(sx, sy, g26_layer_height, 0.0); // Get to the starting point with no extrusion / un-Z bump
recover_filament(destination);
const float save_feedrate = feedrate_mm_s;
feedrate_mm_s = PLANNER_XY_FEEDRATE() / 10.0;
plan_arc(endpoint, arc_offset, false); // Draw a counter-clockwise arc
feedrate_mm_s = save_feedrate;
set_destination_from_current();
#if ENABLED(ULTIPANEL)
if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
#endif
#else // !ARC_SUPPORT
int8_t start_ind = -2, end_ind = 9; // Assume a full circle (from 5:00 to 5:00)
if (xi == 0) { // Left edge? Just right half.
start_ind = f ? 0 : -3; // 03:00 to 12:00 for front-left
end_ind = b ? 0 : 2; // 06:00 to 03:00 for back-left
}
else if (r) { // Right edge? Just left half.
start_ind = b ? 6 : 3; // 12:00 to 09:00 for front-right
end_ind = f ? 5 : 8; // 09:00 to 06:00 for back-right
}
else if (f) { // Front edge? Just back half.
start_ind = 0; // 03:00
end_ind = 5; // 09:00
}
else if (b) { // Back edge? Just front half.
start_ind = 6; // 09:00
end_ind = 11; // 03:00
}
for (int8_t ind = start_ind; ind <= end_ind; ind++) {
#if ENABLED(ULTIPANEL)
if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation
#endif
float rx = circle_x + _COS(ind), // For speed, these are now a lookup table entry
ry = circle_y + _SIN(ind),
xe = circle_x + _COS(ind + 1),
ye = circle_y + _SIN(ind + 1);
#if IS_KINEMATIC
// Check to make sure this segment is entirely on the bed, skip if not.
if (!position_is_reachable(rx, ry) || !position_is_reachable(xe, ye)) continue;
#else // not, we need to skip
rx = constrain(rx, X_MIN_POS + 1, X_MAX_POS - 1); // This keeps us from bumping the endstops
ry = constrain(ry, Y_MIN_POS + 1, Y_MAX_POS - 1);
xe = constrain(xe, X_MIN_POS + 1, X_MAX_POS - 1);
ye = constrain(ye, Y_MIN_POS + 1, Y_MAX_POS - 1);
#endif
print_line_from_here_to_there(rx, ry, g26_layer_height, xe, ye, g26_layer_height);
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
}
#endif // !ARC_SUPPORT
if (look_for_lines_to_connect()) goto LEAVE;
}
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
} while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0);
LEAVE:
lcd_setstatusPGM(PSTR("Leaving G26"), -1);
retract_filament(destination);
destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;
//debug_current_and_destination(PSTR("ready to do Z-Raise."));
move_to(destination, 0); // Raise the nozzle
//debug_current_and_destination(PSTR("done doing Z-Raise."));
destination[X_AXIS] = g26_x_pos; // Move back to the starting position
destination[Y_AXIS] = g26_y_pos;
//destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES; // Keep the nozzle where it is
move_to(destination, 0); // Move back to the starting position
//debug_current_and_destination(PSTR("done doing X/Y move."));
#if ENABLED(ULTIPANEL)
lcd_external_control = false; // Give back control of the LCD Panel!
#endif
if (!g26_keep_heaters_on) {
#if HAS_HEATED_BED
thermalManager.setTargetBed(0);
#endif
thermalManager.setTargetHotend(0, 0);
}
}
#endif // G26_MESH_VALIDATION

View File

@@ -1,146 +1,92 @@
/* **************************************************************************
Marlin 3D Printer Firmware
Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Description: HAL for __AVR__
*/
#pragma once
#include "../shared/Marduino.h"
#include "../shared/HAL_SPI.h"
#ifndef _HAL_AVR_H_
#define _HAL_AVR_H_
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "fastio.h"
#include "watchdog.h"
#include "math.h"
#ifdef USBCON
#include <HardwareSerial.h>
#else
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
#include "MarlinSerial.h"
#endif
#include <stdint.h>
#include <Arduino.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <avr/io.h>
#ifndef pgm_read_ptr
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019
#define pgm_read_ptr_far(address_long) (void*)__ELPM_word((uint32_t)(address_long))
#define pgm_read_ptr_near(address_short) (void*)__LPM_word((uint16_t)(address_short))
#define pgm_read_ptr(address_short) pgm_read_ptr_near(address_short)
#endif
// ------------------------
// --------------------------------------------------------------------------
// Defines
// ------------------------
// --------------------------------------------------------------------------
//#define analogInputToDigitalPin(IO) IO
// Bracket code that shouldn't be interrupted
#ifndef CRITICAL_SECTION_START
#define CRITICAL_SECTION_START() unsigned char _sreg = SREG; cli()
#define CRITICAL_SECTION_END() SREG = _sreg
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli()
#define CRITICAL_SECTION_END SREG = _sreg
#endif
#define ISRS_ENABLED() TEST(SREG, SREG_I)
#define ENABLE_ISRS() sei()
#define DISABLE_ISRS() cli()
// On AVR this is in math.h?
//#define square(x) ((x)*(x))
// ------------------------
// --------------------------------------------------------------------------
// Types
// ------------------------
// --------------------------------------------------------------------------
typedef uint16_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFF
typedef int8_t pin_t;
#define SHARED_SERVOS HAS_SERVOS
#define HAL_SERVO_LIB Servo
// ------------------------
// --------------------------------------------------------------------------
// Public Variables
// ------------------------
// --------------------------------------------------------------------------
//extern uint8_t MCUSR;
// Serial ports
#ifdef USBCON
#if ENABLED(BLUETOOTH)
#define MYSERIAL0 bluetoothSerial
#else
#define MYSERIAL0 Serial
#endif
#define NUM_SERIAL 1
#else
#if !WITHIN(SERIAL_PORT, -1, 3)
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
#endif
#define MYSERIAL0 customizedSerial1
#ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 3)
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
#elif SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#endif
#define MYSERIAL1 customizedSerial2
#define NUM_SERIAL 2
#else
#define NUM_SERIAL 1
#endif
#endif
#ifdef DGUS_SERIAL_PORT
#if !WITHIN(DGUS_SERIAL_PORT, -1, 3)
#error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
#elif DGUS_SERIAL_PORT == SERIAL_PORT
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
#elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
#endif
#define DGUS_SERIAL internalDgusSerial
#define DGUS_SERIAL_GET_TX_BUFFER_FREE DGUS_SERIAL.get_tx_buffer_free
#endif
// ------------------------
// --------------------------------------------------------------------------
// Public functions
// ------------------------
// --------------------------------------------------------------------------
void HAL_init();
//void cli();
//void cli(void);
//void _delay_ms(const int delay);
inline void HAL_clear_reset_source() { MCUSR = 0; }
inline uint8_t HAL_get_reset_source() { return MCUSR; }
inline void HAL_clear_reset_source(void) { MCUSR = 0; }
inline uint8_t HAL_get_reset_source(void) { return MCUSR; }
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
extern "C" {
int freeMemory();
}
#pragma GCC diagnostic pop
// eeprom
//void eeprom_write_byte(unsigned char *pos, unsigned char value);
//unsigned char eeprom_read_byte(unsigned char *pos);
// timers
#define HAL_TIMER_RATE ((F_CPU) / 8) // i.e., 2MHz or 2.5MHz
@@ -167,7 +113,8 @@ extern "C" {
#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B)
#define TEMPERATURE_ISR_ENABLED() TEST(TIMSK0, OCIE0B)
FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
UNUSED(frequency);
switch (timer_num) {
case STEP_TIMER_NUM:
// waveform generation = 0100 = CTC
@@ -203,7 +150,7 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
#define TIMER_OCR_0 OCR0A
#define TIMER_COUNTER_0 TCNT0
#define _CAT(a,V...) a##V
#define _CAT(a, ...) a ## __VA_ARGS__
#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
@@ -218,10 +165,10 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
#define HAL_timer_isr_epilogue(TIMER_NUM)
/* 18 cycles maximum latency */
#define HAL_STEP_TIMER_ISR() \
extern "C" void TIMER1_COMPA_vect() __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER1_COMPA_vect_bottom() asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER1_COMPA_vect() { \
#define HAL_STEP_TIMER_ISR \
extern "C" void TIMER1_COMPA_vect (void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER1_COMPA_vect_bottom (void) asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER1_COMPA_vect (void) { \
__asm__ __volatile__ ( \
A("push r16") /* 2 Save R16 */ \
A("in r16, __SREG__") /* 1 Get SREG */ \
@@ -288,13 +235,13 @@ void TIMER1_COMPA_vect() { \
: \
); \
} \
void TIMER1_COMPA_vect_bottom()
void TIMER1_COMPA_vect_bottom(void)
/* 14 cycles maximum latency */
#define HAL_TEMP_TIMER_ISR() \
extern "C" void TIMER0_COMPB_vect() __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER0_COMPB_vect_bottom() asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER0_COMPB_vect() { \
#define HAL_TEMP_TIMER_ISR \
extern "C" void TIMER0_COMPB_vect (void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER0_COMPB_vect_bottom(void) asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER0_COMPB_vect (void) { \
__asm__ __volatile__ ( \
A("push r16") /* 2 Save R16 */ \
A("in r16, __SREG__") /* 1 Get SREG */ \
@@ -354,16 +301,16 @@ void TIMER0_COMPB_vect() { \
: \
); \
} \
void TIMER0_COMPB_vect_bottom()
void TIMER0_COMPB_vect_bottom(void)
// ADC
#ifdef DIDR2
#define HAL_ANALOG_SELECT(ind) do{ if (ind < 8) SBI(DIDR0, ind); else SBI(DIDR2, ind & 0x07); }while(0)
#define HAL_ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin & 0x07); }while(0)
#else
#define HAL_ANALOG_SELECT(ind) SBI(DIDR0, ind);
#define HAL_ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0)
#endif
inline void HAL_adc_init() {
inline void HAL_adc_init(void) {
ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07;
DIDR0 = 0;
#ifdef DIDR2
@@ -371,14 +318,13 @@ inline void HAL_adc_init() {
#endif
}
#define SET_ADMUX_ADCSRA(ch) ADMUX = _BV(REFS0) | (ch & 0x07); SBI(ADCSRA, ADSC)
#define SET_ADMUX_ADCSRA(pin) ADMUX = _BV(REFS0) | (pin & 0x07); SBI(ADCSRA, ADSC)
#ifdef MUX5
#define HAL_START_ADC(ch) if (ch > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
#define HAL_START_ADC(pin) if (pin > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#else
#define HAL_START_ADC(ch) ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
#define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#endif
#define HAL_ADC_RESOLUTION 10
#define HAL_READ_ADC() ADC
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
@@ -388,28 +334,4 @@ inline void HAL_adc_init() {
#define HAL_SENSITIVE_PINS 0, 1
#ifdef __AVR_AT90USB1286__
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
#endif
// AVR compatibility
#define strtof strtod
/**
* set_pwm_frequency
* Sets the frequency of the timer corresponding to the provided pin
* as close as possible to the provided desired frequency. Internally
* calculates the required waveform generation mode, prescaler and
* resolution values required and sets the timer registers accordingly.
* NOTE that the frequency is applied to all pins on the timer (Ex OC3A, OC3B and OC3B)
* NOTE that there are limitations, particularly if using TIMER2. (see Configuration_adv.h -> FAST FAN PWM Settings)
*/
void set_pwm_frequency(const pin_t pin, int f_desired);
/**
* set_pwm_duty
* Sets the PWM duty cycle of the provided pin to the provided value
* Optionally allows inverting the duty cycle [default = false]
* Optionally allows changing the maximum size of the provided value to enable finer PWM duty control [default = 255]
*/
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);
#endif // _HAL_AVR_H_

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,86 +19,91 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../inc/MarlinConfig.h"
#ifndef I2CPOSENC_H
#define I2CPOSENC_H
#include "../module/planner.h"
#include "MarlinConfig.h"
#include <Wire.h>
#if ENABLED(I2C_POSITION_ENCODERS)
//=========== Advanced / Less-Common Encoder Configuration Settings ==========
#include "enum.h"
#include "macros.h"
#include "types.h"
#include <Wire.h>
#define I2CPE_EC_THRESH_PROPORTIONAL // if enabled adjusts the error correction threshold
// proportional to the current speed of the axis allows
// for very small error margin at low speeds without
// stuttering due to reading latency at high speeds
//=========== Advanced / Less-Common Encoder Configuration Settings ==========
#define I2CPE_DEBUG // enable encoder-related debug serial echos
#define I2CPE_EC_THRESH_PROPORTIONAL // if enabled adjusts the error correction threshold
// proportional to the current speed of the axis allows
// for very small error margin at low speeds without
// stuttering due to reading latency at high speeds
#define I2CPE_REBOOT_TIME 5000 // time we wait for an encoder module to reboot
// after changing address.
#define I2CPE_DEBUG // enable encoder-related debug serial echos
#define I2CPE_MAG_SIG_GOOD 0
#define I2CPE_MAG_SIG_MID 1
#define I2CPE_MAG_SIG_BAD 2
#define I2CPE_MAG_SIG_NF 255
#define I2CPE_REBOOT_TIME 5000 // time we wait for an encoder module to reboot
// after changing address.
#define I2CPE_REQ_REPORT 0
#define I2CPE_RESET_COUNT 1
#define I2CPE_SET_ADDR 2
#define I2CPE_SET_REPORT_MODE 3
#define I2CPE_CLEAR_EEPROM 4
#define I2CPE_MAG_SIG_GOOD 0
#define I2CPE_MAG_SIG_MID 1
#define I2CPE_MAG_SIG_BAD 2
#define I2CPE_MAG_SIG_NF 255
#define I2CPE_LED_PAR_MODE 10
#define I2CPE_LED_PAR_BRT 11
#define I2CPE_LED_PAR_RATE 14
#define I2CPE_REQ_REPORT 0
#define I2CPE_RESET_COUNT 1
#define I2CPE_SET_ADDR 2
#define I2CPE_SET_REPORT_MODE 3
#define I2CPE_CLEAR_EEPROM 4
#define I2CPE_REPORT_DISTANCE 0
#define I2CPE_REPORT_STRENGTH 1
#define I2CPE_REPORT_VERSION 2
#define I2CPE_LED_PAR_MODE 10
#define I2CPE_LED_PAR_BRT 11
#define I2CPE_LED_PAR_RATE 14
// Default I2C addresses
#define I2CPE_PRESET_ADDR_X 30
#define I2CPE_PRESET_ADDR_Y 31
#define I2CPE_PRESET_ADDR_Z 32
#define I2CPE_PRESET_ADDR_E 33
#define I2CPE_REPORT_DISTANCE 0
#define I2CPE_REPORT_STRENGTH 1
#define I2CPE_REPORT_VERSION 2
#define I2CPE_DEF_AXIS X_AXIS
#define I2CPE_DEF_ADDR I2CPE_PRESET_ADDR_X
// Default I2C addresses
#define I2CPE_PRESET_ADDR_X 30
#define I2CPE_PRESET_ADDR_Y 31
#define I2CPE_PRESET_ADDR_Z 32
#define I2CPE_PRESET_ADDR_E 33
// Error event counter; tracks how many times there is an error exceeding a certain threshold
#define I2CPE_ERR_CNT_THRESH 3.00
#define I2CPE_ERR_CNT_DEBOUNCE_MS 2000
#define I2CPE_DEF_AXIS X_AXIS
#define I2CPE_DEF_ADDR I2CPE_PRESET_ADDR_X
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
#define I2CPE_ERR_ARRAY_SIZE 32
#define I2CPE_ERR_PRST_ARRAY_SIZE 10
#endif
// Error event counter; tracks how many times there is an error exceeding a certain threshold
#define I2CPE_ERR_CNT_THRESH 3.00
#define I2CPE_ERR_CNT_DEBOUNCE_MS 2000
// Error Correction Methods
#define I2CPE_ECM_NONE 0
#define I2CPE_ECM_MICROSTEP 1
#define I2CPE_ECM_PLANNER 2
#define I2CPE_ECM_STALLDETECT 3
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
#define I2CPE_ERR_ARRAY_SIZE 32
#define I2CPE_ERR_PRST_ARRAY_SIZE 10
#endif
// Encoder types
#define I2CPE_ENC_TYPE_ROTARY 0
#define I2CPE_ENC_TYPE_LINEAR 1
// Error Correction Methods
#define I2CPE_ECM_NONE 0
#define I2CPE_ECM_MICROSTEP 1
#define I2CPE_ECM_PLANNER 2
#define I2CPE_ECM_STALLDETECT 3
// Parser
#define I2CPE_PARSE_ERR 1
#define I2CPE_PARSE_OK 0
// Encoder types
#define I2CPE_ENC_TYPE_ROTARY 0
#define I2CPE_ENC_TYPE_LINEAR 1
#define LOOP_PE(VAR) LOOP_L_N(VAR, I2CPE_ENCODER_CNT)
#define CHECK_IDX() do{ if (!WITHIN(idx, 0, I2CPE_ENCODER_CNT - 1)) return; }while(0)
// Parser
#define I2CPE_PARSE_ERR 1
#define I2CPE_PARSE_OK 0
typedef union {
volatile int32_t val = 0;
uint8_t bval[4];
} i2cLong;
#define LOOP_PE(VAR) LOOP_L_N(VAR, I2CPE_ENCODER_CNT)
#define CHECK_IDX() do{ if (!WITHIN(idx, 0, I2CPE_ENCODER_CNT - 1)) return; }while(0)
class I2CPositionEncoder {
typedef union {
volatile int32_t val = 0;
uint8_t bval[4];
} i2cLong;
class I2CPositionEncoder {
private:
AxisEnum encoderAxis = I2CPE_DEF_AXIS;
@@ -116,7 +121,7 @@ class I2CPositionEncoder {
bool homed = false,
trusted = false,
initialized = false,
initialised = false,
active = false,
invert = false,
ec = true;
@@ -142,7 +147,6 @@ class I2CPositionEncoder {
void update();
void set_homed();
void set_unhomed();
int32_t get_raw_count();
@@ -152,7 +156,7 @@ class I2CPositionEncoder {
case I2CPE_ENC_TYPE_LINEAR:
return count / encoderTicksPerUnit;
case I2CPE_ENC_TYPE_ROTARY:
return (count * stepperTicks) / (encoderTicksPerUnit * planner.settings.axis_steps_per_mm[encoderAxis]);
return (count * stepperTicks) / (encoderTicksPerUnit * planner.axis_steps_per_mm[encoderAxis]);
}
}
@@ -166,15 +170,15 @@ class I2CPositionEncoder {
bool passes_test(const bool report);
bool test_axis();
bool test_axis(void);
FORCE_INLINE int get_error_count() { return errorCount; }
FORCE_INLINE int get_error_count(void) { return errorCount; }
FORCE_INLINE void set_error_count(const int newCount) { errorCount = newCount; }
FORCE_INLINE uint8_t get_address() { return i2cAddress; }
FORCE_INLINE void set_address(const uint8_t addr) { i2cAddress = addr; }
FORCE_INLINE bool get_active() { return active; }
FORCE_INLINE bool get_active(void) { return active; }
FORCE_INLINE void set_active(const bool a) { active = a; }
FORCE_INLINE void set_inverted(const bool i) { invert = i; }
@@ -196,7 +200,7 @@ class I2CPositionEncoder {
case I2CPE_ENC_TYPE_LINEAR:
return encoderTicksPerUnit;
case I2CPE_ENC_TYPE_ROTARY:
return (int)((encoderTicksPerUnit / stepperTicks) * planner.settings.axis_steps_per_mm[encoderAxis]);
return (int)((encoderTicksPerUnit / stepperTicks) * planner.axis_steps_per_mm[encoderAxis]);
}
}
@@ -208,35 +212,31 @@ class I2CPositionEncoder {
FORCE_INLINE int get_stepper_ticks() { return stepperTicks; }
FORCE_INLINE void set_stepper_ticks(const int ticks) { stepperTicks = ticks; }
};
};
class I2CPositionEncodersMgr {
class I2CPositionEncodersMgr {
private:
static bool I2CPE_anyaxis;
static uint8_t I2CPE_addr, I2CPE_idx;
public:
static void init();
static void init(void);
// consider only updating one endoder per call / tick if encoders become too time intensive
static void update() { LOOP_PE(i) encoders[i].update(); }
static void update(void) { LOOP_PE(i) encoders[i].update(); }
static void homed(const AxisEnum axis) {
LOOP_PE(i)
if (encoders[i].get_axis() == axis) encoders[i].set_homed();
}
static void unhomed(const AxisEnum axis) {
LOOP_PE(i)
if (encoders[i].get_axis() == axis) encoders[i].set_unhomed();
}
static void report_position(const int8_t idx, const bool units, const bool noOffset);
static void report_status(const int8_t idx) {
CHECK_IDX();
SERIAL_ECHOLNPAIR("Encoder ", idx, ": ");
SERIAL_ECHOPAIR("Encoder ",idx);
SERIAL_ECHOPGM(": ");
encoders[idx].get_raw_count();
encoders[idx].passes_test(true);
}
@@ -261,32 +261,40 @@ class I2CPositionEncodersMgr {
static void report_error_count(const int8_t idx, const AxisEnum axis) {
CHECK_IDX();
SERIAL_ECHOLNPAIR("Error count on ", axis_codes[axis], " axis is ", encoders[idx].get_error_count());
SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
SERIAL_ECHOLNPAIR(" axis is ", encoders[idx].get_error_count());
}
static void reset_error_count(const int8_t idx, const AxisEnum axis) {
CHECK_IDX();
encoders[idx].set_error_count(0);
SERIAL_ECHOLNPAIR("Error count on ", axis_codes[axis], " axis has been reset.");
SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
SERIAL_ECHOLNPGM(" axis has been reset.");
}
static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
CHECK_IDX();
encoders[idx].set_ec_enabled(enabled);
SERIAL_ECHOPAIR("Error correction on ", axis_codes[axis]);
SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n");
SERIAL_ECHOPGM(" axis is ");
serialprintPGM(encoders[idx].get_ec_enabled() ? PSTR("en") : PSTR("dis"));
SERIAL_ECHOLNPGM("abled.");
}
static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
CHECK_IDX();
encoders[idx].set_ec_threshold(newThreshold);
SERIAL_ECHOLNPAIR("Error correct threshold for ", axis_codes[axis], " axis set to ", FIXFLOAT(newThreshold), "mm.");
SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
SERIAL_ECHOPAIR_F(" axis set to ", newThreshold);
SERIAL_ECHOLNPGM("mm.");
}
static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
CHECK_IDX();
const float threshold = encoders[idx].get_ec_threshold();
SERIAL_ECHOLNPAIR("Error correct threshold for ", axis_codes[axis], " axis is ", FIXFLOAT(threshold), "mm.");
SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
SERIAL_ECHOPAIR_F(" axis is ", threshold);
SERIAL_ECHOLNPGM("mm.");
}
static int8_t idx_from_axis(const AxisEnum axis) {
@@ -315,6 +323,20 @@ class I2CPositionEncodersMgr {
static void M869();
static I2CPositionEncoder encoders[I2CPE_ENCODER_CNT];
};
};
extern I2CPositionEncodersMgr I2CPEM;
extern I2CPositionEncodersMgr I2CPEM;
FORCE_INLINE static void gcode_M860() { I2CPEM.M860(); }
FORCE_INLINE static void gcode_M861() { I2CPEM.M861(); }
FORCE_INLINE static void gcode_M862() { I2CPEM.M862(); }
FORCE_INLINE static void gcode_M863() { I2CPEM.M863(); }
FORCE_INLINE static void gcode_M864() { I2CPEM.M864(); }
FORCE_INLINE static void gcode_M865() { I2CPEM.M865(); }
FORCE_INLINE static void gcode_M866() { I2CPEM.M866(); }
FORCE_INLINE static void gcode_M867() { I2CPEM.M867(); }
FORCE_INLINE static void gcode_M868() { I2CPEM.M868(); }
FORCE_INLINE static void gcode_M869() { I2CPEM.M869(); }
#endif //I2C_POSITION_ENCODERS
#endif //I2CPOSENC_H

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,16 +20,6 @@
*
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(M100_FREE_MEMORY_WATCHER)
#include "../gcode.h"
#include "../queue.h"
#include "../../libs/hex_print_routines.h"
#include "../../MarlinCore.h" // for idle()
/**
* M100 Free Memory Watcher
*
@@ -50,72 +40,36 @@
*
* Also, there are two support functions that can be called from a developer's C code.
*
* uint16_t check_for_free_memory_corruption(PGM_P const free_memory_start);
* void M100_dump_routine(PGM_P const title, const char * const start, const char * const end);
* uint16_t check_for_free_memory_corruption(const char * const ptr);
* void M100_dump_routine(const char * const title, const char *start, const char *end);
*
* Initial version by Roxy-3D
*/
#include "MarlinConfig.h"
#if ENABLED(M100_FREE_MEMORY_WATCHER)
#define M100_FREE_MEMORY_DUMPER // Enable for the `M100 D` Dump sub-command
#define M100_FREE_MEMORY_CORRUPTOR // Enable for the `M100 C` Corrupt sub-command
#include "Marlin.h"
#include "parser.h"
#include "hex_print_routines.h"
#define TEST_BYTE ((char) 0xE5)
#if defined(__AVR__) || IS_32BIT_TEENSY
extern char __bss_end;
char *end_bss = &__bss_end,
*free_memory_start = end_bss, *free_memory_end = 0,
*stacklimit = 0, *heaplimit = 0;
#define MEMORY_END_CORRECTION 0
#elif defined(TARGET_LPC1768)
extern char __bss_end__, __StackLimit, __HeapLimit;
char *end_bss = &__bss_end__,
*stacklimit = &__StackLimit,
*heaplimit = &__HeapLimit;
#define MEMORY_END_CORRECTION 0x200
char *free_memory_start = heaplimit,
*free_memory_end = stacklimit - MEMORY_END_CORRECTION;
#elif defined(__SAM3X8E__)
extern char _ebss;
char *end_bss = &_ebss,
*free_memory_start = end_bss,
*free_memory_end = 0,
*stacklimit = 0,
*heaplimit = 0;
#define MEMORY_END_CORRECTION 0x10000 // need to stay well below 0x20080000 or M100 F crashes
#elif defined(__SAMD51__)
extern unsigned int __bss_end__, __StackLimit, __HeapLimit;
extern "C" void * _sbrk(int incr);
void *end_bss = &__bss_end__,
*stacklimit = &__StackLimit,
*heaplimit = &__HeapLimit;
#define MEMORY_END_CORRECTION 0x400
char *free_memory_start = (char *)_sbrk(0) + 0x200, // Leave some heap space
*free_memory_end = (char *)stacklimit - MEMORY_END_CORRECTION;
#else
#error "M100 - unsupported CPU"
#endif
extern char* __brkval;
extern size_t __heap_start, __heap_end, __flp;
extern char __bss_end;
//
// Utility functions
//
#define END_OF_HEAP() (__brkval ? __brkval : &__bss_end)
int check_for_free_memory_corruption(const char * const title);
// Location of a variable on its stack frame. Returns a value above
// the stack (once the function returns to the caller).
char* top_of_stack() {
@@ -124,9 +78,9 @@ char* top_of_stack() {
}
// Count the number of test bytes at the specified location.
inline int32_t count_test_bytes(const char * const start_free_memory) {
for (uint32_t i = 0; i < 32000; i++)
if (char(start_free_memory[i]) != TEST_BYTE)
int16_t count_test_bytes(const char * const ptr) {
for (uint16_t i = 0; i < 32000; i++)
if (((char) ptr[i]) != TEST_BYTE)
return i - 1;
return -1;
@@ -139,130 +93,74 @@ inline int32_t count_test_bytes(const char * const start_free_memory) {
#if ENABLED(M100_FREE_MEMORY_DUMPER)
/**
* M100 D
* Dump the free memory block from brkval to the stack pointer.
* Dump the free memory block from __brkval to the stack pointer.
* malloc() eats memory from the start of the block and the stack grows
* up from the bottom of the block. Solid test bytes indicate nothing has
* used that memory yet. There should not be anything but test bytes within
* the block. If so, it may indicate memory corruption due to a bad pointer.
* Unexpected bytes are flagged in the right column.
*/
inline void dump_free_memory(char *start_free_memory, char *end_free_memory) {
void dump_free_memory(const char *ptr, const char *sp) {
//
// Start and end the dump on a nice 16 byte boundary
// (even though the values are not 16-byte aligned).
//
start_free_memory = (char*)(ptr_int_t(uint32_t(start_free_memory) & ~0xFUL)); // Align to 16-byte boundary
end_free_memory = (char*)(ptr_int_t(uint32_t(end_free_memory) | 0xFUL)); // Align end_free_memory to the 15th byte (at or above end_free_memory)
ptr = (char *)((uint16_t)ptr & 0xFFF0); // Align to 16-byte boundary
sp = (char *)((uint16_t)sp | 0x000F); // Align sp to the 15th byte (at or above sp)
// Dump command main loop
while (start_free_memory < end_free_memory) {
print_hex_address(start_free_memory); // Print the address
while (ptr < sp) {
print_hex_word((uint16_t)ptr); // Print the address
SERIAL_CHAR(':');
for (uint8_t i = 0; i < 16; i++) { // and 16 data bytes
if (i == 8) SERIAL_CHAR('-');
print_hex_byte(start_free_memory[i]);
print_hex_byte(ptr[i]);
SERIAL_CHAR(' ');
}
serial_delay(25);
safe_delay(25);
SERIAL_CHAR('|'); // Point out non test bytes
for (uint8_t i = 0; i < 16; i++) {
char ccc = (char)start_free_memory[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken
ccc = (ccc == TEST_BYTE) ? ' ' : '?';
char ccc = (char)ptr[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken
if (&ptr[i] >= (const char*)command_queue && &ptr[i] < (const char*)(command_queue + sizeof(command_queue))) { // Print out ASCII in the command buffer area
if (!WITHIN(ccc, ' ', 0x7E)) ccc = ' ';
}
else { // If not in the command buffer area, flag bytes that don't match the test byte
ccc = (ccc == TEST_BYTE) ? ' ' : '?';
}
SERIAL_CHAR(ccc);
}
SERIAL_EOL();
start_free_memory += 16;
serial_delay(25);
ptr += 16;
safe_delay(25);
idle();
}
}
void M100_dump_routine(PGM_P const title, const char * const start, const char * const end) {
serialprintPGM(title);
SERIAL_EOL();
//
// Round the start and end locations to produce full lines of output
//
dump_free_memory(
(char*)(ptr_int_t(uint32_t(start) & ~0xFUL)), // Align to 16-byte boundary
(char*)(ptr_int_t(uint32_t(end) | 0xFUL)) // Align end_free_memory to the 15th byte (at or above end_free_memory)
);
}
void M100_dump_routine(const char * const title, const char *start, const char *end) {
SERIAL_ECHOLN(title);
//
// Round the start and end locations to produce full lines of output
//
start = (char*)((uint16_t) start & 0xFFF0);
end = (char*)((uint16_t) end | 0x000F);
dump_free_memory(start, end);
}
#endif // M100_FREE_MEMORY_DUMPER
inline int check_for_free_memory_corruption(PGM_P const title) {
serialprintPGM(title);
char *start_free_memory = free_memory_start, *end_free_memory = free_memory_end;
int n = end_free_memory - start_free_memory;
SERIAL_ECHOPAIR("\nfmc() n=", n);
SERIAL_ECHOPAIR("\nfree_memory_start=", hex_address(free_memory_start));
SERIAL_ECHOLNPAIR(" end_free_memory=", hex_address(end_free_memory));
if (end_free_memory < start_free_memory) {
SERIAL_ECHOPGM(" end_free_memory < Heap ");
// SET_INPUT_PULLUP(63); // if the developer has a switch wired up to their controller board
// safe_delay(5); // this code can be enabled to pause the display as soon as the
// while ( READ(63)) // malfunction is detected. It is currently defaulting to a switch
// idle(); // being on pin-63 which is unassigend and available on most controller
// safe_delay(20); // boards.
// while ( !READ(63))
// idle();
serial_delay(20);
#if ENABLED(M100_FREE_MEMORY_DUMPER)
M100_dump_routine(PSTR(" Memory corruption detected with end_free_memory<Heap\n"), (const char*)0x1B80, (const char*)0x21FF);
#endif
}
// Scan through the range looking for the biggest block of 0xE5's we can find
int block_cnt = 0;
for (int i = 0; i < n; i++) {
if (start_free_memory[i] == TEST_BYTE) {
int32_t j = count_test_bytes(start_free_memory + i);
if (j > 8) {
// SERIAL_ECHOPAIR("Found ", j);
// SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(start_free_memory + i));
i += j;
block_cnt++;
SERIAL_ECHOPAIR(" (", block_cnt);
SERIAL_ECHOPAIR(") found=", j);
SERIAL_ECHOLNPGM(" ");
}
}
}
SERIAL_ECHOPAIR(" block_found=", block_cnt);
if (block_cnt != 1)
SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
if (block_cnt == 0) // Make sure the special case of no free blocks shows up as an
block_cnt = -1; // error to the calling code!
SERIAL_ECHOPGM(" return=");
if (block_cnt == 1) {
SERIAL_CHAR('0'); // If the block_cnt is 1, nothing has broken up the free memory
SERIAL_EOL(); // area and it is appropriate to say 'no corruption'.
return 0;
}
SERIAL_ECHOLNPGM("true");
return block_cnt;
}
/**
* M100 F
* Return the number of free bytes in the memory pool,
* with other vital statistics defining the pool.
*/
inline void free_memory_pool_report(char * const start_free_memory, const int32_t size) {
int32_t max_cnt = -1, block_cnt = 0;
char *max_addr = nullptr;
void free_memory_pool_report(char * const ptr, const int16_t size) {
int16_t max_cnt = -1, block_cnt = 0;
char *max_addr = NULL;
// Find the longest block of test bytes in the buffer
for (int32_t i = 0; i < size; i++) {
char *addr = start_free_memory + i;
for (int16_t i = 0; i < size; i++) {
char *addr = ptr + i;
if (*addr == TEST_BYTE) {
const int32_t j = count_test_bytes(addr);
const int16_t j = count_test_bytes(addr);
if (j > 8) {
SERIAL_ECHOPAIR("Found ", j);
SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr));
@@ -280,7 +178,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
SERIAL_ECHOPAIR("\nLargest free block is ", max_cnt);
SERIAL_ECHOLNPAIR(" bytes at ", hex_address(max_addr));
}
SERIAL_ECHOLNPAIR("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F ")));
SERIAL_ECHOLNPAIR("check_for_free_memory_corruption() = ", check_for_free_memory_corruption("M100 F "));
}
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
@@ -289,14 +187,14 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
* Corrupt <num> locations in the free memory pool and report the corrupt addresses.
* This is useful to check the correctness of the M100 D and the M100 F commands.
*/
inline void corrupt_free_memory(char *start_free_memory, const uint32_t size) {
start_free_memory += 8;
const uint32_t near_top = top_of_stack() - start_free_memory - 250, // -250 to avoid interrupt activity that's altered the stack.
void corrupt_free_memory(char *ptr, const uint16_t size) {
ptr += 8;
const uint16_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack.
j = near_top / (size + 1);
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
for (uint32_t i = 1; i <= size; i++) {
char * const addr = start_free_memory + i * j;
for (uint16_t i = 1; i <= size; i++) {
char * const addr = ptr + i * j;
*addr = i;
SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
}
@@ -308,7 +206,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
* M100 I
* Init memory for the M100 tests. (Automatically applied on the first M100.)
*/
inline void init_free_memory(char *start_free_memory, int32_t size) {
void init_free_memory(char *ptr, int16_t size) {
SERIAL_ECHOLNPGM("Initializing free memory block.\n\n");
size -= 250; // -250 to avoid interrupt activity that's altered the stack.
@@ -317,17 +215,17 @@ inline void init_free_memory(char *start_free_memory, int32_t size) {
return;
}
start_free_memory += 8; // move a few bytes away from the heap just because we don't want
ptr += 8; // move a few bytes away from the heap just because we don't want
// to be altering memory that close to it.
memset(start_free_memory, TEST_BYTE, size);
memset(ptr, TEST_BYTE, size);
SERIAL_ECHO(size);
SERIAL_ECHOLNPGM(" bytes of memory initialized.\n");
for (int32_t i = 0; i < size; i++) {
if (start_free_memory[i] != TEST_BYTE) {
SERIAL_ECHOPAIR("? address : ", hex_address(start_free_memory + i));
SERIAL_ECHOLNPAIR("=", hex_byte(start_free_memory[i]));
for (int16_t i = 0; i < size; i++) {
if (ptr[i] != TEST_BYTE) {
SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i));
SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i]));
SERIAL_EOL();
}
}
@@ -336,39 +234,99 @@ inline void init_free_memory(char *start_free_memory, int32_t size) {
/**
* M100: Free Memory Check
*/
void GcodeSuite::M100() {
void gcode_M100() {
SERIAL_ECHOPAIR("\n__brkval : ", hex_address(__brkval));
SERIAL_ECHOPAIR("\n__bss_end : ", hex_address(&__bss_end));
char *sp = top_of_stack();
if (!free_memory_end) free_memory_end = sp - MEMORY_END_CORRECTION;
SERIAL_ECHOPAIR("\nbss_end : ", hex_address(end_bss));
if (heaplimit) SERIAL_ECHOPAIR("\n__heaplimit : ", hex_address(heaplimit));
SERIAL_ECHOPAIR("\nfree_memory_start : ", hex_address(free_memory_start));
if (stacklimit) SERIAL_ECHOPAIR("\n__stacklimit : ", hex_address(stacklimit));
SERIAL_ECHOPAIR("\nfree_memory_end : ", hex_address(free_memory_end));
if (MEMORY_END_CORRECTION) SERIAL_ECHOPAIR("\nMEMORY_END_CORRECTION: ", MEMORY_END_CORRECTION);
SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp));
char *ptr = END_OF_HEAP(), *sp = top_of_stack();
SERIAL_ECHOPAIR("\nstart of free space : ", hex_address(ptr));
SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp));
// Always init on the first invocation of M100
static bool m100_not_initialized = true;
if (m100_not_initialized || parser.seen('I')) {
m100_not_initialized = false;
init_free_memory(free_memory_start, free_memory_end - free_memory_start);
init_free_memory(ptr, sp - ptr);
}
#if ENABLED(M100_FREE_MEMORY_DUMPER)
if (parser.seen('D'))
return dump_free_memory(free_memory_start, free_memory_end);
return dump_free_memory(ptr, sp);
#endif
if (parser.seen('F'))
return free_memory_pool_report(free_memory_start, free_memory_end - free_memory_start);
return free_memory_pool_report(ptr, sp - ptr);
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
if (parser.seen('C'))
return corrupt_free_memory(free_memory_start, parser.value_int());
return corrupt_free_memory(ptr, parser.value_int());
#endif
}
int check_for_free_memory_corruption(const char * const title) {
SERIAL_ECHO(title);
char *ptr = END_OF_HEAP(), *sp = top_of_stack();
int n = sp - ptr;
SERIAL_ECHOPAIR("\nfmc() n=", n);
SERIAL_ECHOPAIR("\n&__brkval: ", hex_address(&__brkval));
SERIAL_ECHOPAIR("=", hex_address(__brkval));
SERIAL_ECHOPAIR("\n__bss_end: ", hex_address(&__bss_end));
SERIAL_ECHOPAIR(" sp=", hex_address(sp));
if (sp < ptr) {
SERIAL_ECHOPGM(" sp < Heap ");
// SET_INPUT_PULLUP(63); // if the developer has a switch wired up to their controller board
// safe_delay(5); // this code can be enabled to pause the display as soon as the
// while ( READ(63)) // malfunction is detected. It is currently defaulting to a switch
// idle(); // being on pin-63 which is unassigend and available on most controller
// safe_delay(20); // boards.
// while ( !READ(63))
// idle();
safe_delay(20);
#ifdef M100_FREE_MEMORY_DUMPER
M100_dump_routine(" Memory corruption detected with sp<Heap\n", (char*)0x1B80, (char*)0x21FF);
#endif
}
// Scan through the range looking for the biggest block of 0xE5's we can find
int block_cnt = 0;
for (int i = 0; i < n; i++) {
if (ptr[i] == TEST_BYTE) {
int16_t j = count_test_bytes(ptr + i);
if (j > 8) {
// SERIAL_ECHOPAIR("Found ", j);
// SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(ptr + i));
i += j;
block_cnt++;
SERIAL_ECHOPAIR(" (", block_cnt);
SERIAL_ECHOPAIR(") found=", j);
SERIAL_ECHOPGM(" ");
}
}
}
SERIAL_ECHOPAIR(" block_found=", block_cnt);
if (block_cnt != 1 || __brkval != 0x0000)
SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
if (block_cnt == 0) // Make sure the special case of no free blocks shows up as an
block_cnt = -1; // error to the calling code!
SERIAL_ECHOPGM(" return=");
if (block_cnt == 1) {
SERIAL_CHAR('0'); // if the block_cnt is 1, nothing has broken up the free memory
SERIAL_EOL(); // area and it is appropriate to say 'no corruption'.
return 0;
}
SERIAL_ECHOLNPGM("true");
return block_cnt;
}
#endif // M100_FREE_MEMORY_WATCHER

File diff suppressed because it is too large Load Diff

647
Marlin/Marlin.h Normal file
View File

@@ -0,0 +1,647 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef MARLIN_H
#define MARLIN_H
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include <avr/interrupt.h>
#include "MarlinConfig.h"
#ifdef DEBUG_GCODE_PARSER
#include "parser.h"
#endif
#include "enum.h"
#include "types.h"
#include "fastio.h"
#include "utility.h"
#include "serial.h"
void idle(
#if ENABLED(ADVANCED_PAUSE_FEATURE)
bool no_stepper_sleep = false // pass true to keep steppers from disabling on timeout
#endif
);
void manage_inactivity(const bool ignore_stepper_queue=false);
extern const char axis_codes[XYZE];
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
extern bool extruder_duplication_enabled;
#endif
#if HAS_X2_ENABLE
#define enable_X() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0)
#define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); CBI(axis_known_position, X_AXIS); }while(0)
#elif HAS_X_ENABLE
#define enable_X() X_ENABLE_WRITE( X_ENABLE_ON)
#define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); CBI(axis_known_position, X_AXIS); }while(0)
#else
#define enable_X() NOOP
#define disable_X() NOOP
#endif
#if HAS_Y2_ENABLE
#define enable_Y() do{ Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }while(0)
#define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); CBI(axis_known_position, Y_AXIS); }while(0)
#elif HAS_Y_ENABLE
#define enable_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
#define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); CBI(axis_known_position, Y_AXIS); }while(0)
#else
#define enable_Y() NOOP
#define disable_Y() NOOP
#endif
#if HAS_Z2_ENABLE
#define enable_Z() do{ Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }while(0)
#define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); CBI(axis_known_position, Z_AXIS); }while(0)
#elif HAS_Z_ENABLE
#define enable_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
#define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); CBI(axis_known_position, Z_AXIS); }while(0)
#else
#define enable_Z() NOOP
#define disable_Z() NOOP
#endif
#if ENABLED(MIXING_EXTRUDER)
/**
* Mixing steppers synchronize their enable (and direction) together
*/
#if MIXING_STEPPERS > 4
#define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); E4_ENABLE_WRITE( E_ENABLE_ON); }
#define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); E4_ENABLE_WRITE(!E_ENABLE_ON); }
#elif MIXING_STEPPERS > 3
#define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); }
#define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); }
#elif MIXING_STEPPERS > 2
#define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); }
#define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); }
#else
#define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); }
#define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); }
#endif
#define enable_E1() NOOP
#define disable_E1() NOOP
#define enable_E2() NOOP
#define disable_E2() NOOP
#define enable_E3() NOOP
#define disable_E3() NOOP
#define enable_E4() NOOP
#define disable_E4() NOOP
#else // !MIXING_EXTRUDER
#if HAS_E0_ENABLE
#define enable_E0() E0_ENABLE_WRITE( E_ENABLE_ON)
#define disable_E0() E0_ENABLE_WRITE(!E_ENABLE_ON)
#else
#define enable_E0() NOOP
#define disable_E0() NOOP
#endif
#if E_STEPPERS > 1 && HAS_E1_ENABLE
#define enable_E1() E1_ENABLE_WRITE( E_ENABLE_ON)
#define disable_E1() E1_ENABLE_WRITE(!E_ENABLE_ON)
#else
#define enable_E1() NOOP
#define disable_E1() NOOP
#endif
#if E_STEPPERS > 2 && HAS_E2_ENABLE
#define enable_E2() E2_ENABLE_WRITE( E_ENABLE_ON)
#define disable_E2() E2_ENABLE_WRITE(!E_ENABLE_ON)
#else
#define enable_E2() NOOP
#define disable_E2() NOOP
#endif
#if E_STEPPERS > 3 && HAS_E3_ENABLE
#define enable_E3() E3_ENABLE_WRITE( E_ENABLE_ON)
#define disable_E3() E3_ENABLE_WRITE(!E_ENABLE_ON)
#else
#define enable_E3() NOOP
#define disable_E3() NOOP
#endif
#if E_STEPPERS > 4 && HAS_E4_ENABLE
#define enable_E4() E4_ENABLE_WRITE( E_ENABLE_ON)
#define disable_E4() E4_ENABLE_WRITE(!E_ENABLE_ON)
#else
#define enable_E4() NOOP
#define disable_E4() NOOP
#endif
#endif // !MIXING_EXTRUDER
#if ENABLED(HANGPRINTER)
#define enable_A() enable_X()
#define enable_B() enable_Y()
#define enable_C() enable_Z()
#define __D_ENABLE(p) E##p##_ENABLE_WRITE(E_ENABLE_ON)
#define _D_ENABLE(p) __D_ENABLE(p)
#define enable_D() _D_ENABLE(EXTRUDERS)
// Don't allow any axes to be disabled
#undef disable_X
#undef disable_Y
#undef disable_Z
#define disable_X() NOOP
#define disable_Y() NOOP
#define disable_Z() NOOP
#if EXTRUDERS >= 1
#undef disable_E1
#define disable_E1() NOOP
#if EXTRUDERS >= 2
#undef disable_E2
#define disable_E2() NOOP
#if EXTRUDERS >= 3
#undef disable_E3
#define disable_E3() NOOP
#if EXTRUDERS >= 4
#undef disable_E4
#define disable_E4() NOOP
#endif // EXTRUDERS >= 4
#endif // EXTRUDERS >= 3
#endif // EXTRUDERS >= 2
#endif // EXTRUDERS >= 1
#endif // HANGPRINTER
#if ENABLED(G38_PROBE_TARGET)
extern bool G38_move, // flag to tell the interrupt handler that a G38 command is being run
G38_endstop_hit; // flag from the interrupt handler to indicate if the endstop went active
#endif
void enable_all_steppers();
void disable_e_stepper(const uint8_t e);
void disable_e_steppers();
void disable_all_steppers();
void sync_plan_position();
void sync_plan_position_e();
#if IS_KINEMATIC
void sync_plan_position_kinematic();
#define SYNC_PLAN_POSITION_KINEMATIC() sync_plan_position_kinematic()
#else
#define SYNC_PLAN_POSITION_KINEMATIC() sync_plan_position()
#endif
void flush_and_request_resend();
void ok_to_send();
void kill(const char*);
void quickstop_stepper();
extern uint8_t marlin_debug_flags;
#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
extern bool Running;
inline bool IsRunning() { return Running; }
inline bool IsStopped() { return !Running; }
bool enqueue_and_echo_command(const char* cmd); // Add a single command to the end of the buffer. Return false on failure.
void enqueue_and_echo_commands_P(const char * const cmd); // Set one or more commands to be prioritized over the next Serial/SD command.
void clear_command_queue();
#if ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(POWER_LOSS_RECOVERY)
extern char command_queue[BUFSIZE][MAX_CMD_SIZE];
#endif
#define HAS_LCD_QUEUE_NOW (ENABLED(MALYAN_LCD) || (ENABLED(ULTIPANEL) && (ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE))))
#define HAS_QUEUE_NOW (ENABLED(SDSUPPORT) || HAS_LCD_QUEUE_NOW)
#if HAS_QUEUE_NOW
// Return only when commands are actually enqueued
void enqueue_and_echo_command_now(const char* cmd);
#if HAS_LCD_QUEUE_NOW
void enqueue_and_echo_commands_now_P(const char * const cmd);
#endif
#endif
extern millis_t previous_move_ms;
inline void reset_stepper_timeout() { previous_move_ms = millis(); }
/**
* Feedrate scaling and conversion
*/
extern float feedrate_mm_s;
extern int16_t feedrate_percentage;
#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01f)
extern bool axis_relative_modes[XYZE];
extern uint8_t axis_homed, axis_known_position;
constexpr uint8_t xyz_bits = _BV(X_AXIS) | _BV(Y_AXIS) | _BV(Z_AXIS);
FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; }
FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) == xyz_bits; }
extern volatile bool wait_for_heatup;
#if HAS_RESUME_CONTINUE
extern volatile bool wait_for_user;
#endif
#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
extern bool suspend_auto_report;
#endif
extern float current_position[XYZE], destination[XYZE];
/**
* Workspace offsets
*/
#if HAS_WORKSPACE_OFFSET
#if HAS_HOME_OFFSET
extern float home_offset[XYZ];
#endif
#if HAS_POSITION_SHIFT
extern float position_shift[XYZ];
#endif
#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
extern float workspace_offset[XYZ];
#define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
#elif HAS_HOME_OFFSET
#define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
#elif HAS_POSITION_SHIFT
#define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
#endif
#define NATIVE_TO_LOGICAL(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
#define LOGICAL_TO_NATIVE(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
#else
#define NATIVE_TO_LOGICAL(POS, AXIS) (POS)
#define LOGICAL_TO_NATIVE(POS, AXIS) (POS)
#endif
#define LOGICAL_X_POSITION(POS) NATIVE_TO_LOGICAL(POS, X_AXIS)
#define LOGICAL_Y_POSITION(POS) NATIVE_TO_LOGICAL(POS, Y_AXIS)
#define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS)
#define RAW_X_POSITION(POS) LOGICAL_TO_NATIVE(POS, X_AXIS)
#define RAW_Y_POSITION(POS) LOGICAL_TO_NATIVE(POS, Y_AXIS)
#define RAW_Z_POSITION(POS) LOGICAL_TO_NATIVE(POS, Z_AXIS)
// Hotend Offsets
#if HOTENDS > 1
extern float hotend_offset[XYZ][HOTENDS];
#endif
// Software Endstops
extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
#if HAS_SOFTWARE_ENDSTOPS
extern bool soft_endstops_enabled;
void clamp_to_software_endstops(float target[XYZ]);
#else
#define soft_endstops_enabled false
#define clamp_to_software_endstops(x) NOOP
#endif
#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
void update_software_endstops(const AxisEnum axis);
#endif
#define MAX_COORDINATE_SYSTEMS 9
#if ENABLED(CNC_COORDINATE_SYSTEMS)
extern float coordinate_system[MAX_COORDINATE_SYSTEMS][XYZ];
bool select_coordinate_system(const int8_t _new);
#endif
void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false);
void home_all_axes();
void report_current_position();
#if IS_KINEMATIC
#if ENABLED(HANGPRINTER)
extern float line_lengths[ABCD];
#else
extern float delta[ABC];
#endif
void inverse_kinematics(const float raw[XYZ]);
#endif
#if ENABLED(DELTA)
extern float delta_height,
delta_endstop_adj[ABC],
delta_radius,
delta_tower_angle_trim[ABC],
delta_tower[ABC][2],
delta_diagonal_rod,
delta_calibration_radius,
delta_diagonal_rod_2_tower[ABC],
delta_segments_per_second,
delta_clip_start_height;
void recalc_delta_settings();
float delta_safe_distance_from_top();
// Macro to obtain the Z position of an individual tower
#define DELTA_Z(V,T) V[Z_AXIS] + SQRT( \
delta_diagonal_rod_2_tower[T] - HYPOT2( \
delta_tower[T][X_AXIS] - V[X_AXIS], \
delta_tower[T][Y_AXIS] - V[Y_AXIS] \
) \
)
#define DELTA_IK(V) do { \
delta[A_AXIS] = DELTA_Z(V, A_AXIS); \
delta[B_AXIS] = DELTA_Z(V, B_AXIS); \
delta[C_AXIS] = DELTA_Z(V, C_AXIS); \
}while(0)
#elif ENABLED(HANGPRINTER)
// Don't collect anchor positions in array because there are no A_x, D_x or D_y
extern float anchor_A_y,
anchor_A_z,
anchor_B_x,
anchor_B_y,
anchor_B_z,
anchor_C_x,
anchor_C_y,
anchor_C_z,
anchor_D_z,
delta_segments_per_second,
line_lengths_origin[ABCD];
void recalc_hangprinter_settings();
#define HANGPRINTER_IK(V) do { \
line_lengths[A_AXIS] = SQRT(sq(anchor_A_z - V[Z_AXIS]) \
+ sq(anchor_A_y - V[Y_AXIS]) \
+ sq( V[X_AXIS])); \
line_lengths[B_AXIS] = SQRT(sq(anchor_B_z - V[Z_AXIS]) \
+ sq(anchor_B_y - V[Y_AXIS]) \
+ sq(anchor_B_x - V[X_AXIS])); \
line_lengths[C_AXIS] = SQRT(sq(anchor_C_z - V[Z_AXIS]) \
+ sq(anchor_C_y - V[Y_AXIS]) \
+ sq(anchor_C_x - V[X_AXIS])); \
line_lengths[D_AXIS] = SQRT(sq( V[X_AXIS]) \
+ sq( V[Y_AXIS]) \
+ sq(anchor_D_z - V[Z_AXIS])); \
}while(0)
// Inverse kinematics at origin
#define HANGPRINTER_IK_ORIGIN(LL) do { \
LL[A_AXIS] = SQRT(sq(anchor_A_z) \
+ sq(anchor_A_y)); \
LL[B_AXIS] = SQRT(sq(anchor_B_z) \
+ sq(anchor_B_y) \
+ sq(anchor_B_x)); \
LL[C_AXIS] = SQRT(sq(anchor_C_z) \
+ sq(anchor_C_y) \
+ sq(anchor_C_x)); \
LL[D_AXIS] = anchor_D_z; \
}while(0)
#elif IS_SCARA
void forward_kinematics_SCARA(const float &a, const float &b);
#endif
#if ENABLED(G26_MESH_VALIDATION)
extern bool g26_debug_flag;
#elif ENABLED(AUTO_BED_LEVELING_UBL)
constexpr bool g26_debug_flag = false;
#endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
#define _GET_MESH_X(I) (bilinear_start[X_AXIS] + (I) * bilinear_grid_spacing[X_AXIS])
#define _GET_MESH_Y(J) (bilinear_start[Y_AXIS] + (J) * bilinear_grid_spacing[Y_AXIS])
#elif ENABLED(AUTO_BED_LEVELING_UBL)
#define _GET_MESH_X(I) ubl.mesh_index_to_xpos(I)
#define _GET_MESH_Y(J) ubl.mesh_index_to_ypos(J)
#elif ENABLED(MESH_BED_LEVELING)
#define _GET_MESH_X(I) mbl.index_to_xpos[I]
#define _GET_MESH_Y(J) mbl.index_to_ypos[J]
#endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
extern int bilinear_grid_spacing[2], bilinear_start[2];
extern float bilinear_grid_factor[2],
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
float bilinear_z_offset(const float raw[XYZ]);
#endif
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING)
typedef float (*element_2d_fn)(const uint8_t, const uint8_t);
void print_2d_array(const uint8_t sx, const uint8_t sy, const uint8_t precision, const element_2d_fn fn);
#endif
#if HAS_LEVELING
bool leveling_is_valid();
void set_bed_leveling_enabled(const bool enable=true);
void reset_bed_level();
#endif
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
void set_z_fade_height(const float zfh, const bool do_report=true);
#endif
#if HAS_BED_PROBE
extern float zprobe_zoffset;
bool set_probe_deployed(const bool deploy);
#ifdef Z_AFTER_PROBING
void move_z_after_probing();
#endif
enum ProbePtRaise : unsigned char {
PROBE_PT_NONE, // No raise or stow after run_z_probe
PROBE_PT_STOW, // Do a complete stow after run_z_probe
PROBE_PT_RAISE, // Raise to "between" clearance after run_z_probe
PROBE_PT_BIG_RAISE // Raise to big clearance after run_z_probe
};
float probe_pt(const float &rx, const float &ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true);
#define DEPLOY_PROBE() set_probe_deployed(true)
#define STOW_PROBE() set_probe_deployed(false)
#else
#define DEPLOY_PROBE()
#define STOW_PROBE()
#endif
#if ENABLED(HOST_KEEPALIVE_FEATURE)
extern MarlinBusyState busy_state;
#define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
#else
#define KEEPALIVE_STATE(n) NOOP
#endif
#if FAN_COUNT > 0
extern int16_t fanSpeeds[FAN_COUNT];
#if ENABLED(EXTRA_FAN_SPEED)
extern int16_t old_fanSpeeds[FAN_COUNT],
new_fanSpeeds[FAN_COUNT];
#endif
#if ENABLED(PROBING_FANS_OFF)
extern bool fans_paused;
extern int16_t paused_fanSpeeds[FAN_COUNT];
#endif
#endif
#if ENABLED(USE_CONTROLLER_FAN)
extern int controllerFanSpeed;
#endif
#if ENABLED(BARICUDA)
extern uint8_t baricuda_valve_pressure, baricuda_e_to_p_pressure;
#endif
#if ENABLED(FILAMENT_WIDTH_SENSOR)
extern bool filament_sensor; // Flag that filament sensor readings should control extrusion
extern float filament_width_nominal, // Theoretical filament diameter i.e., 3.00 or 1.75
filament_width_meas; // Measured filament diameter
extern uint8_t meas_delay_cm; // Delay distance
extern int8_t measurement_delay[MAX_MEASUREMENT_DELAY + 1], // Ring buffer to delay measurement
filwidth_delay_index[2]; // Ring buffer indexes. Used by planner, temperature, and main code
#endif
#if ENABLED(ADVANCED_PAUSE_FEATURE)
extern int8_t did_pause_print;
extern AdvancedPauseMenuResponse advanced_pause_menu_response;
extern float filament_change_unload_length[EXTRUDERS],
filament_change_load_length[EXTRUDERS];
#endif
#if HAS_POWER_SWITCH
extern bool powersupply_on;
#define PSU_PIN_ON() do{ OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE); powersupply_on = true; }while(0)
#define PSU_PIN_OFF() do{ OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP); powersupply_on = false; }while(0)
#endif
// Handling multiple extruders pins
extern uint8_t active_extruder;
#if ENABLED(MIXING_EXTRUDER)
extern float mixing_factor[MIXING_STEPPERS];
#endif
inline void set_current_from_destination() { COPY(current_position, destination); }
inline void set_destination_from_current() { COPY(destination, current_position); }
void prepare_move_to_destination();
/**
* Blocking movement and shorthand functions
*/
void do_blocking_move_to(const float rx, const float ry, const float rz, const float &fr_mm_s=0);
void do_blocking_move_to_x(const float &rx, const float &fr_mm_s=0);
void do_blocking_move_to_z(const float &rz, const float &fr_mm_s=0);
void do_blocking_move_to_xy(const float &rx, const float &ry, const float &fr_mm_s=0);
#if ENABLED(ARC_SUPPORT)
void plan_arc(const float(&cart)[XYZE], const float(&offset)[2], const bool clockwise);
#endif
#define HAS_AXIS_UNHOMED_ERR ( \
ENABLED(Z_PROBE_ALLEN_KEY) \
|| ENABLED(Z_PROBE_SLED) \
|| HAS_PROBING_PROCEDURE \
|| HOTENDS > 1 \
|| ENABLED(NOZZLE_CLEAN_FEATURE) \
|| ENABLED(NOZZLE_PARK_FEATURE) \
|| (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
|| HAS_M206_COMMAND \
) || ENABLED(NO_MOTION_BEFORE_HOMING)
#if HAS_AXIS_UNHOMED_ERR
bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
#endif
/**
* position_is_reachable family of functions
*/
#if IS_KINEMATIC // (DELTA or SCARA)
#if IS_SCARA
extern const float L1, L2;
#endif
// Return true if the given point is within the printable area
inline bool position_is_reachable(const float &rx, const float &ry, const float inset=0) {
#if ENABLED(DELTA)
return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS - inset);
#elif ENABLED(HANGPRINTER)
// TODO: This is over simplified. Hangprinter's build volume is _not_ cylindrical.
return HYPOT2(rx, ry) <= sq(HANGPRINTER_PRINTABLE_RADIUS - inset);
#elif IS_SCARA
const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y);
return (
R2 <= sq(L1 + L2) - inset
#if MIDDLE_DEAD_ZONE_R > 0
&& R2 >= sq(float(MIDDLE_DEAD_ZONE_R))
#endif
);
#endif
}
#if HAS_BED_PROBE
// Return true if the both nozzle and the probe can reach the given point.
// Note: This won't work on SCARA since the probe offset rotates with the arm.
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
return position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER))
&& position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
}
#endif
#else // CARTESIAN
// Return true if the given position is within the machine bounds.
inline bool position_is_reachable(const float &rx, const float &ry) {
// Add 0.001 margin to deal with float imprecision
return WITHIN(rx, X_MIN_POS - 0.001f, X_MAX_POS + 0.001f)
&& WITHIN(ry, Y_MIN_POS - 0.001f, Y_MAX_POS + 0.001f);
}
#if HAS_BED_PROBE
/**
* Return whether the given position is within the bed, and whether the nozzle
* can reach the position required to put the probe at the given position.
*
* Example: For a probe offset of -10,+10, then for the probe to reach 0,0 the
* nozzle must be be able to reach +10,-10.
*/
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
return position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER))
&& WITHIN(rx, MIN_PROBE_X - 0.001f, MAX_PROBE_X + 0.001f)
&& WITHIN(ry, MIN_PROBE_Y - 0.001f, MAX_PROBE_Y + 0.001f);
}
#endif
#endif // CARTESIAN
#if !HAS_BED_PROBE
FORCE_INLINE bool position_is_reachable_by_probe(const float &rx, const float &ry) { return position_is_reachable(rx, ry); }
#endif
#endif // MARLIN_H

View File

@@ -3,17 +3,17 @@
Marlin Firmware
(c) 2011-2019 MarlinFirmware
(c) 2011-2018 MarlinFirmware
Portions of Marlin are (c) by their respective authors.
All code complies with GPLv2 and/or GPLv3
================================================================================
Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
Greetings! Thank you for choosing Marlin as your 3D printer firmware.
To configure Marlin you must edit Configuration.h and Configuration_adv.h
located in the root 'Marlin' folder. Check the config/examples folder to see if
there's a more suitable starting-point for your specific hardware.
located in the root 'Marlin' folder. Check the example_configurations folder to
see if there's a more suitable starting-point for your specific hardware.
Before diving in, we recommend the following essential links:

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,27 +19,30 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// Prefix header for all Marlin sources
//
#ifndef MARLIN_CONFIG_H
#define MARLIN_CONFIG_H
#include "MarlinConfigPre.h"
#include "boards.h"
#include "macros.h"
#include "Version.h"
#include "Configuration.h"
#include "Conditionals_LCD.h"
#include "drivers.h"
#include "Configuration_adv.h"
#include "../HAL/HAL.h"
#include "../pins/pins.h"
#include HAL_PATH(../HAL, spi_pins.h)
#if USE_MARLINSERIAL
#define HardwareSerial_h // trick to disable the standard HWserial
#endif
#include "types.h"
#include "HAL.h"
#include "pins.h"
#include "Conditionals_post.h"
#include HAL_PATH(../HAL, inc/Conditionals_post.h)
#include "SanityCheck.h"
#include HAL_PATH(../HAL, inc/SanityCheck.h)
#include "enum.h"
#include "language.h"
#include "utility.h"
#include "serial.h"
// Include all core headers
#include "../core/types.h"
#include "../core/language.h"
#include "../core/utility.h"
#include "../core/serial.h"
#endif // MARLIN_CONFIG_H

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,13 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "softspi.h"
#ifndef __MARLIN_SPI_H__
#define __MARLIN_SPI_H__
#include <stdint.h>
#include "softspi.h"
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
class SPIclass {
class SPI {
static SoftSPI<MisoPin, MosiPin, SckPin> softSPI;
public:
FORCE_INLINE static void init() { softSPI.begin(); }
@@ -33,22 +35,23 @@ class SPIclass {
FORCE_INLINE static uint8_t receive() { return softSPI.receive(); }
};
// Hardware SPI
template<>
class SPIclass<MISO_PIN, MOSI_PIN, SCK_PIN> {
class SPI<MISO_PIN, MOSI_PIN, SCK_PIN> {
public:
FORCE_INLINE static void init() {
OUT_WRITE(SCK_PIN, LOW);
OUT_WRITE(MOSI_PIN, HIGH);
SET_INPUT_PULLUP(MISO_PIN);
OUT_WRITE(SCK_PIN, LOW);
OUT_WRITE(MOSI_PIN, HIGH);
SET_INPUT(MISO_PIN);
WRITE(MISO_PIN, HIGH);
}
FORCE_INLINE static uint8_t receive() {
#if defined(__AVR__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
SPDR = 0;
for (;!TEST(SPSR, SPIF););
return SPDR;
#else
return spiRec();
#endif
SPDR = 0;
while (!TEST(SPSR, SPIF)) { /* nada */ }
return SPDR;
}
};
#endif // __MARLIN_SPI_H__

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -29,40 +29,73 @@
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
* Modified 10 June 2018 by Eduardo José Tagle (See #10991)
* Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
*/
#ifdef __AVR__
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
#include "../../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#if USE_MARLINSERIAL && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#include "MarlinSerial.h"
#include "../../MarlinCore.h"
#include "Marlin.h"
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
template<typename Cfg> bool MarlinSerial<Cfg>::_written = false;
template<typename Cfg> uint8_t MarlinSerial<Cfg>::xon_xoff_state = MarlinSerial<Cfg>::XON_XOFF_CHAR_SENT | MarlinSerial<Cfg>::XON_CHAR;
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_dropped_bytes = 0;
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_buffer_overruns = 0;
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_framing_errors = 0;
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::rx_max_enqueued = 0;
struct ring_buffer_r {
unsigned char buffer[RX_BUFFER_SIZE];
volatile ring_buffer_pos_t head, tail;
};
#if TX_BUFFER_SIZE > 0
struct ring_buffer_t {
unsigned char buffer[TX_BUFFER_SIZE];
volatile uint8_t head, tail;
};
#endif
#if UART_PRESENT(SERIAL_PORT)
ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
#if TX_BUFFER_SIZE > 0
ring_buffer_t tx_buffer = { { 0 }, 0, 0 };
#endif
static bool _written;
#endif
#if ENABLED(SERIAL_XON_XOFF)
constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80, // XON / XOFF Character was sent
XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
// XON / XOFF character definitions
constexpr uint8_t XON_CHAR = 17, XOFF_CHAR = 19;
uint8_t xon_xoff_state = XON_XOFF_CHAR_SENT | XON_CHAR;
#endif
#if ENABLED(SERIAL_STATS_DROPPED_RX)
uint8_t rx_dropped_bytes = 0;
#endif
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
uint8_t rx_buffer_overruns = 0;
#endif
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
uint8_t rx_framing_errors = 0;
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
ring_buffer_pos_t rx_max_enqueued = 0;
#endif
// A SW memory barrier, to ensure GCC does not overoptimize loops
#define sw_barrier() asm volatile("": : :"memory");
#include "../../feature/emergency_parser.h"
#if ENABLED(EMERGENCY_PARSER)
#include "emergency_parser.h"
#endif
// "Atomically" read the RX head index value without disabling interrupts:
// This MUST be called with RX interrupts enabled, and CAN'T be called
// from the RX ISR itself!
template<typename Cfg>
FORCE_INLINE typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::atomic_read_rx_head() {
if (Cfg::RX_SIZE > 256) {
FORCE_INLINE ring_buffer_pos_t atomic_read_rx_head() {
#if RX_BUFFER_SIZE > 256
// Keep reading until 2 consecutive reads return the same value,
// meaning there was no update in-between caused by an interrupt.
// This works because serial RX interrupts happen at a slower rate
@@ -76,25 +109,23 @@
sw_barrier();
} while (vold != vnew);
return vnew;
}
else {
#else
// With an 8bit index, reads are always atomic. No need for special handling
return rx_buffer.head;
}
#endif
}
template<typename Cfg>
volatile bool MarlinSerial<Cfg>::rx_tail_value_not_stable = false;
template<typename Cfg>
volatile uint16_t MarlinSerial<Cfg>::rx_tail_value_backup = 0;
#if RX_BUFFER_SIZE > 256
static volatile bool rx_tail_value_not_stable = false;
static volatile uint16_t rx_tail_value_backup = 0;
#endif
// Set RX tail index, taking into account the RX ISR could interrupt
// the write to this variable in the middle - So a backup strategy
// is used to ensure reads of the correct values.
// -Must NOT be called from the RX ISR -
template<typename Cfg>
FORCE_INLINE void MarlinSerial<Cfg>::atomic_set_rx_tail(typename MarlinSerial<Cfg>::ring_buffer_pos_t value) {
if (Cfg::RX_SIZE > 256) {
FORCE_INLINE void atomic_set_rx_tail(ring_buffer_pos_t value) {
#if RX_BUFFER_SIZE > 256
// Store the new value in the backup
rx_tail_value_backup = value;
sw_barrier();
@@ -107,30 +138,25 @@
// Signal the new value is completely stored into the value
rx_tail_value_not_stable = false;
sw_barrier();
}
else
#else
rx_buffer.tail = value;
#endif
}
// Get the RX tail index, taking into account the read could be
// interrupting in the middle of the update of that index value
// -Called from the RX ISR -
template<typename Cfg>
FORCE_INLINE typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::atomic_read_rx_tail() {
if (Cfg::RX_SIZE > 256) {
FORCE_INLINE ring_buffer_pos_t atomic_read_rx_tail() {
#if RX_BUFFER_SIZE > 256
// If the true index is being modified, return the backup value
if (rx_tail_value_not_stable) return rx_tail_value_backup;
}
#endif
// The true index is stable, return it
return rx_buffer.tail;
}
// (called with RX interrupts disabled)
template<typename Cfg>
FORCE_INLINE void MarlinSerial<Cfg>::store_rxd_char() {
static EmergencyParser::State emergency_state; // = EP_RESET
FORCE_INLINE void store_rxd_char() {
// Get the tail - Nothing can alter its value while this ISR is executing, but there's
// a chance that this ISR interrupted the main process while it was updating the index.
// The backup mechanism ensures the correct value is always returned.
@@ -140,17 +166,27 @@
ring_buffer_pos_t h = rx_buffer.head;
// Get the next element
ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// This must read the R_UCSRA register before reading the received byte to detect error causes
if (Cfg::DROPPED_RX && B_DOR && !++rx_dropped_bytes) --rx_dropped_bytes;
if (Cfg::RX_OVERRUNS && B_DOR && !++rx_buffer_overruns) --rx_buffer_overruns;
if (Cfg::RX_FRAMING_ERRORS && B_FE && !++rx_framing_errors) --rx_framing_errors;
// This must read the M_UCSRxA register before reading the received byte to detect error causes
#if ENABLED(SERIAL_STATS_DROPPED_RX)
if (TEST(M_UCSRxA, M_DORx) && !++rx_dropped_bytes) --rx_dropped_bytes;
#endif
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
if (TEST(M_UCSRxA, M_DORx) && !++rx_buffer_overruns) --rx_buffer_overruns;
#endif
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
if (TEST(M_UCSRxA, M_FEx) && !++rx_framing_errors) --rx_framing_errors;
#endif
// Read the character from the USART
uint8_t c = R_UDR;
uint8_t c = M_UDRx;
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
#if ENABLED(EMERGENCY_PARSER)
emergency_parser.update(c);
#endif
// If the character is to be stored at the index just before the tail
// (such that the head would advance to the current tail), the RX FIFO is
@@ -159,28 +195,29 @@
rx_buffer.buffer[h] = c;
h = i;
}
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
--rx_dropped_bytes;
#if ENABLED(SERIAL_STATS_DROPPED_RX)
else if (!++rx_dropped_bytes) --rx_dropped_bytes;
#endif
if (Cfg::MAX_RX_QUEUED) {
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
// Calculate count of bytes stored into the RX buffer
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// Keep track of the maximum count of enqueued bytes
NOLESS(rx_max_enqueued, rx_count);
}
#endif
if (Cfg::XONOFF) {
#if ENABLED(SERIAL_XON_XOFF)
// If the last char that was sent was an XON
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
// Bytes stored into the RX buffer
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// If over 12.5% of RX buffer capacity, send XOFF before running out of
// RX buffer space .. 325 bytes @ 250kbits/s needed to let the host react
// and stop sending bytes. This translates to 13mS propagation time.
if (rx_count >= (Cfg::RX_SIZE) / 8) {
if (rx_count >= (RX_BUFFER_SIZE) / 8) {
// At this point, definitely no TX interrupt was executing, since the TX ISR can't be preempted.
// Don't enable the TX interrupt here as a means to trigger the XOFF char, because if it happens
@@ -194,17 +231,19 @@
// Wait until the TX register becomes empty and send it - Here there could be a problem
// - While waiting for the TX register to empty, the RX register could receive a new
// character. This must also handle that situation!
while (!B_UDRE) {
while (!TEST(M_UCSRxA, M_UDREx)) {
if (B_RXC) {
if (TEST(M_UCSRxA,M_RXCx)) {
// A char arrived while waiting for the TX buffer to be empty - Receive and process it!
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// Read the character from the USART
c = R_UDR;
c = M_UDRx;
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
#if ENABLED(EMERGENCY_PARSER)
emergency_parser.update(c);
#endif
// If the character is to be stored at the index just before the tail
// (such that the head would advance to the current tail), the FIFO is
@@ -213,18 +252,19 @@
rx_buffer.buffer[h] = c;
h = i;
}
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
--rx_dropped_bytes;
#if ENABLED(SERIAL_STATS_DROPPED_RX)
else if (!++rx_dropped_bytes) --rx_dropped_bytes;
#endif
}
sw_barrier();
}
R_UDR = XOFF_CHAR;
M_UDRx = XOFF_CHAR;
// Clear the TXC bit -- "can be cleared by writing a one to its bit
// location". This makes sure flush() won't return until the bytes
// actually got written
B_TXC = 1;
SBI(M_UCSRxA, M_TXCx);
// At this point there could be a race condition between the write() function
// and this sending of the XOFF char. This interrupt could happen between the
@@ -233,18 +273,19 @@
// sure the write() function will succeed is to wait for the XOFF char to be
// completely sent. Since an extra character could be received during the wait
// it must also be handled!
while (!B_UDRE) {
while (!TEST(M_UCSRxA, M_UDREx)) {
if (B_RXC) {
if (TEST(M_UCSRxA,M_RXCx)) {
// A char arrived while waiting for the TX buffer to be empty - Receive and process it!
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
// Read the character from the USART
c = R_UDR;
c = M_UDRx;
if (Cfg::EMERGENCYPARSER)
emergency_parser.update(emergency_state, c);
#if ENABLED(EMERGENCY_PARSER)
emergency_parser.update(c);
#endif
// If the character is to be stored at the index just before the tail
// (such that the head would advance to the current tail), the FIFO is
@@ -253,8 +294,9 @@
rx_buffer.buffer[h] = c;
h = i;
}
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
--rx_dropped_bytes;
#if ENABLED(SERIAL_STATS_DROPPED_RX)
else if (!++rx_dropped_bytes) --rx_dropped_bytes;
#endif
}
sw_barrier();
}
@@ -263,68 +305,78 @@
// have any issues writing to the UART TX register if it needs to!
}
}
}
#endif // SERIAL_XON_XOFF
// Store the new head value - The main loop will retry until the value is stable
rx_buffer.head = h;
}
// (called with TX irqs disabled)
template<typename Cfg>
FORCE_INLINE void MarlinSerial<Cfg>::_tx_udr_empty_irq() {
if (Cfg::TX_SIZE > 0) {
#if TX_BUFFER_SIZE > 0
// (called with TX irqs disabled)
FORCE_INLINE void _tx_udr_empty_irq(void) {
// Read positions
uint8_t t = tx_buffer.tail;
const uint8_t h = tx_buffer.head;
if (Cfg::XONOFF) {
#if ENABLED(SERIAL_XON_XOFF)
// If an XON char is pending to be sent, do it now
if (xon_xoff_state == XON_CHAR) {
// Send the character
R_UDR = XON_CHAR;
M_UDRx = XON_CHAR;
// clear the TXC bit -- "can be cleared by writing a one to its bit
// location". This makes sure flush() won't return until the bytes
// actually got written
B_TXC = 1;
SBI(M_UCSRxA, M_TXCx);
// Remember we sent it.
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
// If nothing else to transmit, just disable TX interrupts.
if (h == t) B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
if (h == t) CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
return;
}
}
#endif
// If nothing to transmit, just disable TX interrupts. This could
// happen as the result of the non atomicity of the disabling of RX
// interrupts that could end reenabling TX interrupts as a side effect.
if (h == t) {
B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
return;
}
// There is something to TX, Send the next byte
const uint8_t c = tx_buffer.buffer[t];
t = (t + 1) & (Cfg::TX_SIZE - 1);
R_UDR = c;
t = (t + 1) & (TX_BUFFER_SIZE - 1);
M_UDRx = c;
tx_buffer.tail = t;
// Clear the TXC bit (by writing a one to its bit location).
// Ensures flush() won't return until the bytes are actually written/
B_TXC = 1;
SBI(M_UCSRxA, M_TXCx);
// Disable interrupts if there is nothing to transmit following this byte
if (h == t) B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
if (h == t) CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
}
}
#ifdef M_USARTx_UDRE_vect
ISR(M_USARTx_UDRE_vect) { _tx_udr_empty_irq(); }
#endif
#endif // TX_BUFFER_SIZE
#ifdef M_USARTx_RX_vect
ISR(M_USARTx_RX_vect) { store_rxd_char(); }
#endif
// Public Methods
template<typename Cfg>
void MarlinSerial<Cfg>::begin(const long baud) {
void MarlinSerial::begin(const long baud) {
uint16_t baud_setting;
bool useU2X = true;
@@ -335,41 +387,41 @@
if (baud == 57600) useU2X = false;
#endif
R_UCSRA = 0;
if (useU2X) {
B_U2X = 1;
M_UCSRxA = _BV(M_U2Xx);
baud_setting = (F_CPU / 4 / baud - 1) / 2;
}
else
else {
M_UCSRxA = 0;
baud_setting = (F_CPU / 8 / baud - 1) / 2;
}
// assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register)
R_UBRRH = baud_setting >> 8;
R_UBRRL = baud_setting;
M_UBRRxH = baud_setting >> 8;
M_UBRRxL = baud_setting;
B_RXEN = 1;
B_TXEN = 1;
B_RXCIE = 1;
if (Cfg::TX_SIZE > 0) B_UDRIE = 0;
SBI(M_UCSRxB, M_RXENx);
SBI(M_UCSRxB, M_TXENx);
SBI(M_UCSRxB, M_RXCIEx);
#if TX_BUFFER_SIZE > 0
CBI(M_UCSRxB, M_UDRIEx);
#endif
_written = false;
}
template<typename Cfg>
void MarlinSerial<Cfg>::end() {
B_RXEN = 0;
B_TXEN = 0;
B_RXCIE = 0;
B_UDRIE = 0;
void MarlinSerial::end() {
CBI(M_UCSRxB, M_RXENx);
CBI(M_UCSRxB, M_TXENx);
CBI(M_UCSRxB, M_RXCIEx);
CBI(M_UCSRxB, M_UDRIEx);
}
template<typename Cfg>
int MarlinSerial<Cfg>::peek() {
int MarlinSerial::peek(void) {
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
return h == t ? -1 : rx_buffer.buffer[t];
}
template<typename Cfg>
int MarlinSerial<Cfg>::read() {
int MarlinSerial::read(void) {
const ring_buffer_pos_t h = atomic_read_rx_head();
// Read the tail. Main thread owns it, so it is safe to directly read it
@@ -380,45 +432,42 @@
// Get the next char
const int v = rx_buffer.buffer[t];
t = (ring_buffer_pos_t)(t + 1) & (Cfg::RX_SIZE - 1);
t = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
// Advance tail - Making sure the RX ISR will always get an stable value, even
// if it interrupts the writing of the value of that variable in the middle.
atomic_set_rx_tail(t);
if (Cfg::XONOFF) {
#if ENABLED(SERIAL_XON_XOFF)
// If the XOFF char was sent, or about to be sent...
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
// Get count of bytes in the RX buffer
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
if (rx_count < (Cfg::RX_SIZE) / 10) {
if (Cfg::TX_SIZE > 0) {
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
if (rx_count < (RX_BUFFER_SIZE) / 10) {
#if TX_BUFFER_SIZE > 0
// Signal we want an XON character to be sent.
xon_xoff_state = XON_CHAR;
// Enable TX ISR. Non atomic, but it will eventually enable them
B_UDRIE = 1;
}
else {
SBI(M_UCSRxB, M_UDRIEx);
#else
// If not using TX interrupts, we must send the XON char now
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
while (!B_UDRE) sw_barrier();
R_UDR = XON_CHAR;
}
while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
M_UDRx = XON_CHAR;
#endif
}
}
}
#endif
return v;
}
template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::available() {
ring_buffer_pos_t MarlinSerial::available(void) {
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
return (ring_buffer_pos_t)(Cfg::RX_SIZE + h - t) & (Cfg::RX_SIZE - 1);
return (ring_buffer_pos_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
}
template<typename Cfg>
void MarlinSerial<Cfg>::flush() {
void MarlinSerial::flush(void) {
// Set the tail to the head:
// - Read the RX head index in a safe way. (See atomic_read_rx_head.)
@@ -426,36 +475,26 @@
// if it interrupts the writing of the value of that variable in the middle.
atomic_set_rx_tail(atomic_read_rx_head());
if (Cfg::XONOFF) {
#if ENABLED(SERIAL_XON_XOFF)
// If the XOFF char was sent, or about to be sent...
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
if (Cfg::TX_SIZE > 0) {
#if TX_BUFFER_SIZE > 0
// Signal we want an XON character to be sent.
xon_xoff_state = XON_CHAR;
// Enable TX ISR. Non atomic, but it will eventually enable it.
B_UDRIE = 1;
}
else {
SBI(M_UCSRxB, M_UDRIEx);
#else
// If not using TX interrupts, we must send the XON char now
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
while (!B_UDRE) sw_barrier();
R_UDR = XON_CHAR;
}
while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
M_UDRx = XON_CHAR;
#endif
}
}
#endif
}
template<typename Cfg>
void MarlinSerial<Cfg>::write(const uint8_t c) {
if (Cfg::TX_SIZE == 0) {
_written = true;
while (!B_UDRE) sw_barrier();
R_UDR = c;
}
else {
#if TX_BUFFER_SIZE > 0
void MarlinSerial::write(const uint8_t c) {
_written = true;
// If the TX interrupts are disabled and the data register
@@ -465,17 +504,17 @@
// interrupt overhead becomes a slowdown.
// Yes, there is a race condition between the sending of the
// XOFF char at the RX ISR, but it is properly handled there
if (!B_UDRIE && B_UDRE) {
R_UDR = c;
if (!TEST(M_UCSRxB, M_UDRIEx) && TEST(M_UCSRxA, M_UDREx)) {
M_UDRx = c;
// clear the TXC bit -- "can be cleared by writing a one to its bit
// location". This makes sure flush() won't return until the bytes
// actually got written
B_TXC = 1;
SBI(M_UCSRxA, M_TXCx);
return;
}
const uint8_t i = (tx_buffer.head + 1) & (Cfg::TX_SIZE - 1);
const uint8_t i = (tx_buffer.head + 1) & (TX_BUFFER_SIZE - 1);
// If global interrupts are disabled (as the result of being called from an ISR)...
if (!ISRS_ENABLED()) {
@@ -484,7 +523,7 @@
while (i == tx_buffer.tail) {
// If we can transmit another byte, do it.
if (B_UDRE) _tx_udr_empty_irq();
if (TEST(M_UCSRxA, M_UDREx)) _tx_udr_empty_irq();
// Make sure compiler rereads tx_buffer.tail
sw_barrier();
@@ -492,7 +531,7 @@
}
else {
// Interrupts are enabled, just wait until there is space
while (i == tx_buffer.tail) sw_barrier();
while (i == tx_buffer.tail) { sw_barrier(); }
}
// Store new char. head is always safe to move
@@ -500,27 +539,10 @@
tx_buffer.head = i;
// Enable TX ISR - Non atomic, but it will eventually enable TX ISR
B_UDRIE = 1;
SBI(M_UCSRxB, M_UDRIEx);
}
}
template<typename Cfg>
void MarlinSerial<Cfg>::flushTX() {
if (Cfg::TX_SIZE == 0) {
// No bytes written, no need to flush. This special case is needed since there's
// no way to force the TXC (transmit complete) bit to 1 during initialization.
if (!_written) return;
// Wait until everything was transmitted
while (!B_TXC) sw_barrier();
// At this point nothing is queued anymore (DRIE is disabled) and
// the hardware finished transmission (TXC is set).
}
else {
void MarlinSerial::flushTX(void) {
// No bytes written, no need to flush. This special case is needed since there's
// no way to force the TXC (transmit complete) bit to 1 during initialization.
if (!_written) return;
@@ -529,10 +551,11 @@
if (!ISRS_ENABLED()) {
// Wait until everything was transmitted - We must do polling, as interrupts are disabled
while (tx_buffer.head != tx_buffer.tail || !B_TXC) {
while (tx_buffer.head != tx_buffer.tail || !TEST(M_UCSRxA, M_TXCx)) {
// If there is more space, send an extra character
if (B_UDRE) _tx_udr_empty_irq();
if (TEST(M_UCSRxA, M_UDREx))
_tx_udr_empty_irq();
sw_barrier();
}
@@ -540,40 +563,55 @@
}
else {
// Wait until everything was transmitted
while (tx_buffer.head != tx_buffer.tail || !B_TXC) sw_barrier();
while (tx_buffer.head != tx_buffer.tail || !TEST(M_UCSRxA, M_TXCx)) sw_barrier();
}
// At this point nothing is queued anymore (DRIE is disabled) and
// the hardware finished transmission (TXC is set).
}
}
#else // TX_BUFFER_SIZE == 0
void MarlinSerial::write(const uint8_t c) {
_written = true;
while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
M_UDRx = c;
}
void MarlinSerial::flushTX(void) {
// No bytes written, no need to flush. This special case is needed since there's
// no way to force the TXC (transmit complete) bit to 1 during initialization.
if (!_written) return;
// Wait until everything was transmitted
while (!TEST(M_UCSRxA, M_TXCx)) sw_barrier();
// At this point nothing is queued anymore (DRIE is disabled) and
// the hardware finished transmission (TXC is set).
}
#endif // TX_BUFFER_SIZE == 0
/**
* Imports from print.h
*/
template<typename Cfg>
void MarlinSerial<Cfg>::print(char c, int base) {
void MarlinSerial::print(char c, int base) {
print((long)c, base);
}
template<typename Cfg>
void MarlinSerial<Cfg>::print(unsigned char b, int base) {
void MarlinSerial::print(unsigned char b, int base) {
print((unsigned long)b, base);
}
template<typename Cfg>
void MarlinSerial<Cfg>::print(int n, int base) {
void MarlinSerial::print(int n, int base) {
print((long)n, base);
}
template<typename Cfg>
void MarlinSerial<Cfg>::print(unsigned int n, int base) {
void MarlinSerial::print(unsigned int n, int base) {
print((unsigned long)n, base);
}
template<typename Cfg>
void MarlinSerial<Cfg>::print(long n, int base) {
void MarlinSerial::print(long n, int base) {
if (base == 0) write(n);
else if (base == 10) {
if (n < 0) { print('-'); n = -n; }
@@ -583,81 +621,68 @@
printNumber(n, base);
}
template<typename Cfg>
void MarlinSerial<Cfg>::print(unsigned long n, int base) {
void MarlinSerial::print(unsigned long n, int base) {
if (base == 0) write(n);
else printNumber(n, base);
}
template<typename Cfg>
void MarlinSerial<Cfg>::print(double n, int digits) {
void MarlinSerial::print(double n, int digits) {
printFloat(n, digits);
}
template<typename Cfg>
void MarlinSerial<Cfg>::println() {
void MarlinSerial::println(void) {
print('\r');
print('\n');
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(const String& s) {
void MarlinSerial::println(const String& s) {
print(s);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(const char c[]) {
void MarlinSerial::println(const char c[]) {
print(c);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(char c, int base) {
void MarlinSerial::println(char c, int base) {
print(c, base);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(unsigned char b, int base) {
void MarlinSerial::println(unsigned char b, int base) {
print(b, base);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(int n, int base) {
void MarlinSerial::println(int n, int base) {
print(n, base);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(unsigned int n, int base) {
void MarlinSerial::println(unsigned int n, int base) {
print(n, base);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(long n, int base) {
void MarlinSerial::println(long n, int base) {
print(n, base);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(unsigned long n, int base) {
void MarlinSerial::println(unsigned long n, int base) {
print(n, base);
println();
}
template<typename Cfg>
void MarlinSerial<Cfg>::println(double n, int digits) {
void MarlinSerial::println(double n, int digits) {
print(n, digits);
println();
}
// Private Methods
template<typename Cfg>
void MarlinSerial<Cfg>::printNumber(unsigned long n, uint8_t base) {
void MarlinSerial::printNumber(unsigned long n, uint8_t base) {
if (n) {
unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
int8_t i = 0;
@@ -672,8 +697,7 @@
print('0');
}
template<typename Cfg>
void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
void MarlinSerial::printFloat(double number, uint8_t digits) {
// Handle negative numbers
if (number < 0.0) {
print('-');
@@ -682,7 +706,9 @@
// Round correctly so that print(1.999, 2) prints as "2.00"
double rounding = 0.5;
for (uint8_t i = 0; i < digits; ++i) rounding *= 0.1;
for (uint8_t i = 0; i < digits; ++i)
rounding *= 0.1;
number += rounding;
// Extract the integer part of the number and print it
@@ -703,90 +729,12 @@
}
}
// Hookup ISR handlers
ISR(SERIAL_REGNAME(USART,SERIAL_PORT,_RX_vect)) {
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>::store_rxd_char();
}
ISR(SERIAL_REGNAME(USART,SERIAL_PORT,_UDRE_vect)) {
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>::_tx_udr_empty_irq();
}
// Preinstantiate
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>;
MarlinSerial customizedSerial;
// Instantiate
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
#ifdef SERIAL_PORT_2
// Hookup ISR handlers
ISR(SERIAL_REGNAME(USART,SERIAL_PORT_2,_RX_vect)) {
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>::store_rxd_char();
}
ISR(SERIAL_REGNAME(USART,SERIAL_PORT_2,_UDRE_vect)) {
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>::_tx_udr_empty_irq();
}
// Preinstantiate
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>;
// Instantiate
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
#endif
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
#ifdef INTERNAL_SERIAL_PORT
ISR(SERIAL_REGNAME(USART,INTERNAL_SERIAL_PORT,_RX_vect)) {
MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>>::store_rxd_char();
}
ISR(SERIAL_REGNAME(USART,INTERNAL_SERIAL_PORT,_UDRE_vect)) {
MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>>::_tx_udr_empty_irq();
}
// Preinstantiate
template class MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>>;
// Instantiate
MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>> internalSerial;
#endif
#ifdef DGUS_SERIAL_PORT
template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
h = tx_buffer.head; // next pos for queue.
int ret = t - h - 1;
if (ret < 0) ret += Cfg::TX_SIZE + 1;
return ret;
}
ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_RX_vect)) {
MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::store_rxd_char();
}
ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_UDRE_vect)) {
MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::_tx_udr_empty_irq();
}
// Preinstantiate
template class MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>;
// Instantiate
MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
#endif
#endif // USE_MARLINSERIAL && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
// For AT90USB targets use the UART for BT interfacing
#if defined(USBCON) && ENABLED(BLUETOOTH)
#if !USE_MARLINSERIAL && ENABLED(BLUETOOTH)
HardwareSerial bluetoothSerial;
#endif
#endif // __AVR__

184
Marlin/MarlinSerial.h Normal file
View File

@@ -0,0 +1,184 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* MarlinSerial.h - Hardware serial library for Wiring
* Copyright (c) 2006 Nicholas Zambetti. All right reserved.
*
* Modified 28 September 2010 by Mark Sproul
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
*/
#ifndef _MARLINSERIAL_H_
#define _MARLINSERIAL_H_
#include "MarlinConfig.h"
#ifndef SERIAL_PORT
#define SERIAL_PORT 0
#endif
// The presence of the UBRRH register is used to detect a UART.
#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
(port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
(port == 3 && defined(UBRR3H)))
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
// requires two levels of indirection to expand macro values properly)
#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)
#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##suffix
#else
#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix
#endif
// Registers used by MarlinSerial class (expanded depending on selected serial port)
#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number
#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,B)
#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)
#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)
#define M_TXCx SERIAL_REGNAME(TXC,SERIAL_PORT,)
#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)
#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)
#define M_FEx SERIAL_REGNAME(FE,SERIAL_PORT,)
#define M_DORx SERIAL_REGNAME(DOR,SERIAL_PORT,)
#define M_UPEx SERIAL_REGNAME(UPE,SERIAL_PORT,)
#define M_UDRIEx SERIAL_REGNAME(UDRIE,SERIAL_PORT,)
#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)
#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H)
#define M_UBRRxL SERIAL_REGNAME(UBRR,SERIAL_PORT,L)
#define M_RXCx SERIAL_REGNAME(RXC,SERIAL_PORT,)
#define M_USARTx_RX_vect SERIAL_REGNAME(USART,SERIAL_PORT,_RX_vect)
#define M_U2Xx SERIAL_REGNAME(U2X,SERIAL_PORT,)
#define M_USARTx_UDRE_vect SERIAL_REGNAME(USART,SERIAL_PORT,_UDRE_vect)
#define DEC 10
#define HEX 16
#define OCT 8
#define BIN 2
#define BYTE 0
// Define constants and variables for buffering serial data.
// Use only 0 or powers of 2 greater than 1
// : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
#ifndef RX_BUFFER_SIZE
#define RX_BUFFER_SIZE 128
#endif
// 256 is the max TX buffer limit due to uint8_t head and tail.
#ifndef TX_BUFFER_SIZE
#define TX_BUFFER_SIZE 32
#endif
#if USE_MARLINSERIAL
#if RX_BUFFER_SIZE > 256
typedef uint16_t ring_buffer_pos_t;
#else
typedef uint8_t ring_buffer_pos_t;
#endif
#if ENABLED(SERIAL_STATS_DROPPED_RX)
extern uint8_t rx_dropped_bytes;
#endif
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
extern uint8_t rx_buffer_overruns;
#endif
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
extern uint8_t rx_framing_errors;
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
extern ring_buffer_pos_t rx_max_enqueued;
#endif
class MarlinSerial {
public:
MarlinSerial() {};
static void begin(const long);
static void end();
static int peek(void);
static int read(void);
static void flush(void);
static ring_buffer_pos_t available(void);
static void write(const uint8_t c);
static void flushTX(void);
#if ENABLED(SERIAL_STATS_DROPPED_RX)
FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
#endif
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
FORCE_INLINE static uint32_t buffer_overruns() { return rx_buffer_overruns; }
#endif
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
FORCE_INLINE static uint32_t framing_errors() { return rx_framing_errors; }
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
#endif
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
FORCE_INLINE static void print(const char* str) { write(str); }
static void print(char, int = BYTE);
static void print(unsigned char, int = BYTE);
static void print(int, int = DEC);
static void print(unsigned int, int = DEC);
static void print(long, int = DEC);
static void print(unsigned long, int = DEC);
static void print(double, int = 2);
static void println(const String& s);
static void println(const char[]);
static void println(char, int = BYTE);
static void println(unsigned char, int = BYTE);
static void println(int, int = DEC);
static void println(unsigned int, int = DEC);
static void println(long, int = DEC);
static void println(unsigned long, int = DEC);
static void println(double, int = 2);
static void println(void);
operator bool() { return true; }
private:
static void printNumber(unsigned long, const uint8_t);
static void printFloat(double, uint8_t);
};
extern MarlinSerial customizedSerial;
#endif // USE_MARLINSERIAL
// Use the UART for Bluetooth in AT90USB configurations
#if !USE_MARLINSERIAL && ENABLED(BLUETOOTH)
extern HardwareSerial bluetoothSerial;
#endif
#endif // _MARLINSERIAL_H_

15558
Marlin/Marlin_main.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@
* support functions available to control the LEDs in the 8x8 grid.
*/
#include "../inc/MarlinConfigPre.h"
#include "MarlinConfig.h"
#if ENABLED(MAX7219_DEBUG)
@@ -43,79 +43,35 @@
#include "Max7219_Debug_LEDs.h"
#include "../module/planner.h"
#include "../module/stepper.h"
#include "../MarlinCore.h"
#include "../HAL/shared/Delay.h"
#define HAS_SIDE_BY_SIDE (ENABLED(MAX7219_SIDE_BY_SIDE) && MAX7219_NUMBER_UNITS > 1)
#if _ROT == 0 || _ROT == 180
#if HAS_SIDE_BY_SIDE
#define MAX7219_X_LEDS 8
#define MAX7219_Y_LEDS MAX7219_LINES
#else
#define MAX7219_Y_LEDS 8
#define MAX7219_X_LEDS MAX7219_LINES
#endif
#elif _ROT == 90 || _ROT == 270
#if HAS_SIDE_BY_SIDE
#define MAX7219_Y_LEDS 8
#define MAX7219_X_LEDS MAX7219_LINES
#else
#define MAX7219_X_LEDS 8
#define MAX7219_Y_LEDS MAX7219_LINES
#endif
#else
#error "MAX7219_ROTATE must be a multiple of +/- 90°."
#endif
#include "planner.h"
#include "stepper.h"
#include "Marlin.h"
#include "delay.h"
Max7219 max7219;
uint8_t Max7219::led_line[MAX7219_LINES]; // = { 0 };
#define LINE_REG(Q) (max7219_reg_digit0 + ((Q) & 0x7))
#if _ROT == 0 || _ROT == 270
#define _LED_BIT(Q) (7 - ((Q) & 0x7))
#define _LED_UNIT(Q) ((Q) & ~0x7)
#else
#define _LED_BIT(Q) ((Q) & 0x7)
#define _LED_UNIT(Q) ((MAX7219_NUMBER_UNITS - 1 - ((Q) >> 3)) << 3)
#endif
#if _ROT < 180
#define _LED_IND(P,Q) (_LED_UNIT(P) + (Q))
#else
#define _LED_IND(P,Q) (_LED_UNIT(P) + (7 - ((Q) & 0x7)))
#endif
#if _ROT == 0 || _ROT == 180
#define LED_IND(X,Y) _LED_IND(X,Y)
#define LED_BIT(X,Y) _LED_BIT(X)
#else
#elif _ROT == 90 || _ROT == 270
#define LED_IND(X,Y) _LED_IND(Y,X)
#define LED_BIT(X,Y) _LED_BIT(Y)
#endif
#if _ROT == 0 || _ROT == 90
#define _LED_IND(P,Q) (_LED_TOP(P) + ((Q) & 0x7))
#else
#define _LED_IND(P,Q) (_LED_TOP(P) + (7 - ((Q) & 0x7)))
#endif
#if HAS_SIDE_BY_SIDE
#if (_ROT == 0 || _ROT == 90) == DISABLED(MAX7219_REVERSE_ORDER)
#define _LED_TOP(Q) ((MAX7219_NUMBER_UNITS - 1 - ((Q) >> 3)) << 3)
#else
#define _LED_TOP(Q) ((Q) & ~0x7)
#endif
#if _ROT == 0 || _ROT == 180
#define LED_IND(X,Y) _LED_IND(Y,Y)
#elif _ROT == 90 || _ROT == 270
#define LED_IND(X,Y) _LED_IND(X,X)
#endif
#else
#if (_ROT == 0 || _ROT == 270) == DISABLED(MAX7219_REVERSE_ORDER)
#define _LED_TOP(Q) ((Q) & ~0x7)
#else
#define _LED_TOP(Q) ((MAX7219_NUMBER_UNITS - 1 - ((Q) >> 3)) << 3)
#endif
#if _ROT == 0 || _ROT == 180
#define LED_IND(X,Y) _LED_IND(X,Y)
#elif _ROT == 90 || _ROT == 270
#define LED_IND(X,Y) _LED_IND(Y,X)
#endif
#endif
#define XOR_7219(X,Y) do{ led_line[LED_IND(X,Y)] ^= _BV(LED_BIT(X,Y)); }while(0)
#define SET_7219(X,Y) do{ led_line[LED_IND(X,Y)] |= _BV(LED_BIT(X,Y)); }while(0)
#define CLR_7219(X,Y) do{ led_line[LED_IND(X,Y)] &= ~_BV(LED_BIT(X,Y)); }while(0)
@@ -125,8 +81,8 @@ uint8_t Max7219::led_line[MAX7219_LINES]; // = { 0 };
#define SIG_DELAY() DELAY_US(1) // Approximate a 1µs delay on 32-bit ARM
#undef CRITICAL_SECTION_START
#undef CRITICAL_SECTION_END
#define CRITICAL_SECTION_START() NOOP
#define CRITICAL_SECTION_END() NOOP
#define CRITICAL_SECTION_START NOOP
#define CRITICAL_SECTION_END NOOP
#else
#define SIG_DELAY() DELAY_NS(188) // Delay for 0.1875µs (16MHz AVR) or 0.15µs (20MHz AVR)
#endif
@@ -163,7 +119,7 @@ inline uint32_t flipped(const uint32_t bits, const uint8_t n_bytes) {
}
void Max7219::noop() {
CRITICAL_SECTION_START();
CRITICAL_SECTION_START;
SIG_DELAY();
WRITE(MAX7219_DIN_PIN, LOW);
for (uint8_t i = 16; i--;) {
@@ -174,11 +130,11 @@ void Max7219::noop() {
WRITE(MAX7219_CLK_PIN, HIGH);
SIG_DELAY();
}
CRITICAL_SECTION_END();
CRITICAL_SECTION_END;
}
void Max7219::putbyte(uint8_t data) {
CRITICAL_SECTION_START();
CRITICAL_SECTION_START;
for (uint8_t i = 8; i--;) {
SIG_DELAY();
WRITE(MAX7219_CLK_PIN, LOW); // tick
@@ -189,7 +145,7 @@ void Max7219::putbyte(uint8_t data) {
SIG_DELAY();
data <<= 1;
}
CRITICAL_SECTION_END();
CRITICAL_SECTION_END;
}
void Max7219::pulse_load() {
@@ -202,39 +158,31 @@ void Max7219::pulse_load() {
void Max7219::send(const uint8_t reg, const uint8_t data) {
SIG_DELAY();
CRITICAL_SECTION_START();
CRITICAL_SECTION_START;
SIG_DELAY();
putbyte(reg); // specify register
SIG_DELAY();
putbyte(data); // put data
CRITICAL_SECTION_END();
}
// Send out a single native row of bits to just one unit
void Max7219::refresh_unit_line(const uint8_t line) {
#if MAX7219_NUMBER_UNITS == 1
send(LINE_REG(line), led_line[line]);
#else
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
if (u == (line >> 3)) send(LINE_REG(line), led_line[line]); else noop();
#endif
pulse_load();
CRITICAL_SECTION_END;
}
// Send out a single native row of bits to all units
void Max7219::refresh_line(const uint8_t line) {
#if MAX7219_NUMBER_UNITS == 1
refresh_unit_line(line);
#else
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
send(LINE_REG(line), led_line[(u << 3) | (line & 0x7)]);
#endif
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
send(LINE_REG(line), led_line[(u << 3) | (line & 0x7)]);
pulse_load();
}
// Send out a single native row of bits to just one unit
void Max7219::refresh_unit_line(const uint8_t line) {
for (uint8_t u = MAX7219_NUMBER_UNITS; u--;)
if (u == (line >> 3)) send(LINE_REG(line), led_line[line]); else noop();
pulse_load();
}
void Max7219::set(const uint8_t line, const uint8_t bits) {
led_line[line] = bits;
refresh_unit_line(line);
refresh_line(line);
}
#if ENABLED(MAX7219_NUMERIC)
@@ -273,50 +221,42 @@ void Max7219::set(const uint8_t line, const uint8_t bits) {
// Modify a single LED bit and send the changed line
void Max7219::led_set(const uint8_t x, const uint8_t y, const bool on) {
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_set"), x, y);
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_set"), x, y);
if (BIT_7219(x, y) == on) return;
XOR_7219(x, y);
refresh_unit_line(LED_IND(x, y));
refresh_line(LED_IND(x, y));
}
void Max7219::led_on(const uint8_t x, const uint8_t y) {
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_on"), x, y);
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_on"), x, y);
led_set(x, y, true);
}
void Max7219::led_off(const uint8_t x, const uint8_t y) {
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_off"), x, y);
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_off"), x, y);
led_set(x, y, false);
}
void Max7219::led_toggle(const uint8_t x, const uint8_t y) {
if (x >= MAX7219_X_LEDS || y >= MAX7219_Y_LEDS) return error(PSTR("led_toggle"), x, y);
if (x > MAX7219_X_LEDS - 1 || y > MAX7219_Y_LEDS - 1) return error(PSTR("led_toggle"), x, y);
led_set(x, y, !BIT_7219(x, y));
}
void Max7219::send_row(const uint8_t row) {
#if _ROT == 0 || _ROT == 180 // Native Lines are horizontal too
#if MAX7219_X_LEDS <= 8
refresh_unit_line(LED_IND(0, row)); // A single unit line
#else
refresh_line(LED_IND(0, row)); // Same line, all units
#endif
#else // Native lines are vertical
#if _ROT == 0 || _ROT == 180
refresh_line(LED_IND(0, row));
#else
UNUSED(row);
refresh(); // Actually a column
refresh();
#endif
}
void Max7219::send_column(const uint8_t col) {
#if _ROT == 90 || _ROT == 270 // Native Lines are vertical too
#if MAX7219_Y_LEDS <= 8
refresh_unit_line(LED_IND(col, 0)); // A single unit line
#else
refresh_line(LED_IND(col, 0)); // Same line, all units
#endif
#else // Native lines are horizontal
#if _ROT == 90 || _ROT == 270
refresh_line(LED_IND(col, 0));
#else
UNUSED(col);
refresh(); // Actually a row
refresh();
#endif
}
@@ -432,49 +372,45 @@ void Max7219::set_columns_32bits(const uint8_t x, uint32_t val) {
void Max7219::register_setup() {
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
send(max7219_reg_scanLimit, 0x07);
pulse_load(); // Tell the chips to load the clocked out data
pulse_load(); // tell the chips to load the clocked out data
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
send(max7219_reg_decodeMode, 0x00); // Using an led matrix (not digits)
pulse_load(); // Tell the chips to load the clocked out data
send(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits)
pulse_load(); // tell the chips to load the clocked out data
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
send(max7219_reg_shutdown, 0x01); // Not in shutdown mode
pulse_load(); // Tell the chips to load the clocked out data
send(max7219_reg_shutdown, 0x01); // not in shutdown mode
pulse_load(); // tell the chips to load the clocked out data
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
send(max7219_reg_displayTest, 0x00); // No display test
pulse_load(); // Tell the chips to load the clocked out data
send(max7219_reg_displayTest, 0x00); // no display test
pulse_load(); // tell the chips to load the clocked out data
for (uint8_t i = 0; i < MAX7219_NUMBER_UNITS; i++)
send(max7219_reg_intensity, 0x01 & 0x0F); // The first 0x0F is the value you can set
// Range: 0x00 to 0x0F
pulse_load(); // Tell the chips to load the clocked out data
send(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
// range: 0x00 to 0x0F
pulse_load(); // tell the chips to load the clocked out data
}
#ifdef MAX7219_INIT_TEST
#if MAX7219_INIT_TEST == 2
#define MAX7219_LEDS (MAX7219_X_LEDS * MAX7219_Y_LEDS)
void Max7219::spiral(const bool on, const uint16_t del) {
constexpr int8_t way[][2] = { { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } };
constexpr int8_t way[] = { 1, 0, 0, 1, -1, 0, 0, -1 };
int8_t px = 0, py = 0, dir = 0;
for (IF<(MAX7219_LEDS > 255), uint16_t, uint8_t>::type i = MAX7219_LEDS; i--;) {
for (uint8_t i = MAX7219_X_LEDS * MAX7219_Y_LEDS; i--;) {
led_set(px, py, on);
delay(del);
const int8_t x = px + way[dir][0], y = py + way[dir][1];
if (!WITHIN(x, 0, MAX7219_X_LEDS - 1) || !WITHIN(y, 0, MAX7219_Y_LEDS - 1) || BIT_7219(x, y) == on)
dir = (dir + 1) & 0x3;
px += way[dir][0];
py += way[dir][1];
const int8_t x = px + way[dir], y = py + way[dir + 1];
if (!WITHIN(x, 0, MAX7219_X_LEDS-1) || !WITHIN(y, 0, MAX7219_Y_LEDS-1) || BIT_7219(x, y) == on) dir = (dir + 2) & 0x7;
px += way[dir]; py += way[dir + 1];
}
}
#else
void Max7219::sweep(const int8_t dir, const uint16_t ms, const bool on) {
uint8_t x = dir > 0 ? 0 : MAX7219_X_LEDS - 1;
uint8_t x = dir > 0 ? 0 : MAX7219_X_LEDS-1;
for (uint8_t i = MAX7219_X_LEDS; i--; x += dir) {
set_column(x, on ? 0xFFFFFFFF : 0x00000000);
delay(ms);
@@ -492,10 +428,10 @@ void Max7219::init() {
register_setup();
for (uint8_t i = 0; i <= 7; i++) { // Empty registers to turn all LEDs off
for (uint8_t i = 0; i <= 7; i++) { // Empty registers to turn all LEDs off
led_line[i] = 0x00;
send(max7219_reg_digit0 + i, 0);
pulse_load(); // Tell the chips to load the clocked out data
pulse_load(); // tell the chips to load the clocked out data
}
#ifdef MAX7219_INIT_TEST
@@ -522,66 +458,69 @@ void Max7219::init() {
*/
// Apply changes to update a marker
void Max7219::mark16(const uint8_t pos, const uint8_t v1, const uint8_t v2) {
#if MAX7219_X_LEDS > 8 // At least 16 LEDs on the X-Axis. Use single line.
led_off(v1 & 0xF, pos);
led_on(v2 & 0xF, pos);
#elif MAX7219_Y_LEDS > 8 // At least 16 LEDs on the Y-Axis. Use a single column.
led_off(pos, v1 & 0xF);
led_on(pos, v2 & 0xF);
#else // Single 8x8 LED matrix. Use two lines to get 16 LEDs.
led_off(v1 & 0x7, pos + (v1 >= 8));
led_on(v2 & 0x7, pos + (v2 >= 8));
void Max7219::mark16(const uint8_t y, const uint8_t v1, const uint8_t v2) {
#if MAX7219_X_LEDS == 8
#if MAX7219_Y_LEDS == 8
led_off(v1 & 0x7, y + (v1 >= 8));
led_on(v2 & 0x7, y + (v2 >= 8));
#else
led_off(y, v1 & 0xF); // At least 16 LEDs down. Use a single column.
led_on(y, v2 & 0xF);
#endif
#else
led_off(v1 & 0xF, y); // At least 16 LEDs across. Use a single row.
led_on(v2 & 0xF, y);
#endif
}
// Apply changes to update a tail-to-head range
void Max7219::range16(const uint8_t y, const uint8_t ot, const uint8_t nt, const uint8_t oh, const uint8_t nh) {
#if MAX7219_X_LEDS > 8 // At least 16 LEDs on the X-Axis. Use single line.
#if MAX7219_X_LEDS == 8
#if MAX7219_Y_LEDS == 8
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
led_off(n & 0x7, y + (n >= 8));
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
led_on(n & 0x7, y + (n >= 8));
#else // The Max7219 Y-Axis has at least 16 LED's. So use a single column
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
led_off(y, n & 0xF);
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
led_on(y, n & 0xF);
#endif
#else // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
led_off(n & 0xF, y);
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
led_on(n & 0xF, y);
#elif MAX7219_Y_LEDS > 8 // At least 16 LEDs on the Y-Axis. Use a single column.
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
led_off(y, n & 0xF);
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
led_on(y, n & 0xF);
#else // Single 8x8 LED matrix. Use two lines to get 16 LEDs.
if (ot != nt) for (uint8_t n = ot & 0xF; n != (nt & 0xF) && n != (nh & 0xF); n = (n + 1) & 0xF)
led_off(n & 0x7, y + (n >= 8));
if (oh != nh) for (uint8_t n = (oh + 1) & 0xF; n != ((nh + 1) & 0xF); n = (n + 1) & 0xF)
led_on(n & 0x7, y + (n >= 8));
#endif
#endif
}
// Apply changes to update a quantity
void Max7219::quantity16(const uint8_t pos, const uint8_t ov, const uint8_t nv) {
for (uint8_t i = _MIN(nv, ov); i < _MAX(nv, ov); i++)
led_set(
#if MAX7219_X_LEDS > 8 // At least 16 LEDs on the X-Axis. Use single line.
i, pos
#elif MAX7219_Y_LEDS > 8 // At least 16 LEDs on the Y-Axis. Use a single column.
pos, i
#else // Single 8x8 LED matrix. Use two lines to get 16 LEDs.
i >> 1, pos + (i & 1)
void Max7219::quantity16(const uint8_t y, const uint8_t ov, const uint8_t nv) {
for (uint8_t i = MIN(nv, ov); i < MAX(nv, ov); i++)
#if MAX7219_X_LEDS == 8
#if MAX7219_Y_LEDS == 8
led_set(i >> 1, y + (i & 1), nv >= ov); // single 8x8 LED matrix. Use two lines to get 16 LED's
#else
led_set(y, i, nv >= ov); // The Max7219 Y-Axis has at least 16 LED's. So use a single column
#endif
, nv >= ov
);
#else
led_set(i, y, nv >= ov); // LED matrix has at least 16 LED's on the X-Axis. Use single line of LED's
#endif
}
void Max7219::idle_tasks() {
#define MAX7219_USE_HEAD (defined(MAX7219_DEBUG_PLANNER_HEAD) || defined(MAX7219_DEBUG_PLANNER_QUEUE))
#define MAX7219_USE_TAIL (defined(MAX7219_DEBUG_PLANNER_TAIL) || defined(MAX7219_DEBUG_PLANNER_QUEUE))
#if MAX7219_USE_HEAD || MAX7219_USE_TAIL
CRITICAL_SECTION_START();
CRITICAL_SECTION_START;
#if MAX7219_USE_HEAD
const uint8_t head = planner.block_buffer_head;
#endif
#if MAX7219_USE_TAIL
const uint8_t tail = planner.block_buffer_tail;
#endif
CRITICAL_SECTION_END();
CRITICAL_SECTION_END;
#endif
#if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* This module is off by default, but can be enabled to facilitate the display of
@@ -41,17 +40,25 @@
* faster to do a Max7219_Set_Column() with a rotation of 90 or 270 degrees than to do
* a Max7219_Set_Row(). The opposite is true for rotations of 0 or 180 degrees.
*/
#pragma once
#ifndef MAX7219_ROTATE
#define MAX7219_ROTATE 0
#endif
#define _ROT ((MAX7219_ROTATE + 360) % 360)
#ifndef MAX7219_NUMBER_UNITS
#define MAX7219_NUMBER_UNITS 1
#endif
#define MAX7219_LINES (8 * (MAX7219_NUMBER_UNITS))
#if _ROT == 0 || _ROT == 180
#define MAX7219_Y_LEDS 8
#define MAX7219_X_LEDS MAX7219_LINES
#elif _ROT == 90 || _ROT == 270
#define MAX7219_X_LEDS 8
#define MAX7219_Y_LEDS MAX7219_LINES
#else
#error "MAX7219_ROTATE must be a multiple of +/- 90°."
#endif
//
// MAX7219 registers
//
@@ -75,7 +82,7 @@ class Max7219 {
public:
static uint8_t led_line[MAX7219_LINES];
Max7219() {}
Max7219() { }
static void init();
static void register_setup();
@@ -86,7 +93,7 @@ public:
static void send(const uint8_t reg, const uint8_t data);
// Refresh all units
static inline void refresh() { for (uint8_t i = 0; i < 8; i++) refresh_line(i); }
inline static void refresh() { for (uint8_t i = 0; i < 8; i++) refresh_line(i); }
// Update a single native line on all units
static void refresh_line(const uint8_t line);

1705
Marlin/SanityCheck.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,107 +22,171 @@
/**
* Arduino Sd2Card Library
* Copyright (c) 2009 by William Greiman
* Updated with backports of the latest SdFat library from the same author
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include "MarlinConfig.h"
#include "../inc/MarlinConfig.h"
#if ENABLED(SDSUPPORT) && NONE(USB_FLASH_DRIVE_SUPPORT, SDIO_SUPPORT)
/* Enable FAST CRC computations - You can trade speed for FLASH space if
* needed by disabling the following define */
#define FAST_CRC 1
#if ENABLED(SDSUPPORT)
#include "Sd2Card.h"
#include "../MarlinCore.h"
#if ENABLED(SD_CHECK_AND_RETRY)
static bool crcSupported = true;
#ifdef FAST_CRC
static const uint8_t crctab7[] PROGMEM = {
0x00,0x09,0x12,0x1B,0x24,0x2D,0x36,0x3F,0x48,0x41,0x5A,0x53,0x6C,0x65,0x7E,0x77,
0x19,0x10,0x0B,0x02,0x3D,0x34,0x2F,0x26,0x51,0x58,0x43,0x4A,0x75,0x7C,0x67,0x6E,
0x32,0x3B,0x20,0x29,0x16,0x1F,0x04,0x0D,0x7A,0x73,0x68,0x61,0x5E,0x57,0x4C,0x45,
0x2B,0x22,0x39,0x30,0x0F,0x06,0x1D,0x14,0x63,0x6A,0x71,0x78,0x47,0x4E,0x55,0x5C,
0x64,0x6D,0x76,0x7F,0x40,0x49,0x52,0x5B,0x2C,0x25,0x3E,0x37,0x08,0x01,0x1A,0x13,
0x7D,0x74,0x6F,0x66,0x59,0x50,0x4B,0x42,0x35,0x3C,0x27,0x2E,0x11,0x18,0x03,0x0A,
0x56,0x5F,0x44,0x4D,0x72,0x7B,0x60,0x69,0x1E,0x17,0x0C,0x05,0x3A,0x33,0x28,0x21,
0x4F,0x46,0x5D,0x54,0x6B,0x62,0x79,0x70,0x07,0x0E,0x15,0x1C,0x23,0x2A,0x31,0x38,
0x41,0x48,0x53,0x5A,0x65,0x6C,0x77,0x7E,0x09,0x00,0x1B,0x12,0x2D,0x24,0x3F,0x36,
0x58,0x51,0x4A,0x43,0x7C,0x75,0x6E,0x67,0x10,0x19,0x02,0x0B,0x34,0x3D,0x26,0x2F,
0x73,0x7A,0x61,0x68,0x57,0x5E,0x45,0x4C,0x3B,0x32,0x29,0x20,0x1F,0x16,0x0D,0x04,
0x6A,0x63,0x78,0x71,0x4E,0x47,0x5C,0x55,0x22,0x2B,0x30,0x39,0x06,0x0F,0x14,0x1D,
0x25,0x2C,0x37,0x3E,0x01,0x08,0x13,0x1A,0x6D,0x64,0x7F,0x76,0x49,0x40,0x5B,0x52,
0x3C,0x35,0x2E,0x27,0x18,0x11,0x0A,0x03,0x74,0x7D,0x66,0x6F,0x50,0x59,0x42,0x4B,
0x17,0x1E,0x05,0x0C,0x33,0x3A,0x21,0x28,0x5F,0x56,0x4D,0x44,0x7B,0x72,0x69,0x60,
0x0E,0x07,0x1C,0x15,0x2A,0x23,0x38,0x31,0x46,0x4F,0x54,0x5D,0x62,0x6B,0x70,0x79
};
static uint8_t CRC7(const uint8_t* data, uint8_t n) {
uint8_t crc = 0;
while (n > 0) {
crc = pgm_read_byte(&crctab7[ (crc << 1) ^ *data++ ]);
n--;
}
return (crc << 1) | 1;
}
#else
static uint8_t CRC7(const uint8_t* data, uint8_t n) {
uint8_t crc = 0;
for (uint8_t i = 0; i < n; i++) {
uint8_t d = data[i];
d ^= crc << 1;
if (d & 0x80) d ^= 9;
crc = d ^ (crc & 0x78) ^ (crc << 4) ^ ((crc >> 3) & 15);
crc &= 0x7F;
}
crc = (crc << 1) ^ (crc << 4) ^ (crc & 0x70) ^ ((crc >> 3) & 0x0F);
return crc | 1;
}
#endif
#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#endif
// Send command and return error code. Return zero for OK
uint8_t Sd2Card::cardCommand(const uint8_t cmd, const uint32_t arg) {
// Select card
chipSelect();
#if DISABLED(SOFTWARE_SPI)
// functions for hardware SPI
// Wait up to 300 ms if busy
waitNotBusy(SD_WRITE_TIMEOUT);
uint8_t *pa = (uint8_t *)(&arg);
#if ENABLED(SD_CHECK_AND_RETRY)
// Form message
uint8_t d[6] = {(uint8_t) (cmd | 0x40), pa[3], pa[2], pa[1], pa[0] };
// Add crc
d[5] = CRC7(d, 5);
// Send message
for (uint8_t k = 0; k < 6; k++) spiSend(d[k]);
#else
// Send command
spiSend(cmd | 0x40);
// Send argument
for (int8_t i = 3; i >= 0; i--) spiSend(pa[i]);
// Send CRC - correct for CMD0 with arg zero or CMD8 with arg 0X1AA
spiSend(cmd == CMD0 ? 0X95 : 0X87);
// make sure SPCR rate is in expected bits
#if (SPR0 != 0 || SPR1 != 1)
#error "unexpected SPCR bits"
#endif
/**
* Initialize hardware SPI
* Set SCK rate to F_CPU/pow(2, 1 + spiRate) for spiRate [0,6]
*/
static void spiInit(uint8_t spiRate) {
// See avr processor documentation
SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
}
// Skip stuff byte for stop read
/** SPI receive a byte */
static uint8_t spiRec() {
SPDR = 0xFF;
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
return SPDR;
}
/** SPI read data - only one call so force inline */
static inline __attribute__((always_inline))
void spiRead(uint8_t* buf, uint16_t nbyte) {
if (nbyte-- == 0) return;
SPDR = 0xFF;
for (uint16_t i = 0; i < nbyte; i++) {
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
buf[i] = SPDR;
SPDR = 0xFF;
}
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
buf[nbyte] = SPDR;
}
/** SPI send a byte */
static void spiSend(uint8_t b) {
SPDR = b;
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
}
/** SPI send block - only one call so force inline */
static inline __attribute__((always_inline))
void spiSendBlock(uint8_t token, const uint8_t* buf) {
SPDR = token;
for (uint16_t i = 0; i < 512; i += 2) {
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
SPDR = buf[i];
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
SPDR = buf[i + 1];
}
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
}
//------------------------------------------------------------------------------
#else // SOFTWARE_SPI
//------------------------------------------------------------------------------
/** nop to tune soft SPI timing */
#define nop asm volatile ("nop\n\t")
/** Soft SPI receive byte */
static uint8_t spiRec() {
uint8_t data = 0;
// no interrupts during byte receive - about 8 us
cli();
// output pin high - like sending 0xFF
WRITE(SPI_MOSI_PIN, HIGH);
for (uint8_t i = 0; i < 8; i++) {
WRITE(SPI_SCK_PIN, HIGH);
// adjust so SCK is nice
nop;
nop;
data <<= 1;
if (READ(SPI_MISO_PIN)) data |= 1;
WRITE(SPI_SCK_PIN, LOW);
}
// enable interrupts
sei();
return data;
}
/** Soft SPI read data */
static void spiRead(uint8_t* buf, uint16_t nbyte) {
for (uint16_t i = 0; i < nbyte; i++)
buf[i] = spiRec();
}
/** Soft SPI send byte */
static void spiSend(uint8_t data) {
// no interrupts during byte send - about 8 us
cli();
for (uint8_t i = 0; i < 8; i++) {
WRITE(SPI_SCK_PIN, LOW);
WRITE(SPI_MOSI_PIN, data & 0x80);
data <<= 1;
WRITE(SPI_SCK_PIN, HIGH);
}
// hold SCK high for a few ns
nop;
nop;
nop;
nop;
WRITE(SPI_SCK_PIN, LOW);
// enable interrupts
sei();
}
/** Soft SPI send block */
void spiSendBlock(uint8_t token, const uint8_t* buf) {
spiSend(token);
for (uint16_t i = 0; i < 512; i++)
spiSend(buf[i]);
}
#endif // SOFTWARE_SPI
// send command and return error code. Return zero for OK
uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
// select card
chipSelectLow();
// wait up to 300 ms if busy
waitNotBusy(300);
// send command
spiSend(cmd | 0x40);
// send argument
for (int8_t s = 24; s >= 0; s -= 8) spiSend(arg >> s);
// send CRC
uint8_t crc = 0xFF;
if (cmd == CMD0) crc = 0x95; // correct crc for CMD0 with arg 0
if (cmd == CMD8) crc = 0x87; // correct crc for CMD8 with arg 0x1AA
spiSend(crc);
// skip stuff byte for stop read
if (cmd == CMD12) spiRec();
// Wait for response
// wait for response
for (uint8_t i = 0; ((status_ = spiRec()) & 0x80) && i != 0xFF; i++) { /* Intentionally left empty */ }
return status_;
}
@@ -155,14 +219,15 @@ uint32_t Sd2Card::cardSize() {
}
}
void Sd2Card::chipDeselect() {
extDigitalWrite(chipSelectPin_, HIGH);
spiSend(0xFF); // Ensure MISO goes high impedance
void Sd2Card::chipSelectHigh() {
digitalWrite(chipSelectPin_, HIGH);
}
void Sd2Card::chipSelect() {
spiInit(spiRate_);
extDigitalWrite(chipSelectPin_, LOW);
void Sd2Card::chipSelectLow() {
#if DISABLED(SOFTWARE_SPI)
spiInit(spiRate_);
#endif // SOFTWARE_SPI
digitalWrite(chipSelectPin_, LOW);
}
/**
@@ -191,8 +256,13 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
goto FAIL;
}
}
if (type_ != SD_CARD_TYPE_SDHC) { firstBlock <<= 9; lastBlock <<= 9; }
if (cardCommand(CMD32, firstBlock) || cardCommand(CMD33, lastBlock) || cardCommand(CMD38, 0)) {
if (type_ != SD_CARD_TYPE_SDHC) {
firstBlock <<= 9;
lastBlock <<= 9;
}
if (cardCommand(CMD32, firstBlock)
|| cardCommand(CMD33, lastBlock)
|| cardCommand(CMD38, 0)) {
error(SD_CARD_ERROR_ERASE);
goto FAIL;
}
@@ -200,10 +270,10 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
error(SD_CARD_ERROR_ERASE_TIMEOUT);
goto FAIL;
}
chipDeselect();
chipSelectHigh();
return true;
FAIL:
chipDeselect();
chipSelectHigh();
return false;
}
@@ -227,90 +297,92 @@ bool Sd2Card::eraseSingleBlockEnable() {
* \return true for success, false for failure.
* The reason for failure can be determined by calling errorCode() and errorData().
*/
bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) {
bool Sd2Card::init(uint8_t sckRateID, pin_t chipSelectPin) {
errorCode_ = type_ = 0;
chipSelectPin_ = chipSelectPin;
// 16-bit init start time allows over a minute
const millis_t init_timeout = millis() + SD_INIT_TIMEOUT;
uint16_t t0 = (uint16_t)millis();
uint32_t arg;
watchdog_refresh(); // In case init takes too long
// If init takes more than 4s it could trigger
// watchdog leading to a reboot loop.
#if ENABLED(USE_WATCHDOG)
watchdog_reset();
#endif
// Set pin modes
extDigitalWrite(chipSelectPin_, HIGH); // For some CPUs pinMode can write the wrong data so init desired data value first
pinMode(chipSelectPin_, OUTPUT); // Solution for #8746 by @benlye
spiBegin();
// set pin modes
pinMode(chipSelectPin_, OUTPUT);
chipSelectHigh();
SET_INPUT(SPI_MISO_PIN);
SET_OUTPUT(SPI_MOSI_PIN);
SET_OUTPUT(SPI_SCK_PIN);
// Set SCK rate for initialization commands
spiRate_ = SPI_SD_INIT_RATE;
spiInit(spiRate_);
#if DISABLED(SOFTWARE_SPI)
// SS must be in output mode even it is not chip select
SET_OUTPUT(SS_PIN);
// set SS high - may be chip select for another SPI device
#if SET_SPI_SS_HIGH
WRITE(SS_PIN, HIGH);
#endif // SET_SPI_SS_HIGH
// set SCK rate for initialization commands
spiRate_ = SPI_SD_INIT_RATE;
spiInit(spiRate_);
#endif // SOFTWARE_SPI
// Must supply min of 74 clock cycles with CS high.
// must supply min of 74 clock cycles with CS high.
for (uint8_t i = 0; i < 10; i++) spiSend(0xFF);
watchdog_refresh(); // In case init takes too long
// Command to go idle in SPI mode
// command to go idle in SPI mode
while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) {
if (ELAPSED(millis(), init_timeout)) {
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
error(SD_CARD_ERROR_CMD0);
goto FAIL;
}
}
#if ENABLED(SD_CHECK_AND_RETRY)
crcSupported = (cardCommand(CMD59, 1) == R1_IDLE_STATE);
#endif
watchdog_refresh(); // In case init takes too long
// check SD version
for (;;) {
if (cardCommand(CMD8, 0x1AA) == (R1_ILLEGAL_COMMAND | R1_IDLE_STATE)) {
type(SD_CARD_TYPE_SD1);
break;
}
// Get the last byte of r7 response
if ((cardCommand(CMD8, 0x1AA) & R1_ILLEGAL_COMMAND)) {
type(SD_CARD_TYPE_SD1);
}
else {
// only need last byte of r7 response
for (uint8_t i = 0; i < 4; i++) status_ = spiRec();
if (status_ == 0xAA) {
type(SD_CARD_TYPE_SD2);
break;
}
if (ELAPSED(millis(), init_timeout)) {
if (status_ != 0xAA) {
error(SD_CARD_ERROR_CMD8);
goto FAIL;
}
type(SD_CARD_TYPE_SD2);
}
watchdog_refresh(); // In case init takes too long
// Initialize card and send host supports SDHC if SD2
// initialize card and send host supports SDHC if SD2
arg = type() == SD_CARD_TYPE_SD2 ? 0x40000000 : 0;
while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) {
// Check for timeout
if (ELAPSED(millis(), init_timeout)) {
// check for timeout
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
error(SD_CARD_ERROR_ACMD41);
goto FAIL;
}
}
// If SD2 read OCR register to check for SDHC card
// if SD2 read OCR register to check for SDHC card
if (type() == SD_CARD_TYPE_SD2) {
if (cardCommand(CMD58, 0)) {
error(SD_CARD_ERROR_CMD58);
goto FAIL;
}
if ((spiRec() & 0xC0) == 0xC0) type(SD_CARD_TYPE_SDHC);
// Discard rest of ocr - contains allowed voltage range
// discard rest of ocr - contains allowed voltage range
for (uint8_t i = 0; i < 3; i++) spiRec();
}
chipDeselect();
chipSelectHigh();
return setSckRate(sckRateID);
#if DISABLED(SOFTWARE_SPI)
return setSckRate(sckRateID);
#else // SOFTWARE_SPI
UNUSED(sckRateID);
return true;
#endif // SOFTWARE_SPI
FAIL:
chipDeselect();
chipSelectHigh();
return false;
}
@@ -322,7 +394,8 @@ bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) {
* \return true for success, false for failure.
*/
bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; // Use address if not SDHC card
// use address if not SDHC card
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
#if ENABLED(SD_CHECK_AND_RETRY)
uint8_t retryCnt = 3;
@@ -332,7 +405,7 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
else if (readData(dst, 512))
return true;
chipDeselect();
chipSelectHigh();
if (!--retryCnt) break;
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
@@ -342,7 +415,7 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
#else
if (cardCommand(CMD17, blockNumber)) {
error(SD_CARD_ERROR_CMD17);
chipDeselect();
chipSelectHigh();
return false;
}
else
@@ -358,13 +431,12 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
* \return true for success, false for failure.
*/
bool Sd2Card::readData(uint8_t* dst) {
chipSelect();
chipSelectLow();
return readData(dst, 512);
}
#if ENABLED(SD_CHECK_AND_RETRY)
#ifdef FAST_CRC
static const uint16_t crctab16[] PROGMEM = {
static const uint16_t crctab[] PROGMEM = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
@@ -398,69 +470,63 @@ bool Sd2Card::readData(uint8_t* dst) {
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
};
// faster CRC-CCITT
// uses the x^16,x^12,x^5,x^1 polynomial.
static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
uint16_t crc = 0;
for (size_t i = 0; i < n; i++) {
crc = pgm_read_word(&crctab16[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
}
return crc;
}
#else
// slower CRC-CCITT
// uses the x^16,x^12,x^5,x^1 polynomial.
static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
uint16_t crc = 0;
for (size_t i = 0; i < n; i++) {
crc = (uint8_t)(crc >> 8) | (crc << 8);
crc ^= data[i];
crc ^= (uint8_t)(crc & 0xFF) >> 4;
crc ^= crc << 12;
crc ^= (crc & 0xFF) << 5;
}
return crc;
}
#endif
#endif // SD_CHECK_AND_RETRY
bool Sd2Card::readData(uint8_t* dst, const uint16_t count) {
bool success = false;
const millis_t read_timeout = millis() + SD_READ_TIMEOUT;
while ((status_ = spiRec()) == 0xFF) { // Wait for start block token
if (ELAPSED(millis(), read_timeout)) {
bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
// wait for start block token
uint16_t t0 = millis();
while ((status_ = spiRec()) == 0XFF) {
if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) {
error(SD_CARD_ERROR_READ_TIMEOUT);
goto FAIL;
}
}
if (status_ == DATA_START_BLOCK) {
spiRead(dst, count); // Transfer data
const uint16_t recvCrc = (spiRec() << 8) | spiRec();
#if ENABLED(SD_CHECK_AND_RETRY)
success = !crcSupported || recvCrc == CRC_CCITT(dst, count);
if (!success) error(SD_CARD_ERROR_READ_CRC);
#else
success = true;
UNUSED(recvCrc);
#endif
}
else
if (status_ != DATA_START_BLOCK) {
error(SD_CARD_ERROR_READ);
goto FAIL;
}
// transfer data
spiRead(dst, count);
#if ENABLED(SD_CHECK_AND_RETRY)
{
uint16_t calcCrc = CRC_CCITT(dst, count);
uint16_t recvCrc = spiRec() << 8;
recvCrc |= spiRec();
if (calcCrc != recvCrc) {
error(SD_CARD_ERROR_CRC);
goto FAIL;
}
}
#else
// discard CRC
spiRec();
spiRec();
#endif
chipSelectHigh();
// Send an additional dummy byte, required by Toshiba Flash Air SD Card
spiSend(0XFF);
return true;
FAIL:
chipDeselect();
return success;
chipSelectHigh();
// Send an additional dummy byte, required by Toshiba Flash Air SD Card
spiSend(0XFF);
return false;
}
/** read CID or CSR register */
bool Sd2Card::readRegister(const uint8_t cmd, void* buf) {
bool Sd2Card::readRegister(uint8_t cmd, void* buf) {
uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
if (cardCommand(cmd, 0)) {
error(SD_CARD_ERROR_READ_REG);
chipDeselect();
chipSelectHigh();
return false;
}
return readData(dst, 16);
@@ -478,11 +544,13 @@ bool Sd2Card::readRegister(const uint8_t cmd, void* buf) {
*/
bool Sd2Card::readStart(uint32_t blockNumber) {
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
const bool success = !cardCommand(CMD18, blockNumber);
if (!success) error(SD_CARD_ERROR_CMD18);
chipDeselect();
return success;
if (cardCommand(CMD18, blockNumber)) {
error(SD_CARD_ERROR_CMD18);
chipSelectHigh();
return false;
}
chipSelectHigh();
return true;
}
/**
@@ -491,11 +559,14 @@ bool Sd2Card::readStart(uint32_t blockNumber) {
* \return true for success, false for failure.
*/
bool Sd2Card::readStop() {
chipSelect();
const bool success = !cardCommand(CMD12, 0);
if (!success) error(SD_CARD_ERROR_CMD12);
chipDeselect();
return success;
chipSelectLow();
if (cardCommand(CMD12, 0)) {
error(SD_CARD_ERROR_CMD12);
chipSelectHigh();
return false;
}
chipSelectHigh();
return true;
}
/**
@@ -510,49 +581,55 @@ bool Sd2Card::readStop() {
* \return The value one, true, is returned for success and the value zero,
* false, is returned for an invalid value of \a sckRateID.
*/
bool Sd2Card::setSckRate(const uint8_t sckRateID) {
const bool success = (sckRateID <= 6);
if (success) spiRate_ = sckRateID; else error(SD_CARD_ERROR_SCK_RATE);
return success;
bool Sd2Card::setSckRate(uint8_t sckRateID) {
if (sckRateID > 6) {
error(SD_CARD_ERROR_SCK_RATE);
return false;
}
spiRate_ = sckRateID;
return true;
}
/**
* Wait for card to become not-busy
* \param[in] timeout_ms Timeout to abort.
* \return true for success, false for timeout.
*/
bool Sd2Card::waitNotBusy(const millis_t timeout_ms) {
const millis_t wait_timeout = millis() + timeout_ms;
while (spiRec() != 0xFF) if (ELAPSED(millis(), wait_timeout)) return false;
// wait for card to go not busy
bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) {
uint16_t t0 = millis();
while (spiRec() != 0XFF)
if (((uint16_t)millis() - t0) >= timeoutMillis) return false;
return true;
}
/**
* Write a 512 byte block to an SD card.
* Writes a 512 byte block to an SD card.
*
* \param[in] blockNumber Logical block to be written.
* \param[in] src Pointer to the location of the data to be written.
* \return true for success, false for failure.
*/
bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; // Use address if not SDHC card
bool success = false;
if (!cardCommand(CMD24, blockNumber)) {
if (writeData(DATA_START_BLOCK, src)) {
if (waitNotBusy(SD_WRITE_TIMEOUT)) { // Wait for flashing to complete
success = !(cardCommand(CMD13, 0) || spiRec()); // Response is r2 so get and check two bytes for nonzero
if (!success) error(SD_CARD_ERROR_WRITE_PROGRAMMING);
}
else
error(SD_CARD_ERROR_WRITE_TIMEOUT);
}
}
else
// use address if not SDHC card
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
if (cardCommand(CMD24, blockNumber)) {
error(SD_CARD_ERROR_CMD24);
goto FAIL;
}
if (!writeData(DATA_START_BLOCK, src)) goto FAIL;
chipDeselect();
return success;
// wait for flash programming to complete
if (!waitNotBusy(SD_WRITE_TIMEOUT)) {
error(SD_CARD_ERROR_WRITE_TIMEOUT);
goto FAIL;
}
// response is r2 so get and check two bytes for nonzero
if (cardCommand(CMD13, 0) || spiRec()) {
error(SD_CARD_ERROR_WRITE_PROGRAMMING);
goto FAIL;
}
chipSelectHigh();
return true;
FAIL:
chipSelectHigh();
return false;
}
/**
@@ -561,35 +638,28 @@ bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
* \return true for success, false for failure.
*/
bool Sd2Card::writeData(const uint8_t* src) {
bool success = true;
chipSelect();
// Wait for previous write to finish
chipSelectLow();
// wait for previous write to finish
if (!waitNotBusy(SD_WRITE_TIMEOUT) || !writeData(WRITE_MULTIPLE_TOKEN, src)) {
error(SD_CARD_ERROR_WRITE_MULTIPLE);
success = false;
chipSelectHigh();
return false;
}
chipDeselect();
return success;
chipSelectHigh();
return true;
}
// Send one block of data for write block or write multiple blocks
bool Sd2Card::writeData(const uint8_t token, const uint8_t* src) {
uint16_t crc =
#if ENABLED(SD_CHECK_AND_RETRY)
CRC_CCITT(src, 512)
#else
0xFFFF
#endif
;
// send one block of data for write block or write multiple blocks
bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
spiSendBlock(token, src);
spiSend(crc >> 8);
spiSend(crc & 0xFF);
spiSend(0xFF); // dummy crc
spiSend(0xFF); // dummy crc
status_ = spiRec();
if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) {
error(SD_CARD_ERROR_WRITE);
chipDeselect();
chipSelectHigh();
return false;
}
return true;
@@ -606,18 +676,23 @@ bool Sd2Card::writeData(const uint8_t token, const uint8_t* src) {
*
* \return true for success, false for failure.
*/
bool Sd2Card::writeStart(uint32_t blockNumber, const uint32_t eraseCount) {
bool success = false;
if (!cardAcmd(ACMD23, eraseCount)) { // Send pre-erase count
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; // Use address if not SDHC card
success = !cardCommand(CMD25, blockNumber);
if (!success) error(SD_CARD_ERROR_CMD25);
}
else
bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) {
// send pre-erase count
if (cardAcmd(ACMD23, eraseCount)) {
error(SD_CARD_ERROR_ACMD23);
chipDeselect();
return success;
goto FAIL;
}
// use address if not SDHC card
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
if (cardCommand(CMD25, blockNumber)) {
error(SD_CARD_ERROR_CMD25);
goto FAIL;
}
chipSelectHigh();
return true;
FAIL:
chipSelectHigh();
return false;
}
/**
@@ -626,17 +701,16 @@ bool Sd2Card::writeStart(uint32_t blockNumber, const uint32_t eraseCount) {
* \return true for success, false for failure.
*/
bool Sd2Card::writeStop() {
bool success = false;
chipSelect();
if (waitNotBusy(SD_WRITE_TIMEOUT)) {
spiSend(STOP_TRAN_TOKEN);
success = waitNotBusy(SD_WRITE_TIMEOUT);
}
else
error(SD_CARD_ERROR_STOP_TRAN);
chipDeselect();
return success;
chipSelectLow();
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
spiSend(STOP_TRAN_TOKEN);
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
chipSelectHigh();
return true;
FAIL:
error(SD_CARD_ERROR_STOP_TRAN);
chipSelectHigh();
return false;
}
#endif // SDSUPPORT

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* \file
@@ -28,15 +27,22 @@
/**
* Arduino Sd2Card Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#ifndef _SD2CARD_H_
#define _SD2CARD_H_
#include "SdFatConfig.h"
#include "SdInfo.h"
#include <stdint.h>
// SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6
uint8_t const SPI_FULL_SPEED = 0, // Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate().
SPI_HALF_SPEED = 1, // Set SCK rate to F_CPU/4. See Sd2Card::setSckRate().
SPI_QUARTER_SPEED = 2, // Set SCK rate to F_CPU/8. See Sd2Card::setSckRate().
SPI_EIGHTH_SPEED = 3, // Set SCK rate to F_CPU/16. See Sd2Card::setSckRate().
SPI_SIXTEENTH_SPEED = 4; // Set SCK rate to F_CPU/32. See Sd2Card::setSckRate().
uint16_t const SD_INIT_TIMEOUT = 2000, // init timeout ms
SD_ERASE_TIMEOUT = 10000, // erase timeout ms
@@ -44,21 +50,21 @@ uint16_t const SD_INIT_TIMEOUT = 2000, // init timeout ms
SD_WRITE_TIMEOUT = 600; // write time out ms
// SD card errors
uint8_t const SD_CARD_ERROR_CMD0 = 0x01, // timeout error for command CMD0 (initialize card in SPI mode)
SD_CARD_ERROR_CMD8 = 0x02, // CMD8 was not accepted - not a valid SD card
SD_CARD_ERROR_CMD12 = 0x03, // card returned an error response for CMD12 (write stop)
SD_CARD_ERROR_CMD17 = 0x04, // card returned an error response for CMD17 (read block)
SD_CARD_ERROR_CMD18 = 0x05, // card returned an error response for CMD18 (read multiple block)
SD_CARD_ERROR_CMD24 = 0x06, // card returned an error response for CMD24 (write block)
SD_CARD_ERROR_CMD25 = 0x07, // WRITE_MULTIPLE_BLOCKS command failed
SD_CARD_ERROR_CMD58 = 0x08, // card returned an error response for CMD58 (read OCR)
SD_CARD_ERROR_ACMD23 = 0x09, // SET_WR_BLK_ERASE_COUNT failed
SD_CARD_ERROR_ACMD41 = 0x0A, // ACMD41 initialization process timeout
SD_CARD_ERROR_BAD_CSD = 0x0B, // card returned a bad CSR version field
SD_CARD_ERROR_ERASE = 0x0C, // erase block group command failed
SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0x0D, // card not capable of single block erase
SD_CARD_ERROR_ERASE_TIMEOUT = 0x0E, // Erase sequence timed out
SD_CARD_ERROR_READ = 0x0F, // card returned an error token instead of read data
uint8_t const SD_CARD_ERROR_CMD0 = 0X1, // timeout error for command CMD0 (initialize card in SPI mode)
SD_CARD_ERROR_CMD8 = 0X2, // CMD8 was not accepted - not a valid SD card
SD_CARD_ERROR_CMD12 = 0X3, // card returned an error response for CMD12 (write stop)
SD_CARD_ERROR_CMD17 = 0X4, // card returned an error response for CMD17 (read block)
SD_CARD_ERROR_CMD18 = 0X5, // card returned an error response for CMD18 (read multiple block)
SD_CARD_ERROR_CMD24 = 0X6, // card returned an error response for CMD24 (write block)
SD_CARD_ERROR_CMD25 = 0X7, // WRITE_MULTIPLE_BLOCKS command failed
SD_CARD_ERROR_CMD58 = 0X8, // card returned an error response for CMD58 (read OCR)
SD_CARD_ERROR_ACMD23 = 0X9, // SET_WR_BLK_ERASE_COUNT failed
SD_CARD_ERROR_ACMD41 = 0XA, // ACMD41 initialization process timeout
SD_CARD_ERROR_BAD_CSD = 0XB, // card returned a bad CSR version field
SD_CARD_ERROR_ERASE = 0XC, // erase block group command failed
SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD, // card not capable of single block erase
SD_CARD_ERROR_ERASE_TIMEOUT = 0XE, // Erase sequence timed out
SD_CARD_ERROR_READ = 0XF, // card returned an error token instead of read data
SD_CARD_ERROR_READ_REG = 0x10, // read CID or CSD failed
SD_CARD_ERROR_READ_TIMEOUT = 0x11, // timeout while waiting for start of read data
SD_CARD_ERROR_STOP_TRAN = 0x12, // card did not accept STOP_TRAN_TOKEN
@@ -69,8 +75,7 @@ uint8_t const SD_CARD_ERROR_CMD0 = 0x01, // timeout error for com
SD_CARD_ERROR_WRITE_TIMEOUT = 0x17, // timeout occurred during write programming
SD_CARD_ERROR_SCK_RATE = 0x18, // incorrect rate selected
SD_CARD_ERROR_INIT_NOT_CALLED = 0x19, // init() not called
// 0x1A is unused now, it was: card returned an error for CMD59 (CRC_ON_OFF)
SD_CARD_ERROR_READ_CRC = 0x1B; // invalid read CRC
SD_CARD_ERROR_CRC = 0x20; // crc check error
// card types
uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1 SD card
@@ -84,14 +89,29 @@ uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1
#define SOFTWARE_SPI
#elif USE_SOFTWARE_SPI
#define SOFTWARE_SPI
#endif // MEGA_SOFT_SPI
#endif
// SPI pin definitions - do not edit here - change in SdFatConfig.h
#if DISABLED(SOFTWARE_SPI)
// hardware pin defs
#define SD_CHIP_SELECT_PIN SS_PIN // The default chip select pin for the SD card is SS.
// The following three pins must not be redefined for hardware SPI.
#define SPI_MOSI_PIN MOSI_PIN // SPI Master Out Slave In pin
#define SPI_MISO_PIN MISO_PIN // SPI Master In Slave Out pin
#define SPI_SCK_PIN SCK_PIN // SPI Clock pin
#else // SOFTWARE_SPI
#define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN // SPI chip select pin
#define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN // SPI Master Out Slave In pin
#define SPI_MISO_PIN SOFT_SPI_MISO_PIN // SPI Master In Slave Out pin
#define SPI_SCK_PIN SOFT_SPI_SCK_PIN // SPI Clock pin
#endif // SOFTWARE_SPI
/**
* \class Sd2Card
* \brief Raw access to SD and SDHC flash memory cards.
*/
class Sd2Card {
public:
public:
Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {}
@@ -103,15 +123,15 @@ public:
* Set SD error code.
* \param[in] code value for error code.
*/
inline void error(const uint8_t code) { errorCode_ = code; }
void error(uint8_t code) {errorCode_ = code;}
/**
* \return error code for last error. See Sd2Card.h for a list of error codes.
*/
inline int errorCode() const { return errorCode_; }
int errorCode() const {return errorCode_;}
/** \return error data for last error. */
inline int errorData() const { return status_; }
int errorData() const {return status_;}
/**
* Initialize an SD flash memory card with default clock rate and chip
@@ -119,8 +139,8 @@ public:
*
* \return true for success or false for failure.
*/
bool init(const uint8_t sckRateID, const pin_t chipSelectPin);
bool init(uint8_t sckRateID = SPI_FULL_SPEED,
pin_t chipSelectPin = SD_CHIP_SELECT_PIN);
bool readBlock(uint32_t block, uint8_t* dst);
/**
@@ -142,13 +162,12 @@ public:
*
* \return true for success or false for failure.
*/
inline bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); }
bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); }
bool readData(uint8_t* dst);
bool readStart(uint32_t blockNumber);
bool readStop();
bool setSckRate(const uint8_t sckRateID);
bool setSckRate(uint8_t sckRateID);
/**
* Return the card type: SD V1, SD V2 or SDHC
* \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
@@ -156,10 +175,10 @@ public:
int type() const {return type_;}
bool writeBlock(uint32_t blockNumber, const uint8_t* src);
bool writeData(const uint8_t* src);
bool writeStart(uint32_t blockNumber, const uint32_t eraseCount);
bool writeStart(uint32_t blockNumber, uint32_t eraseCount);
bool writeStop();
private:
private:
uint8_t chipSelectPin_,
errorCode_,
spiRate_,
@@ -167,17 +186,19 @@ private:
type_;
// private functions
inline uint8_t cardAcmd(const uint8_t cmd, const uint32_t arg) {
uint8_t cardAcmd(uint8_t cmd, uint32_t arg) {
cardCommand(CMD55, 0);
return cardCommand(cmd, arg);
}
uint8_t cardCommand(const uint8_t cmd, const uint32_t arg);
uint8_t cardCommand(uint8_t cmd, uint32_t arg);
bool readData(uint8_t* dst, const uint16_t count);
bool readRegister(const uint8_t cmd, void* buf);
void chipDeselect();
void chipSelect();
inline void type(const uint8_t value) { type_ = value; }
bool waitNotBusy(const millis_t timeout_ms);
bool writeData(const uint8_t token, const uint8_t* src);
bool readData(uint8_t* dst, uint16_t count);
bool readRegister(uint8_t cmd, void* buf);
void chipSelectHigh();
void chipSelectLow();
void type(uint8_t value) { type_ = value; }
bool waitNotBusy(uint16_t timeoutMillis);
bool writeData(uint8_t token, const uint8_t* src);
};
#endif // _SD2CARD_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,26 +20,20 @@
*
*/
#if __GNUC__ > 8
// The NXP platform updated GCC from 7.2.1 to 9.2.1
// and this new warning apparently can be ignored.
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
#endif
/**
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include "../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#include "SdBaseFile.h"
#include "Marlin.h"
#include "../MarlinCore.h"
SdBaseFile* SdBaseFile::cwd_ = 0; // Pointer to Current Working Directory
// callback function for date/time
@@ -87,7 +81,7 @@ bool SdBaseFile::addDirCluster() {
// cache a file's directory entry
// return pointer to cached entry or null for failure
dir_t* SdBaseFile::cacheDirEntry(uint8_t action) {
if (!vol_->cacheRawBlock(dirBlock_, action)) return nullptr;
if (!vol_->cacheRawBlock(dirBlock_, action)) return NULL;
return vol_->cache()->dir + dirIndex_;
}
@@ -279,7 +273,7 @@ int16_t SdBaseFile::fgets(char* str, int16_t num, char* delim) {
*
* \return true for success, false for failure.
*/
bool SdBaseFile::getDosName(char * const name) {
bool SdBaseFile::getFilename(char * const name) {
if (!isOpen()) return false;
if (isRoot()) {
@@ -847,7 +841,7 @@ bool SdBaseFile::openParent(SdBaseFile* dir) {
// search for parent in '../..'
do {
if (file.readDir(&entry, nullptr) != 32) return false;
if (file.readDir(&entry, NULL) != 32) return false;
c = entry.firstClusterLow;
c |= (uint32_t)entry.firstClusterHigh << 16;
} while (c != cluster);
@@ -911,7 +905,7 @@ int SdBaseFile::peek() {
// print uint8_t with width 2
static void print2u(const uint8_t v) {
if (v < 10) SERIAL_CHAR('0');
SERIAL_ECHO(int(v));
SERIAL_ECHO_F(v, DEC);
}
/**
@@ -963,7 +957,7 @@ void SdBaseFile::printFatTime(uint16_t fatTime) {
*/
bool SdBaseFile::printName() {
char name[FILENAME_LENGTH];
if (!getDosName(name)) return false;
if (!getFilename(name)) return false;
SERIAL_ECHO(name);
return true;
}

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* \file
@@ -28,10 +27,12 @@
/**
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#ifndef _SDBASEFILE_H_
#define _SDBASEFILE_H_
#include "SdFatConfig.h"
#include "SdVolume.h"
@@ -108,7 +109,7 @@ static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9)
*
* \return Extracted month [1,12]
*/
static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0xF; }
static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0XF; }
/**
* day part of FAT directory date field
@@ -286,7 +287,7 @@ class SdBaseFile {
*/
bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; }
bool getDosName(char * const name);
bool getFilename(char * const name);
void ls(uint8_t flags = 0, uint8_t indent = 0);
bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
@@ -385,3 +386,5 @@ class SdBaseFile {
bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
dir_t* readDirCache();
};
#endif // _SDBASEFILE_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,17 +19,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* SdFatConfig.h
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include "../inc/MarlinConfig.h"
#ifndef _SDFATCONFIG_H_
#define _SDFATCONFIG_H_
#include "MarlinConfig.h"
/**
* To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
@@ -90,6 +92,12 @@
// Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI.
#define USE_SOFTWARE_SPI 0
// Define software SPI pins so Mega can use unmodified 168/328 shields
#define SOFT_SPI_CS_PIN 10 // Software SPI chip select pin for the SD
#define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin
#define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin
#define SOFT_SPI_SCK_PIN 13 // Software SPI Clock pin
/**
* The __cxa_pure_virtual function is an error handler that is invoked when
* a pure virtual function is called.
@@ -104,3 +112,5 @@
// Total bytes needed to store a single long filename
#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1)
#endif // _SDFATCONFIG_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* \file
@@ -28,12 +27,12 @@
/**
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include <stdint.h>
#ifndef SDFATSTRUCTS_H
#define SDFATSTRUCTS_H
#define PACKED __attribute__((__packed__))
@@ -612,3 +611,5 @@ static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
}
#endif // SDFATSTRUCTS_H

91
Marlin/SdFatUtil.cpp Normal file
View File

@@ -0,0 +1,91 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Arduino SdFat Library
* Copyright (C) 2008 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include "MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#include "SdFatUtil.h"
#include "serial.h"
/**
* Amount of free RAM
* \return The number of free bytes.
*/
#ifdef __arm__
extern "C" char* sbrk(int incr);
int SdFatUtil::FreeRam() {
char top;
return &top - reinterpret_cast<char*>(sbrk(0));
}
#else // __arm__
extern char* __brkval;
extern char __bss_end;
/**
* Amount of free RAM
* \return The number of free bytes.
*/
int SdFatUtil::FreeRam() {
char top;
return __brkval ? &top - __brkval : &top - &__bss_end;
}
#endif // __arm
/**
* %Print a string in flash memory.
*
* \param[in] pr Print object for output.
* \param[in] str Pointer to string stored in flash memory.
*/
void SdFatUtil::print_P(PGM_P str) {
for (uint8_t c; (c = pgm_read_byte(str)); str++) SERIAL_CHAR(c);
}
/**
* %Print a string in flash memory followed by a CR/LF.
*
* \param[in] pr Print object for output.
* \param[in] str Pointer to string stored in flash memory.
*/
void SdFatUtil::println_P(PGM_P str) { print_P(str); SERIAL_EOL(); }
/**
* %Print a string in flash memory to Serial.
*
* \param[in] str Pointer to string stored in flash memory.
*/
void SdFatUtil::SerialPrint_P(PGM_P str) { print_P(str); }
/**
* %Print a string in flash memory to Serial followed by a CR/LF.
*
* \param[in] str Pointer to string stored in flash memory.
*/
void SdFatUtil::SerialPrintln_P(PGM_P str) { println_P(str); }
#endif // SDSUPPORT

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,22 +19,33 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Arduino SdFat Library
* Copyright (c) 2008 by William Greiman
* Copyright (C) 2008 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#ifndef _SDFATUTIL_H_
#define _SDFATUTIL_H_
/**
* \file
* \brief Useful utility functions.
*/
/** Store and print a string in flash memory.*/
#define PgmPrint(x) SerialPrint_P(PSTR(x))
/** Store and print a string in flash memory followed by a CR/LF.*/
#define PgmPrintln(x) SerialPrintln_P(PSTR(x))
namespace SdFatUtil {
int FreeRam();
void print_P(PGM_P str);
void println_P(PGM_P str);
void SerialPrint_P(PGM_P str);
void SerialPrintln_P(PGM_P str);
}
using namespace SdFatUtil; // NOLINT
#endif // _SDFATUTIL_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,12 +22,11 @@
/**
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include "../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if ENABLED(SDSUPPORT)

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* \file
@@ -28,21 +27,21 @@
/**
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#ifndef _SDFILE_H_
#define _SDFILE_H_
#include "SdBaseFile.h"
#include <stdint.h>
#include <string.h>
#include <Print.h>
/**
* \class SdFile
* \brief SdBaseFile with Print.
*/
class SdFile : public SdBaseFile/*, public Print*/ {
class SdFile : public SdBaseFile, public Print {
public:
SdFile() {}
SdFile(const char* name, uint8_t oflag);
@@ -57,3 +56,5 @@ class SdFile : public SdBaseFile/*, public Print*/ {
void write_P(PGM_P str);
void writeln_P(PGM_P str);
};
#endif // _SDFILE_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,14 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Arduino Sd2Card Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#ifndef _SDINFO_H_
#define _SDINFO_H_
#include <stdint.h>
@@ -53,13 +54,12 @@ uint8_t const CMD0 = 0x00, // GO_IDLE_STATE - init card in spi mode if CS low
CMD24 = 0x18, // WRITE_BLOCK - write a single data block to the card
CMD25 = 0x19, // WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION
CMD32 = 0x20, // ERASE_WR_BLK_START - sets the address of the first block to be erased
CMD33 = 0x21, // ERASE_WR_BLK_END - sets the address of the last block of the continuous range to be erased
CMD38 = 0x26, // ERASE - erase all previously selected blocks
CMD55 = 0x37, // APP_CMD - escape for application specific command
CMD58 = 0x3A, // READ_OCR - read the OCR register of a card
CMD59 = 0x3B, // CRC_ON_OFF - enable or disable CRC checking
ACMD23 = 0x17, // SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be pre-erased before writing
ACMD41 = 0x29; // SD_SEND_OP_COMD - Sends host capacity support information and activates the card's initialization process
CMD33 = 0x21, // ERASE_WR_BLK_END - sets the address of the last block of the continuous range to be erased*/
CMD38 = 0x26, // ERASE - erase all previously selected blocks */
CMD55 = 0x37, // APP_CMD - escape for application specific command */
CMD58 = 0x3A, // READ_OCR - read the OCR register of a card */
ACMD23 = 0x17, // SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be pre-erased before writing */
ACMD41 = 0x29; // SD_SEND_OP_COMD - Sends host capacity support information and activates the card's initialization process */
/** status for card in the ready state */
uint8_t const R1_READY_STATE = 0x00;
@@ -263,3 +263,5 @@ union csd_t {
csd1_t v1;
csd2_t v2;
};
#endif // _SDINFO_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,19 +22,16 @@
/**
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include "../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#include "SdVolume.h"
#include "../MarlinCore.h"
#if !USE_MULTIPLE_CARDS
// raw block cache
uint32_t SdVolume::cacheBlockNumber_; // current block number
@@ -291,16 +288,6 @@ int32_t SdVolume::freeClusterCount() {
for (uint16_t i = 0; i < n; i++)
if (cacheBuffer_.fat32[i] == 0) free++;
}
#ifdef ESP32
// Needed to reset the idle task watchdog timer on ESP32 as reading the complete FAT may easily
// block for 10+ seconds. yield() is insufficient since it blocks lower prio tasks (e.g., idle).
static millis_t nextTaskTime = 0;
const millis_t ms = millis();
if (ELAPSED(ms, nextTaskTime)) {
vTaskDelay(1); // delay 1 tick (Minimum. Usually 10 or 1 ms depending on skdconfig.h)
nextTaskTime = ms + 1000; // tickle the task manager again in 1 second
}
#endif // ESP32
}
return free;
}

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* \file
@@ -28,24 +27,15 @@
/**
* Arduino SdFat Library
* Copyright (c) 2009 by William Greiman
* Copyright (C) 2009 by William Greiman
*
* This file is part of the Arduino Sd2Card Library
*/
#include <stdint.h>
#include "../inc/MarlinConfigPre.h"
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
#include "usb_flashdrive/Sd2Card_FlashDrive.h"
#elif ENABLED(SDIO_SUPPORT)
#include "Sd2Card_sdio.h"
#else
#include "Sd2Card.h"
#endif
#ifndef _SDVOLUME_H_
#define _SDVOLUME_H_
#include "SdFatConfig.h"
#include "Sd2Card.h"
#include "SdFatStructs.h"
//==============================================================================
@@ -198,4 +188,24 @@ class SdVolume {
}
bool readBlock(uint32_t block, uint8_t* dst) { return sdCard_->readBlock(block, dst); }
bool writeBlock(uint32_t block, const uint8_t* dst) { return sdCard_->writeBlock(block, dst); }
// Deprecated functions
#if ALLOW_DEPRECATED_FUNCTIONS
public:
/**
* \deprecated Use: bool SdVolume::init(Sd2Card* dev);
* \param[in] dev The SD card where the volume is located.
* \return true for success or false for failure.
*/
bool init(Sd2Card& dev) { return init(&dev); }
/**
* \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
* \param[in] dev The SD card where the volume is located.
* \param[in] part The partition to be used.
* \return true for success or false for failure.
*/
bool init(Sd2Card& dev, uint8_t part) { return init(&dev, part); }
#endif // ALLOW_DEPRECATED_FUNCTIONS
};
#endif // _SDVOLUME_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,58 +19,76 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
////////////////////////////
// VENDOR VERSION EXAMPLE //
////////////////////////////
/**
* Marlin release version identifier
* This file is the standard Marlin version identifier file, all fields can be
* overriden by the ones defined on _Version.h by using the Configuration.h
* directive USE_AUTOMATIC_VERSIONING.
*/
//#define SHORT_BUILD_VERSION "2.0.4.4"
/**
* Verbose version identifier which should contain a reference to the location
* from where the binary was downloaded or the source code was compiled.
*/
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
#if ENABLED(USE_AUTOMATIC_VERSIONING)
/**
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2020-01-31"
#include "_Version.h"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
//#define MACHINE_NAME "3D Printer"
#else
/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
* Code which is installed on the device. In most cases —unless the manufacturer
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
//#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
/**
* Marlin release version identifier
*/
#define SHORT_BUILD_VERSION "1.1.9.2"
/**
* Default generic printer UUID.
*/
//#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
/**
* Verbose version identifier which should contain a reference to the location
* from where the binary was downloaded or the source code was compiled.
*/
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
/**
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release.
*/
//#define WEBSITE_URL "http://marlinfw.org"
/**
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2023-07-18"
/**
* Set the vendor info the serial USB interface, if changable
* Currently only supported by DUE platform
*/
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
/**
* Required minimum Configuration.h and Configuration_adv.h file versions.
*
* You must increment this version number for every significant change such as,
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
* the configuration files.
*/
#define REQUIRED_CONFIGURATION_H_VERSION 010109
#define REQUIRED_CONFIGURATION_ADV_H_VERSION 010109
/**
* The protocol for communication to the host. Protocol indicates communication
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
* (Other behaviors are given by the firmware version and capabilities report.)
*/
#define PROTOCOL_VERSION "1.0"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
#define MACHINE_NAME "3D Printer"
/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
* Code which is installed on the device. In most cases —unless the manufacturer
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
/**
* Default generic printer UUID.
*/
#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
/**
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release.
*/
#define WEBSITE_URL "http://marlinfw.org"
#endif // USE_AUTOMATIC_VERSIONING

38
Marlin/bitmap_flags.h Normal file
View File

@@ -0,0 +1,38 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _BITMAP_FLAGS_H_
#define _BITMAP_FLAGS_H_
#include "macros.h"
/**
* These support functions allow the use of large bit arrays of flags that take very
* little RAM. Currently they are limited to being 16x16 in size. Changing the declaration
* to unsigned long will allow us to go to 32x32 if higher resolution meshes are needed
* in the future.
*/
FORCE_INLINE void bitmap_clear(uint16_t bits[16], const uint8_t x, const uint8_t y) { CBI(bits[y], x); }
FORCE_INLINE void bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { SBI(bits[y], x); }
FORCE_INLINE bool is_bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { return TEST(bits[y], x); }
#endif // _BITMAP_FLAGS_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
* blinkm.cpp - Control a BlinkM over i2c
*/
#include "../../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if ENABLED(BLINKM)
@@ -34,7 +34,7 @@
void blinkm_set_led_color(const LEDColor &color) {
Wire.begin();
Wire.beginTransmission(I2C_ADDRESS(0x09));
Wire.beginTransmission(0x09);
Wire.write('o'); //to disable ongoing script, only needs to be used once
Wire.write('n');
Wire.write(color.r);

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,13 +19,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* blinkm.h - Control a BlinkM over i2c
*/
#ifndef _BLINKM_H_
#define _BLINKM_H_
struct LEDColor;
typedef LEDColor LEDColor;
void blinkm_set_led_color(const LEDColor &color);
#endif // _BLINKM_H_

162
Marlin/boards.h Normal file
View File

@@ -0,0 +1,162 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef BOARDS_H
#define BOARDS_H
#define BOARD_UNKNOWN -1
//
// RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
//
#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2
#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
#define BOARD_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
#define BOARD_RAMPS_14_EEB 44 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_RAMPS_14_EFF 45 // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS_14_EEF 46 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
#define BOARD_RAMPS_PLUS_EFB 143 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
#define BOARD_RAMPS_PLUS_EEB 144 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_RAMPS_PLUS_EFF 145 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS_PLUS_EEF 146 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_PLUS_SF 148 // RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
//
// RAMPS Derivatives - ATmega1280, ATmega2560
//
#define BOARD_3DRAG 77 // 3Drag Controller
#define BOARD_K8200 78 // Velleman K8200 Controller (derived from 3Drag Controller)
#define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller)
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
#define BOARD_MKS_BASE 40 // MKS BASE v1.0
#define BOARD_MKS_BASE_15 405 // MKS v1.5 with Allegro A4982 stepper drivers
#define BOARD_MKS_BASE_HEROIC 41 // MKS BASE 1.0 with Heroic HR4982 stepper drivers
#define BOARD_MKS_GEN_13 47 // MKS GEN v1.3 or 1.4
#define BOARD_MKS_GEN_L 53 // MKS GEN L
#define BOARD_MKS_GEN_L_V2 54 // MKS GEN L V2
#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica)
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
#define BOARD_RIGIDBOARD 42 // Invent-A-Part RigidBoard
#define BOARD_RIGIDBOARD_V2 52 // Invent-A-Part RigidBoard V2
#define BOARD_SAINSMART_2IN1 49 // Sainsmart 2-in-1 board
#define BOARD_ULTIMAKER 7 // Ultimaker
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
#define BOARD_AZTEEG_X3 67 // Azteeg X3
#define BOARD_AZTEEG_X3_PRO 68 // Azteeg X3 Pro
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_RUMBA 80 // Rumba
#define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D
#define BOARD_MAKEBOARD_MINI 431 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
#define BOARD_TRIGORILLA_13 343 // TriGorilla Anycubic version 1.3 based on RAMPS EFB
#define BOARD_TRIGORILLA_14 443 // TriGorilla Anycubic version 1.4 based on RAMPS EFB
#define BOARD_RAMPS_ENDER_4 243 // Creality: Ender-4, CR-8
//
// Other ATmega1280, ATmega2560
//
#define BOARD_CNCONTROLS_11 111 // Cartesio CN Controls V11
#define BOARD_CNCONTROLS_12 112 // Cartesio CN Controls V12
#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0
#define BOARD_CHEAPTRONIC_V2 21 // Cheaptronic v2.0
#define BOARD_MIGHTYBOARD_REVE 200 // Makerbot Mightyboard Revision E
#define BOARD_MEGATRONICS 70 // Megatronics
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0
#define BOARD_MEGATRONICS_31 704 // Megatronics v3.1
#define BOARD_RAMBO 301 // Rambo
#define BOARD_MINIRAMBO 302 // Mini-Rambo
#define BOARD_MINIRAMBO_10A 303 // Mini-Rambo 1.0a
#define BOARD_EINSY_RAMBO 304 // Einsy Rambo
#define BOARD_EINSY_RETRO 305 // Einsy Retro
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
#define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_MEGACONTROLLER 310 // Mega controller
#define BOARD_SCOOVO_X9H 321 // abee Scoovo X9H
#define BOARD_GT2560_REV_A 74 // Geeetech GT2560 Rev. A
#define BOARD_GT2560_REV_A_PLUS 75 // Geeetech GT2560 Rev. A+ (with auto level probe)
//
// ATmega1281, ATmega2561
//
#define BOARD_MINITRONICS 702 // Minitronics v1.0/1.1
#define BOARD_SILVER_GATE 25 // Silvergate v1.0
//
// Sanguinololu and Derivatives - ATmega644P, ATmega1284P
//
#define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2
#define BOARD_SANGUINOLOLU_12 62 // Sanguinololu 1.2 and above
#define BOARD_MELZI 63 // Melzi
#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version)
#define BOARD_MELZI_CREALITY 89 // Melzi Creality3D board (for CR-10 etc)
#define BOARD_MELZI_MALYAN 92 // Melzi Malyan M150 board
#define BOARD_MELZI_TRONXY 505 // Tronxy X5S
#define BOARD_STB_11 64 // STB V1.1
#define BOARD_AZTEEG_X1 65 // Azteeg X1
#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone)
//
// Other ATmega644P, ATmega644, ATmega1284P
//
#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics
#define BOARD_GEN3_PLUS 9 // Gen3+
#define BOARD_GEN6 5 // Gen6
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe
#define BOARD_GEN7_CUSTOM 10 // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
#define BOARD_GEN7_12 11 // Gen7 v1.1, v1.2
#define BOARD_GEN7_13 12 // Gen7 v1.3
#define BOARD_GEN7_14 13 // Gen7 v1.4
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_SETHI 20 // Sethi 3D_1
//
// Teensyduino - AT90USB1286, AT90USB1286P
//
#define BOARD_TEENSYLU 8 // Teensylu
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
#define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286)
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
#define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)
#endif // __BOARDS_H

146
Marlin/buzzer.h Normal file
View File

@@ -0,0 +1,146 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __BUZZER_H__
#define __BUZZER_H__
#include "types.h"
#include "fastio.h"
#include "circularqueue.h"
#include "temperature.h"
#include "MarlinConfig.h"
#define TONE_QUEUE_LENGTH 4
/**
* @brief Tone structure
* @details Simple abstraction of a tone based on a duration and a frequency.
*/
struct tone_t {
uint16_t duration;
uint16_t frequency;
};
/**
* @brief Buzzer class
*/
class Buzzer {
private:
struct state_t {
tone_t tone;
uint32_t endtime;
} state;
protected:
CircularQueue<tone_t, TONE_QUEUE_LENGTH> buffer;
/**
* @brief Inverts the sate of a digital PIN
* @details This will invert the current state of an digital IO pin.
*/
void invert() {
TOGGLE(BEEPER_PIN);
}
/**
* @brief Turn off a digital PIN
* @details Alias of digitalWrite(PIN, LOW) using FastIO
*/
void off() {
WRITE(BEEPER_PIN, LOW);
}
/**
* @brief Turn on a digital PIN
* @details Alias of digitalWrite(PIN, HIGH) using FastIO
*/
void on() {
WRITE(BEEPER_PIN, HIGH);
}
/**
* @brief Resets the state of the class
* @details Brings the class state to a known one.
*/
void reset() {
this->off();
this->state.endtime = 0;
}
public:
/**
* @brief Class constructor
*/
Buzzer() {
SET_OUTPUT(BEEPER_PIN);
this->reset();
}
/**
* @brief Add a tone to the queue
* @details Adds a tone_t structure to the ring buffer, will block IO if the
* queue is full waiting for one slot to get available.
*
* @param duration Duration of the tone in milliseconds
* @param frequency Frequency of the tone in hertz
*/
void tone(const uint16_t &duration, const uint16_t &frequency=0) {
while (buffer.isFull()) {
this->tick();
thermalManager.manage_heater();
}
tone_t tone = { duration, frequency };
this->buffer.enqueue(tone);
}
/**
* @brief Loop function
* @details This function should be called at loop, it will take care of
* playing the tones in the queue.
*/
virtual void tick() {
const millis_t now = millis();
if (!this->state.endtime) {
if (this->buffer.isEmpty()) return;
this->state.tone = this->buffer.dequeue();
this->state.endtime = now + this->state.tone.duration;
if (this->state.tone.frequency > 0) {
#if ENABLED(SPEAKER)
CRITICAL_SECTION_START;
::tone(BEEPER_PIN, this->state.tone.frequency, this->state.tone.duration);
CRITICAL_SECTION_END;
#else
this->on();
#endif
}
}
else if (ELAPSED(now, this->state.endtime)) this->reset();
}
};
extern Buzzer buzzer;
#endif

987
Marlin/cardreader.cpp Normal file
View File

@@ -0,0 +1,987 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#include "cardreader.h"
#include "ultralcd.h"
#include "stepper.h"
#include "language.h"
#include "printcounter.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "power_loss_recovery.h"
#endif
CardReader::CardReader() {
#if ENABLED(SDCARD_SORT_ALPHA)
sort_count = 0;
#if ENABLED(SDSORT_GCODE)
sort_alpha = true;
sort_folders = FOLDER_SORTING;
//sort_reverse = false;
#endif
#endif
sdprinting = cardOK = saving = logging = false;
filesize = 0;
sdpos = 0;
file_subcall_ctr = 0;
workDirDepth = 0;
ZERO(workDirParents);
// Disable autostart until card is initialized
autostart_index = -1;
//power to SD reader
#if SDPOWER > -1
OUT_WRITE(SDPOWER, HIGH);
#endif
}
char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
char *pos = buffer;
for (uint8_t i = 0; i < 11; i++) {
if (p.name[i] == ' ') continue;
if (i == 8) *pos++ = '.';
*pos++ = p.name[i];
}
*pos++ = 0;
return buffer;
}
/**
* Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
* LS_Count - Add +1 to nrFiles for every file within the parent
* LS_GetFilename - Get the filename of the file indexed by nrFile_index
* LS_SerialPrint - Print the full path and size of each file to serial output
*/
uint16_t nrFile_index;
void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
dir_t p;
uint8_t cnt = 0;
// Read the next entry from a directory
while (parent.readDir(&p, longFilename) > 0) {
// If the entry is a directory and the action is LS_SerialPrint
if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) {
// Get the short name for the item, which we know is a folder
char dosFilename[FILENAME_LENGTH];
createFilename(dosFilename, p);
// Allocate enough stack space for the full path to a folder, trailing slash, and nul
const bool prepend_is_empty = (!prepend || prepend[0] == '\0');
const int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(dosFilename) + 1 + 1;
char path[len];
// Append the FOLDERNAME12/ to the passed string.
// It contains the full path to the "parent" argument.
// We now have the full path to the item in this folder.
strcpy(path, prepend_is_empty ? "/" : prepend); // root slash if prepend is empty
strcat(path, dosFilename); // FILENAME_LENGTH-1 characters maximum
strcat(path, "/"); // 1 character
// Serial.print(path);
// Get a new directory object using the full path
// and dive recursively into it.
SdFile dir;
if (!dir.open(&parent, dosFilename, O_READ)) {
if (lsAction == LS_SerialPrint) {
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
SERIAL_ECHOLN(dosFilename);
}
}
lsDive(path, dir);
// close() is done automatically by destructor of SdFile
}
else {
uint8_t pn0 = p.name[0];
if (pn0 == DIR_NAME_FREE) break;
if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue;
if (longFilename[0] == '.') continue;
if (!DIR_IS_FILE_OR_SUBDIR(&p) || (p.attributes & DIR_ATT_HIDDEN)) continue;
filenameIsDir = DIR_IS_SUBDIR(&p);
if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue;
switch (lsAction) { // 1 based file count
case LS_Count:
nrFiles++;
break;
case LS_SerialPrint:
createFilename(filename, p);
if (prepend) SERIAL_PROTOCOL(prepend);
SERIAL_PROTOCOL(filename);
SERIAL_PROTOCOLCHAR(' ');
SERIAL_PROTOCOLLN(p.fileSize);
break;
case LS_GetFilename:
createFilename(filename, p);
if (match != NULL) {
if (strcasecmp(match, filename) == 0) return;
}
else if (cnt == nrFile_index) return; // 0 based index
cnt++;
break;
}
}
} // while readDir
}
void CardReader::ls() {
lsAction = LS_SerialPrint;
root.rewind();
lsDive(NULL, root);
}
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
/**
* Get a long pretty path based on a DOS 8.3 path
*/
void CardReader::printLongPath(char *path) {
lsAction = LS_GetFilename;
int i, pathLen = strlen(path);
// SERIAL_ECHOPGM("Full Path: "); SERIAL_ECHOLN(path);
// Zero out slashes to make segments
for (i = 0; i < pathLen; i++) if (path[i] == '/') path[i] = '\0';
SdFile diveDir = root; // start from the root for segment 1
for (i = 0; i < pathLen;) {
if (path[i] == '\0') i++; // move past a single nul
char *segment = &path[i]; // The segment after most slashes
// If a segment is empty (extra-slash) then exit
if (!*segment) break;
// Go to the next segment
while (path[++i]) { }
// SERIAL_ECHOPGM("Looking for segment: "); SERIAL_ECHOLN(segment);
// Find the item, setting the long filename
diveDir.rewind();
lsDive(NULL, diveDir, segment);
// Print /LongNamePart to serial output
SERIAL_PROTOCOLCHAR('/');
SERIAL_PROTOCOL(longFilename[0] ? longFilename : "???");
// If the filename was printed then that's it
if (!filenameIsDir) break;
// SERIAL_ECHOPGM("Opening dir: "); SERIAL_ECHOLN(segment);
// Open the sub-item as the new dive parent
SdFile dir;
if (!dir.open(&diveDir, segment, O_READ)) {
SERIAL_EOL();
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
SERIAL_ECHO(segment);
break;
}
diveDir.close();
diveDir = dir;
} // while i<pathLen
SERIAL_EOL();
}
#endif // LONG_FILENAME_HOST_SUPPORT
/**
* Echo the DOS 8.3 filename (and long filename, if any)
*/
void CardReader::printFilename() {
if (file.isOpen()) {
char dosFilename[FILENAME_LENGTH];
file.getFilename(dosFilename);
SERIAL_ECHO(dosFilename);
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
getfilename(0, dosFilename);
if (longFilename[0]) {
SERIAL_ECHO(' ');
SERIAL_ECHO(longFilename);
}
#endif
}
else
SERIAL_ECHOPGM("(no file)");
SERIAL_EOL();
}
void CardReader::initsd() {
cardOK = false;
if (root.isOpen()) root.close();
#ifndef SPI_SPEED
#define SPI_SPEED SPI_FULL_SPEED
#endif
if (!sd2card.init(SPI_SPEED, SDSS)
#if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
&& !sd2card.init(SPI_SPEED, LCD_SDSS)
#endif
) {
//if (!sd2card.init(SPI_HALF_SPEED,SDSS))
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
}
else if (!volume.init(&sd2card)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
}
else if (!root.openRoot(&volume)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL);
}
else {
cardOK = true;
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
}
setroot();
}
void CardReader::release() {
sdprinting = false;
cardOK = false;
}
void CardReader::openAndPrintFile(const char *name) {
char cmd[4 + strlen(name) + 1]; // Room for "M23 ", filename, and null
sprintf_P(cmd, PSTR("M23 %s"), name);
for (char *c = &cmd[4]; *c; c++) *c = tolower(*c);
enqueue_and_echo_command_now(cmd);
enqueue_and_echo_commands_P(PSTR("M24"));
}
void CardReader::startFileprint() {
if (cardOK) {
sdprinting = true;
#if SD_RESORT
flush_presort();
#endif
}
}
void CardReader::stopSDPrint(
#if SD_RESORT
const bool re_sort/*=false*/
#endif
) {
#if ENABLED(ADVANCED_PAUSE_FEATURE)
did_pause_print = 0;
#endif
sdprinting = abort_sd_printing = false;
if (isFileOpen()) file.close();
#if SD_RESORT
if (re_sort) presort();
#endif
}
void CardReader::openLogFile(char * const path) {
logging = true;
openFile(path, false);
}
void appendAtom(SdFile &file, char *& dst, uint8_t &cnt) {
file.getFilename(dst);
while (*dst && cnt < MAXPATHNAMELENGTH) { dst++; cnt++; }
if (cnt < MAXPATHNAMELENGTH) { *dst = '/'; dst++; cnt++; }
}
void CardReader::getAbsFilename(char *t) {
*t++ = '/'; // Root folder
uint8_t cnt = 1;
for (uint8_t i = 0; i < workDirDepth; i++) // Loop to current work dir
appendAtom(workDirParents[i], t, cnt);
if (cnt < MAXPATHNAMELENGTH - (FILENAME_LENGTH)) {
appendAtom(file, t, cnt);
--t;
}
*t = '\0';
}
void CardReader::openFile(char * const path, const bool read, const bool subcall/*=false*/) {
if (!cardOK) return;
uint8_t doing = 0;
if (isFileOpen()) { // Replacing current file or doing a subroutine
if (subcall) {
if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
SERIAL_ERROR_START();
SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
SERIAL_ERRORLN((int)SD_PROCEDURE_DEPTH);
kill(PSTR(MSG_KILLED));
return;
}
// Store current filename (based on workDirParents) and position
getAbsFilename(proc_filenames[file_subcall_ctr]);
filespos[file_subcall_ctr] = sdpos;
SERIAL_ECHO_START();
SERIAL_ECHOPAIR("SUBROUTINE CALL target:\"", path);
SERIAL_ECHOPAIR("\" parent:\"", proc_filenames[file_subcall_ctr]);
SERIAL_ECHOLNPAIR("\" pos", sdpos);
file_subcall_ctr++;
}
else
doing = 1;
}
else if (subcall) { // Returning from a subcall?
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM("END SUBROUTINE");
}
else { // Opening fresh file
doing = 2;
file_subcall_ctr = 0; // Reset procedure depth in case user cancels print while in procedure
}
if (doing) {
SERIAL_ECHO_START();
SERIAL_ECHOPGM("Now ");
serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh"));
SERIAL_ECHOLNPAIR(" file: ", path);
}
stopSDPrint();
SdFile *curDir;
const char * const fname = diveToFile(curDir, path, false);
if (!fname) return;
if (read) {
if (file.open(curDir, fname, O_READ)) {
filesize = file.fileSize();
sdpos = 0;
SERIAL_PROTOCOLPAIR(MSG_SD_FILE_OPENED, fname);
SERIAL_PROTOCOLLNPAIR(MSG_SD_SIZE, filesize);
SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
getfilename(0, fname);
lcd_setstatus(longFilename[0] ? longFilename : fname);
//if (longFilename[0]) {
// SERIAL_PROTOCOLPAIR(MSG_SD_FILE_LONG_NAME, longFilename);
//}
}
else {
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname);
SERIAL_PROTOCOLCHAR('.');
SERIAL_EOL();
}
}
else { //write
if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname);
SERIAL_PROTOCOLCHAR('.');
SERIAL_EOL();
}
else {
saving = true;
SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, path);
lcd_setstatus(fname);
}
}
}
void CardReader::removeFile(const char * const name) {
if (!cardOK) return;
stopSDPrint();
SdFile *curDir;
const char * const fname = diveToFile(curDir, name, false);
if (!fname) return;
if (file.remove(curDir, fname)) {
SERIAL_PROTOCOLPGM("File deleted:");
SERIAL_PROTOCOLLN(fname);
sdpos = 0;
#if ENABLED(SDCARD_SORT_ALPHA)
presort();
#endif
}
else {
SERIAL_PROTOCOLPGM("Deletion failed, File: ");
SERIAL_PROTOCOL(fname);
SERIAL_PROTOCOLCHAR('.');
}
}
void CardReader::getStatus() {
if (cardOK && sdprinting) {
SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
SERIAL_PROTOCOL(sdpos);
SERIAL_PROTOCOLCHAR('/');
SERIAL_PROTOCOLLN(filesize);
}
else
SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
}
void CardReader::write_command(char *buf) {
char* begin = buf;
char* npos = NULL;
char* end = buf + strlen(buf) - 1;
file.writeError = false;
if ((npos = strchr(buf, 'N')) != NULL) {
begin = strchr(npos, ' ') + 1;
end = strchr(npos, '*') - 1;
}
end[1] = '\r';
end[2] = '\n';
end[3] = '\0';
file.write(begin);
if (file.writeError) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE);
}
}
//
// Run the next autostart file. Called:
// - On boot after successful card init
// - After finishing the previous autostart file
// - From the LCD command to run the autostart file
//
void CardReader::checkautostart() {
if (autostart_index < 0 || sdprinting) return;
if (!cardOK) initsd();
if (cardOK
#if ENABLED(POWER_LOSS_RECOVERY)
&& !jobRecoverFileExists() // Don't run auto#.g when a resume file exists
#endif
) {
char autoname[10];
sprintf_P(autoname, PSTR("auto%i.g"), int(autostart_index));
dir_t p;
root.rewind();
while (root.readDir(&p, NULL) > 0) {
for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
openAndPrintFile(autoname);
autostart_index++;
return;
}
}
}
autostart_index = -1;
}
void CardReader::beginautostart() {
autostart_index = 0;
setroot();
}
void CardReader::closefile(const bool store_location) {
file.sync();
file.close();
saving = logging = false;
if (store_location) {
//future: store printer state, filename and position for continuing a stopped print
// so one can unplug the printer and continue printing the next day.
}
}
/**
* Get the name of a file in the current directory by index
* with optional name to match.
*/
void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) {
#if ENABLED(SDSORT_CACHE_NAMES)
if (match != NULL) {
while (nr < sort_count) {
if (strcasecmp(match, sortshort[nr]) == 0) break;
nr++;
}
}
if (nr < sort_count) {
strcpy(filename, sortshort[nr]);
strcpy(longFilename, sortnames[nr]);
filenameIsDir = TEST(isDir[nr>>3], nr & 0x07);
return;
}
#endif // SDSORT_CACHE_NAMES
lsAction = LS_GetFilename;
nrFile_index = nr;
workDir.rewind();
lsDive(NULL, workDir, match);
}
uint16_t CardReader::getnrfilenames() {
lsAction = LS_Count;
nrFiles = 0;
workDir.rewind();
lsDive(NULL, workDir);
//SERIAL_ECHOLN(nrFiles);
return nrFiles;
}
/**
* Dive to the given file path, with optional echo.
* On exit set curDir and return the name part of the path.
* A NULL result indicates an unrecoverable error.
*/
const char* CardReader::diveToFile(SdFile*& curDir, const char * const path, const bool echo) {
SdFile myDir;
if (path[0] != '/') { curDir = &workDir; return path; }
curDir = &root;
const char *dirname_start = &path[1];
while (dirname_start) {
char * const dirname_end = strchr(dirname_start, '/');
if (dirname_end <= dirname_start) break;
const uint8_t len = dirname_end - dirname_start;
char dosSubdirname[len + 1];
strncpy(dosSubdirname, dirname_start, len);
dosSubdirname[len] = 0;
if (echo) SERIAL_ECHOLN(dosSubdirname);
if (!myDir.open(curDir, dosSubdirname, O_READ)) {
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, dosSubdirname);
SERIAL_PROTOCOLCHAR('.');
SERIAL_EOL();
return NULL;
}
curDir = &myDir;
dirname_start = dirname_end + 1;
}
return dirname_start;
}
void CardReader::chdir(const char * relpath) {
SdFile newDir;
SdFile *parent = workDir.isOpen() ? &workDir : &root;
if (newDir.open(parent, relpath, O_READ)) {
workDir = newDir;
if (workDirDepth < MAX_DIR_DEPTH)
workDirParents[workDirDepth++] = workDir;
#if ENABLED(SDCARD_SORT_ALPHA)
presort();
#endif
}
else {
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
SERIAL_ECHOLN(relpath);
}
}
int8_t CardReader::updir() {
if (workDirDepth > 0) { // At least 1 dir has been saved
workDir = --workDirDepth ? workDirParents[workDirDepth - 1] : root; // Use parent, or root if none
#if ENABLED(SDCARD_SORT_ALPHA)
presort();
#endif
}
return workDirDepth;
}
void CardReader::setroot() {
/*if (!workDir.openRoot(&volume)) {
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
}*/
workDir = root;
#if ENABLED(SDCARD_SORT_ALPHA)
presort();
#endif
}
#if ENABLED(SDCARD_SORT_ALPHA)
/**
* Get the name of a file in the current directory by sort-index
*/
void CardReader::getfilename_sorted(const uint16_t nr) {
getfilename(
#if ENABLED(SDSORT_GCODE)
sort_alpha &&
#endif
(nr < sort_count) ? sort_order[nr] : nr
);
}
/**
* Read all the files and produce a sort key
*
* We can do this in 3 ways...
* - Minimal RAM: Read two filenames at a time sorting along...
* - Some RAM: Buffer the directory just for this sort
* - Most RAM: Buffer the directory and return filenames from RAM
*/
void CardReader::presort() {
// Throw away old sort index
flush_presort();
// Sorting may be turned off
#if ENABLED(SDSORT_GCODE)
if (!sort_alpha) return;
#endif
// If there are files, sort up to the limit
uint16_t fileCnt = getnrfilenames();
if (fileCnt > 0) {
// Never sort more than the max allowed
// If you use folders to organize, 20 may be enough
if (fileCnt > SDSORT_LIMIT) fileCnt = SDSORT_LIMIT;
// Sort order is always needed. May be static or dynamic.
#if ENABLED(SDSORT_DYNAMIC_RAM)
sort_order = new uint8_t[fileCnt];
#endif
// Use RAM to store the entire directory during pre-sort.
// SDSORT_LIMIT should be set to prevent over-allocation.
#if ENABLED(SDSORT_USES_RAM)
// If using dynamic ram for names, allocate on the heap.
#if ENABLED(SDSORT_CACHE_NAMES)
#if ENABLED(SDSORT_DYNAMIC_RAM)
sortshort = new char*[fileCnt];
sortnames = new char*[fileCnt];
#endif
#elif ENABLED(SDSORT_USES_STACK)
char sortnames[fileCnt][SORTED_LONGNAME_MAXLEN];
#endif
// Folder sorting needs 1 bit per entry for flags.
#if HAS_FOLDER_SORTING
#if ENABLED(SDSORT_DYNAMIC_RAM)
isDir = new uint8_t[(fileCnt + 7) >> 3];
#elif ENABLED(SDSORT_USES_STACK)
uint8_t isDir[(fileCnt + 7) >> 3];
#endif
#endif
#else // !SDSORT_USES_RAM
// By default re-read the names from SD for every compare
// retaining only two filenames at a time. This is very
// slow but is safest and uses minimal RAM.
char name1[LONG_FILENAME_LENGTH + 1];
#endif
if (fileCnt > 1) {
// Init sort order.
for (uint16_t i = 0; i < fileCnt; i++) {
sort_order[i] = i;
// If using RAM then read all filenames now.
#if ENABLED(SDSORT_USES_RAM)
getfilename(i);
#if ENABLED(SDSORT_DYNAMIC_RAM)
// Use dynamic method to copy long filename
sortnames[i] = strdup(longest_filename());
#if ENABLED(SDSORT_CACHE_NAMES)
// When caching also store the short name, since
// we're replacing the getfilename() behavior.
sortshort[i] = strdup(filename);
#endif
#else
// Copy filenames into the static array
#if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
strncpy(sortnames[i], longest_filename(), SORTED_LONGNAME_MAXLEN);
sortnames[i][SORTED_LONGNAME_MAXLEN - 1] = '\0';
#else
strncpy(sortnames[i], longest_filename(), SORTED_LONGNAME_MAXLEN);
#endif
#if ENABLED(SDSORT_CACHE_NAMES)
strcpy(sortshort[i], filename);
#endif
#endif
// char out[30];
// sprintf_P(out, PSTR("---- %i %s %s"), i, filenameIsDir ? "D" : " ", sortnames[i]);
// SERIAL_ECHOLN(out);
#if HAS_FOLDER_SORTING
const uint16_t bit = i & 0x07, ind = i >> 3;
if (bit == 0) isDir[ind] = 0x00;
if (filenameIsDir) isDir[ind] |= _BV(bit);
#endif
#endif
}
// Bubble Sort
for (uint16_t i = fileCnt; --i;) {
bool didSwap = false;
for (uint16_t j = 0; j < i; ++j) {
const uint16_t o1 = sort_order[j], o2 = sort_order[j + 1];
// Compare names from the array or just the two buffered names
#if ENABLED(SDSORT_USES_RAM)
#define _SORT_CMP_NODIR() (strcasecmp(sortnames[o1], sortnames[o2]) > 0)
#else
#define _SORT_CMP_NODIR() (strcasecmp(name1, name2) > 0)
#endif
#if HAS_FOLDER_SORTING
#if ENABLED(SDSORT_USES_RAM)
// Folder sorting needs an index and bit to test for folder-ness.
const uint8_t ind1 = o1 >> 3, bit1 = o1 & 0x07,
ind2 = o2 >> 3, bit2 = o2 & 0x07;
#define _SORT_CMP_DIR(fs) \
(((isDir[ind1] & _BV(bit1)) != 0) == ((isDir[ind2] & _BV(bit2)) != 0) \
? _SORT_CMP_NODIR() \
: (isDir[fs > 0 ? ind1 : ind2] & (fs > 0 ? _BV(bit1) : _BV(bit2))) != 0)
#else
#define _SORT_CMP_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_NODIR() : (fs > 0 ? dir1 : !dir1))
#endif
#endif
// The most economical method reads names as-needed
// throughout the loop. Slow if there are many.
#if DISABLED(SDSORT_USES_RAM)
getfilename(o1);
strcpy(name1, longest_filename()); // save (or getfilename below will trounce it)
#if HAS_FOLDER_SORTING
bool dir1 = filenameIsDir;
#endif
getfilename(o2);
char *name2 = longest_filename(); // use the string in-place
#endif // !SDSORT_USES_RAM
// Sort the current pair according to settings.
if (
#if HAS_FOLDER_SORTING
#if ENABLED(SDSORT_GCODE)
sort_folders ? _SORT_CMP_DIR(sort_folders) : _SORT_CMP_NODIR()
#else
_SORT_CMP_DIR(FOLDER_SORTING)
#endif
#else
_SORT_CMP_NODIR()
#endif
) {
sort_order[j] = o2;
sort_order[j + 1] = o1;
didSwap = true;
}
}
if (!didSwap) break;
}
// Using RAM but not keeping names around
#if ENABLED(SDSORT_USES_RAM) && DISABLED(SDSORT_CACHE_NAMES)
#if ENABLED(SDSORT_DYNAMIC_RAM)
for (uint16_t i = 0; i < fileCnt; ++i) free(sortnames[i]);
#if HAS_FOLDER_SORTING
free(isDir);
#endif
#endif
#endif
}
else {
sort_order[0] = 0;
#if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES)
getfilename(0);
#if ENABLED(SDSORT_DYNAMIC_RAM)
sortnames = new char*[1];
sortnames[0] = strdup(longest_filename()); // malloc
#if ENABLED(SDSORT_CACHE_NAMES)
sortshort = new char*[1];
sortshort[0] = strdup(filename); // malloc
#endif
isDir = new uint8_t[1];
#else
#if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
strncpy(sortnames[0], longest_filename(), SORTED_LONGNAME_MAXLEN);
sortnames[0][SORTED_LONGNAME_MAXLEN - 1] = '\0';
#else
strncpy(sortnames[0], longest_filename(), SORTED_LONGNAME_MAXLEN);
#endif
#if ENABLED(SDSORT_CACHE_NAMES)
strcpy(sortshort[0], filename);
#endif
#endif
isDir[0] = filenameIsDir ? 0x01 : 0x00;
#endif
}
sort_count = fileCnt;
}
}
void CardReader::flush_presort() {
if (sort_count > 0) {
#if ENABLED(SDSORT_DYNAMIC_RAM)
delete sort_order;
#if ENABLED(SDSORT_CACHE_NAMES)
for (uint8_t i = 0; i < sort_count; ++i) {
free(sortshort[i]); // strdup
free(sortnames[i]); // strdup
}
delete sortshort;
delete sortnames;
#endif
#endif
sort_count = 0;
}
}
#endif // SDCARD_SORT_ALPHA
uint16_t CardReader::get_num_Files() {
return
#if ENABLED(SDCARD_SORT_ALPHA) && SDSORT_USES_RAM && SDSORT_CACHE_NAMES
nrFiles // no need to access the SD card for filenames
#else
getnrfilenames()
#endif
;
}
void CardReader::printingHasFinished() {
planner.synchronize();
file.close();
if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure.
file_subcall_ctr--;
openFile(proc_filenames[file_subcall_ctr], true, true);
setIndex(filespos[file_subcall_ctr]);
startFileprint();
}
else {
sdprinting = false;
#if ENABLED(POWER_LOSS_RECOVERY)
removeJobRecoveryFile();
#endif
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
planner.finish_and_disable();
#endif
print_job_timer.stop();
if (print_job_timer.duration() > 60)
enqueue_and_echo_commands_P(PSTR("M31"));
#if ENABLED(SDCARD_SORT_ALPHA)
presort();
#endif
#if ENABLED(ULTRA_LCD) && ENABLED(LCD_SET_PROGRESS_MANUALLY)
progress_bar_percent = 0;
#endif
#if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
lcd_reselect_last_file();
#endif
}
}
#if ENABLED(AUTO_REPORT_SD_STATUS)
uint8_t CardReader::auto_report_sd_interval = 0;
millis_t CardReader::next_sd_report_ms;
void CardReader::auto_report_sd_status() {
millis_t current_ms = millis();
if (auto_report_sd_interval && ELAPSED(current_ms, next_sd_report_ms)) {
next_sd_report_ms = current_ms + 1000UL * auto_report_sd_interval;
getStatus();
}
}
#endif // AUTO_REPORT_SD_STATUS
#if ENABLED(POWER_LOSS_RECOVERY)
char job_recovery_file_name[4] = "bin";
void CardReader::openJobRecoveryFile(const bool read) {
if (!cardOK) return;
if (jobRecoveryFile.isOpen()) return;
if (!jobRecoveryFile.open(&root, job_recovery_file_name, read ? O_READ : O_CREAT | O_WRITE | O_TRUNC | O_SYNC)) {
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, job_recovery_file_name);
SERIAL_PROTOCOLCHAR('.');
SERIAL_EOL();
}
else if (!read)
SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, job_recovery_file_name);
}
void CardReader::closeJobRecoveryFile() { jobRecoveryFile.close(); }
bool CardReader::jobRecoverFileExists() {
const bool exists = jobRecoveryFile.open(&root, job_recovery_file_name, O_READ);
if (exists) jobRecoveryFile.close();
return exists;
}
int16_t CardReader::saveJobRecoveryInfo() {
jobRecoveryFile.seekSet(0);
const int16_t ret = jobRecoveryFile.write(&job_recovery_info, sizeof(job_recovery_info));
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
if (ret == -1) SERIAL_PROTOCOLLNPGM("Power-loss file write failed.");
#endif
return ret;
}
int16_t CardReader::loadJobRecoveryInfo() {
return jobRecoveryFile.read(&job_recovery_info, sizeof(job_recovery_info));
}
void CardReader::removeJobRecoveryFile() {
job_recovery_info.valid_head = job_recovery_info.valid_foot = job_recovery_commands_count = 0;
if (jobRecoverFileExists()) {
closefile();
removeFile(job_recovery_file_name);
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
SERIAL_PROTOCOLPGM("Power-loss file delete");
serialprintPGM(jobRecoverFileExists() ? PSTR(" failed.\n") : PSTR("d.\n"));
#endif
}
}
#endif // POWER_LOSS_RECOVERY
#endif // SDSUPPORT

230
Marlin/cardreader.h Normal file
View File

@@ -0,0 +1,230 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _CARDREADER_H_
#define _CARDREADER_H_
#include "MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#define SD_RESORT ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_DYNAMIC_RAM)
#define MAX_DIR_DEPTH 10 // Maximum folder depth
#include "SdFile.h"
class CardReader {
public:
CardReader();
void initsd();
void write_command(char *buf);
void beginautostart();
void checkautostart();
void openFile(char * const path, const bool read, const bool subcall=false);
void openLogFile(char * const path);
void removeFile(const char * const name);
void closefile(const bool store_location=false);
void release();
void openAndPrintFile(const char *name);
void startFileprint();
void stopSDPrint(
#if SD_RESORT
const bool re_sort=false
#endif
);
void getStatus();
void printingHasFinished();
void printFilename();
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
void printLongPath(char *path);
#endif
void getfilename(uint16_t nr, const char* const match=NULL);
uint16_t getnrfilenames();
void getAbsFilename(char *t);
void ls();
void chdir(const char *relpath);
int8_t updir();
void setroot();
const char* diveToFile(SdFile*& curDir, const char * const path, const bool echo);
uint16_t get_num_Files();
#if ENABLED(SDCARD_SORT_ALPHA)
void presort();
void getfilename_sorted(const uint16_t nr);
#if ENABLED(SDSORT_GCODE)
FORCE_INLINE void setSortOn(bool b) { sort_alpha = b; presort(); }
FORCE_INLINE void setSortFolders(int i) { sort_folders = i; presort(); }
//FORCE_INLINE void setSortReverse(bool b) { sort_reverse = b; }
#endif
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
void openJobRecoveryFile(const bool read);
void closeJobRecoveryFile();
bool jobRecoverFileExists();
int16_t saveJobRecoveryInfo();
int16_t loadJobRecoveryInfo();
void removeJobRecoveryFile();
#endif
FORCE_INLINE void pauseSDPrint() { sdprinting = false; }
FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
FORCE_INLINE bool eof() { return sdpos >= filesize; }
FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
FORCE_INLINE void setIndex(const uint32_t index) { sdpos = index; file.seekSet(index); }
FORCE_INLINE uint32_t getIndex() { return sdpos; }
FORCE_INLINE uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; }
FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; }
#if ENABLED(AUTO_REPORT_SD_STATUS)
void auto_report_sd_status(void);
FORCE_INLINE void set_auto_report_interval(uint8_t v) {
NOMORE(v, 60);
auto_report_sd_interval = v;
next_sd_report_ms = millis() + 1000UL * v;
}
#endif
FORCE_INLINE char* longest_filename() { return longFilename[0] ? longFilename : filename; }
public:
bool saving, logging, sdprinting, cardOK, filenameIsDir, abort_sd_printing;
char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
int8_t autostart_index;
private:
SdFile root, workDir, workDirParents[MAX_DIR_DEPTH];
uint8_t workDirDepth;
// Sort files and folders alphabetically.
#if ENABLED(SDCARD_SORT_ALPHA)
uint16_t sort_count; // Count of sorted items in the current directory
#if ENABLED(SDSORT_GCODE)
bool sort_alpha; // Flag to enable / disable the feature
int sort_folders; // Flag to enable / disable folder sorting
//bool sort_reverse; // Flag to enable / disable reverse sorting
#endif
// By default the sort index is static
#if ENABLED(SDSORT_DYNAMIC_RAM)
uint8_t *sort_order;
#else
uint8_t sort_order[SDSORT_LIMIT];
#endif
#if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
#define SORTED_LONGNAME_MAXLEN ((SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) + 1)
#else
#define SORTED_LONGNAME_MAXLEN LONG_FILENAME_LENGTH
#endif
// Cache filenames to speed up SD menus.
#if ENABLED(SDSORT_USES_RAM)
// If using dynamic ram for names, allocate on the heap.
#if ENABLED(SDSORT_CACHE_NAMES)
#if ENABLED(SDSORT_DYNAMIC_RAM)
char **sortshort, **sortnames;
#else
char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
#endif
#elif DISABLED(SDSORT_USES_STACK)
char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
#endif
// Folder sorting uses an isDir array when caching items.
#if HAS_FOLDER_SORTING
#if ENABLED(SDSORT_DYNAMIC_RAM)
uint8_t *isDir;
#elif ENABLED(SDSORT_CACHE_NAMES) || DISABLED(SDSORT_USES_STACK)
uint8_t isDir[(SDSORT_LIMIT+7)>>3];
#endif
#endif
#endif // SDSORT_USES_RAM
#endif // SDCARD_SORT_ALPHA
Sd2Card sd2card;
SdVolume volume;
SdFile file;
#if ENABLED(POWER_LOSS_RECOVERY)
SdFile jobRecoveryFile;
#endif
#define SD_PROCEDURE_DEPTH 1
#define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
uint8_t file_subcall_ctr;
uint32_t filespos[SD_PROCEDURE_DEPTH];
char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
uint32_t filesize, sdpos;
LsAction lsAction; //stored for recursion.
uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
char* diveDirName;
void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
#if ENABLED(SDCARD_SORT_ALPHA)
void flush_presort();
#endif
#if ENABLED(AUTO_REPORT_SD_STATUS)
static uint8_t auto_report_sd_interval;
static millis_t next_sd_report_ms;
#endif
};
#if PIN_EXISTS(SD_DETECT)
#if ENABLED(SD_DETECT_INVERTED)
#define IS_SD_INSERTED() READ(SD_DETECT_PIN)
#else
#define IS_SD_INSERTED() !READ(SD_DETECT_PIN)
#endif
#else
// No card detect line? Assume the card is inserted.
#define IS_SD_INSERTED() true
#endif
extern CardReader card;
#endif // SDSUPPORT
#if ENABLED(SDSUPPORT)
#define IS_SD_PRINTING() card.sdprinting
#define IS_SD_FILE_OPEN() card.isFileOpen()
#else
#define IS_SD_PRINTING() false
#define IS_SD_FILE_OPEN() false
#endif
#endif // _CARDREADER_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,9 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include <stdint.h>
#ifndef __CIRCULARQUEUE_H__
#define __CIRCULARQUEUE_H__
#include <Arduino.h>
/**
* @brief Circular Queue class
@@ -52,8 +54,8 @@ class CircularQueue {
* items that can be stored on the queue.
*/
CircularQueue<T, N>() {
buffer.size = N;
buffer.count = buffer.head = buffer.tail = 0;
this->buffer.size = N;
this->buffer.count = this->buffer.head = this->buffer.tail = 0;
}
/**
@@ -63,15 +65,15 @@ class CircularQueue {
* @return type T item
*/
T dequeue() {
if (isEmpty()) return T();
if (this->isEmpty()) return T();
uint8_t index = buffer.head;
uint8_t index = this->buffer.head;
--buffer.count;
if (++buffer.head == buffer.size)
buffer.head = 0;
--this->buffer.count;
if (++this->buffer.head == this->buffer.size)
this->buffer.head = 0;
return buffer.queue[index];
return this->buffer.queue[index];
}
/**
@@ -82,13 +84,13 @@ class CircularQueue {
* @return true if the operation was successful
*/
bool enqueue(T const &item) {
if (isFull()) return false;
if (this->isFull()) return false;
buffer.queue[buffer.tail] = item;
this->buffer.queue[this->buffer.tail] = item;
++buffer.count;
if (++buffer.tail == buffer.size)
buffer.tail = 0;
++this->buffer.count;
if (++this->buffer.tail == this->buffer.size)
this->buffer.tail = 0;
return true;
}
@@ -98,21 +100,27 @@ class CircularQueue {
* @details Returns true if there are no items on the queue, false otherwise.
* @return true if queue is empty
*/
bool isEmpty() { return buffer.count == 0; }
bool isEmpty() {
return this->buffer.count == 0;
}
/**
* @brief Checks if the queue is full
* @details Returns true if the queue is full, false otherwise.
* @return true if queue is full
*/
bool isFull() { return buffer.count == buffer.size; }
bool isFull() {
return this->buffer.count == this->buffer.size;
}
/**
* @brief Gets the queue size
* @details Returns the maximum number of items a queue can have.
* @return the queue size
*/
uint8_t size() { return buffer.size; }
uint8_t size() {
return this->buffer.size;
}
/**
* @brief Gets the next item from the queue without removing it
@@ -120,12 +128,18 @@ class CircularQueue {
* or updating the pointers.
* @return first item in the queue
*/
T peek() { return buffer.queue[buffer.head]; }
T peek() {
return this->buffer.queue[this->buffer.head];
}
/**
* @brief Gets the number of items on the queue
* @details Returns the current number of items stored on the queue.
* @return number of items in the queue
*/
uint8_t count() { return buffer.count; }
uint8_t count() {
return this->buffer.count;
}
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,20 +19,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../inc/MarlinConfig.h"
#ifndef CONFIGURATION_STORE_H
#define CONFIGURATION_STORE_H
#if ENABLED(EEPROM_SETTINGS)
#include "../HAL/shared/persistent_store_api.h"
#endif
#include "MarlinConfig.h"
class MarlinSettings {
public:
MarlinSettings() { }
static uint16_t datasize();
static void reset();
static bool save(); // Return 'true' if data was saved
static bool save(); // Return 'true' if data was saved
FORCE_INLINE static bool init_eeprom() {
reset();
@@ -47,20 +47,9 @@ class MarlinSettings {
#endif
}
#if ENABLED(SD_FIRMWARE_UPDATE)
static bool sd_update_status(); // True if the SD-Firmware-Update EEPROM flag is set
static bool set_sd_update_status(const bool enable); // Return 'true' after EEPROM is set (-> always true)
#endif
#if ENABLED(EEPROM_SETTINGS)
static bool load(); // Return 'true' if data was loaded ok
static bool validate(); // Return 'true' if EEPROM data is ok
static inline void first_load() {
static bool loaded = false;
if (!loaded && load()) loaded = true;
}
static bool load(); // Return 'true' if data was loaded ok
static bool validate(); // Return 'true' if EEPROM data is ok
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled
@@ -69,7 +58,7 @@ class MarlinSettings {
static uint16_t calc_num_meshes();
static int mesh_slot_offset(const int8_t slot);
static void store_mesh(const int8_t slot);
static void load_mesh(const int8_t slot, void * const into=nullptr);
static void load_mesh(const int8_t slot, void * const into=NULL);
//static void delete_mesh(); // necessary if we have a MAT
//static void defrag_meshes(); // "
@@ -77,15 +66,13 @@ class MarlinSettings {
#else
FORCE_INLINE
static bool load() { reset(); report(); return true; }
FORCE_INLINE
static void first_load() { (void)load(); }
#endif
#if DISABLED(DISABLE_M503)
static void report(const bool forReplay=false);
#else
FORCE_INLINE
static void report(const bool=false) {}
static void report(const bool forReplay=false) { UNUSED(forReplay); }
#endif
private:
@@ -95,15 +82,20 @@ class MarlinSettings {
static bool eeprom_error, validating;
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled
static const uint16_t meshes_end; // 128 is a placeholder for the size of the MAT; the MAT will always
// live at the very end of the eeprom
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled
static constexpr uint16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
// live at the very end of the eeprom
#endif
static bool _load();
static void write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc);
static void read_data(int &pos, uint8_t *value, uint16_t size, uint16_t *crc, const bool force=false);
static bool size_error(const uint16_t size);
#endif
};
extern MarlinSettings settings;
#endif // CONFIGURATION_STORE_H

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,20 +30,21 @@
* http://arduino.cc/forum/index.php/topic,51842.0.html
*/
#include "../../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if ENABLED(DAC_STEPPER_CURRENT)
#include "dac_mcp4728.h"
#include "enum.h"
xyze_uint_t mcp4728_values;
uint16_t mcp4728_values[XYZE];
/**
* Begin I2C, get current values (input register and eeprom) of mcp4728
*/
void mcp4728_init() {
Wire.begin();
Wire.requestFrom(I2C_ADDRESS(DAC_DEV_ADDRESS), 24);
Wire.requestFrom(int(DAC_DEV_ADDRESS), 24);
while (Wire.available()) {
char deviceID = Wire.read(),
hiByte = Wire.read(),
@@ -58,7 +59,7 @@ void mcp4728_init() {
* Write input resister value to specified channel using fastwrite method.
* Channel : 0-3, Values : 0-4095
*/
uint8_t mcp4728_analogWrite(const uint8_t channel, const uint16_t value) {
uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value) {
mcp4728_values[channel] = value;
return mcp4728_fastWrite();
}
@@ -69,7 +70,7 @@ uint8_t mcp4728_analogWrite(const uint8_t channel, const uint16_t value) {
* This will also write current Vref, PowerDown, Gain settings to EEPROM
*/
uint8_t mcp4728_eepromWrite() {
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
Wire.beginTransmission(DAC_DEV_ADDRESS);
Wire.write(SEQWRITE);
LOOP_XYZE(i) {
Wire.write(DAC_STEPPER_VREF << 7 | DAC_STEPPER_GAIN << 4 | highByte(mcp4728_values[i]));
@@ -81,16 +82,16 @@ uint8_t mcp4728_eepromWrite() {
/**
* Write Voltage reference setting to all input regiters
*/
uint8_t mcp4728_setVref_all(const uint8_t value) {
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
uint8_t mcp4728_setVref_all(uint8_t value) {
Wire.beginTransmission(DAC_DEV_ADDRESS);
Wire.write(VREFWRITE | (value ? 0x0F : 0x00));
return Wire.endTransmission();
}
/**
* Write Gain setting to all input regiters
*/
uint8_t mcp4728_setGain_all(const uint8_t value) {
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
uint8_t mcp4728_setGain_all(uint8_t value) {
Wire.beginTransmission(DAC_DEV_ADDRESS);
Wire.write(GAINWRITE | (value ? 0x0F : 0x00));
return Wire.endTransmission();
}
@@ -98,31 +99,31 @@ uint8_t mcp4728_setGain_all(const uint8_t value) {
/**
* Return Input Register value
*/
uint16_t mcp4728_getValue(const uint8_t channel) { return mcp4728_values[channel]; }
uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; }
#if 0
/**
* Steph: Might be useful in the future
* Return Vout
*/
uint16_t mcp4728_getVout(const uint8_t channel) {
const uint32_t vref = 2048,
vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096;
return _MIN(vOut, defaultVDD);
*
uint16_t mcp4728_getVout(uint8_t channel) {
uint32_t vref = 2048,
vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096;
if (vOut > defaultVDD) vOut = defaultVDD;
return vOut;
}
#endif
*/
/**
* Returns DAC values as a 0-100 percentage of drive strength
*/
uint8_t mcp4728_getDrvPct(const uint8_t channel) { return uint8_t(100.0 * mcp4728_values[channel] / (DAC_STEPPER_MAX) + 0.5); }
uint8_t mcp4728_getDrvPct(uint8_t channel) { return uint8_t(100.0 * mcp4728_values[channel] / (DAC_STEPPER_MAX) + 0.5); }
/**
* Receives all Drive strengths as 0-100 percent values, updates
* DAC Values array and calls fastwrite to update the DAC.
*/
void mcp4728_setDrvPct(xyze_uint8_t &pct) {
mcp4728_values *= 0.01 * pct * (DAC_STEPPER_MAX);
void mcp4728_setDrvPct(uint8_t pct[XYZE]) {
LOOP_XYZE(i) mcp4728_values[i] = 0.01 * pct[i] * (DAC_STEPPER_MAX);
mcp4728_fastWrite();
}
@@ -132,7 +133,7 @@ void mcp4728_setDrvPct(xyze_uint8_t &pct) {
* No EEPROM update
*/
uint8_t mcp4728_fastWrite() {
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
Wire.beginTransmission(DAC_DEV_ADDRESS);
LOOP_XYZE(i) {
Wire.write(highByte(mcp4728_values[i]));
Wire.write(lowByte(mcp4728_values[i]));
@@ -143,8 +144,8 @@ uint8_t mcp4728_fastWrite() {
/**
* Common function for simple general commands
*/
uint8_t mcp4728_simpleCommand(const byte simpleCommand) {
Wire.beginTransmission(I2C_ADDRESS(GENERALCALL));
uint8_t mcp4728_simpleCommand(byte simpleCommand) {
Wire.beginTransmission(GENERALCALL);
Wire.write(simpleCommand);
return Wire.endTransmission();
}

66
Marlin/dac_mcp4728.h Normal file
View File

@@ -0,0 +1,66 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Arduino library for MicroChip MCP4728 I2C D/A converter.
*/
#ifndef DAC_MCP4728_H
#define DAC_MCP4728_H
#include "MarlinConfig.h"
#if ENABLED(DAC_STEPPER_CURRENT)
#include "Wire.h"
#define defaultVDD DAC_STEPPER_MAX //was 5000 but differs with internal Vref
#define BASE_ADDR 0x60
#define RESET 0B00000110
#define WAKE 0B00001001
#define UPDATE 0B00001000
#define MULTIWRITE 0B01000000
#define SINGLEWRITE 0B01011000
#define SEQWRITE 0B01010000
#define VREFWRITE 0B10000000
#define GAINWRITE 0B11000000
#define POWERDOWNWRITE 0B10100000
#define GENERALCALL 0B00000000
#define GAINWRITE 0B11000000
// This is taken from the original lib, makes it easy to edit if needed
// DAC_OR_ADDRESS defined in pins_BOARD.h file
#define DAC_DEV_ADDRESS (BASE_ADDR | DAC_OR_ADDRESS)
void mcp4728_init();
uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value);
uint8_t mcp4728_eepromWrite();
uint8_t mcp4728_setVref_all(uint8_t value);
uint8_t mcp4728_setGain_all(uint8_t value);
uint16_t mcp4728_getValue(uint8_t channel);
uint8_t mcp4728_fastWrite();
uint8_t mcp4728_simpleCommand(byte simpleCommand);
uint8_t mcp4728_getDrvPct(uint8_t channel);
void mcp4728_setDrvPct(uint8_t pct[XYZE]);
#endif
#endif // DAC_MCP4728_H

77
Marlin/delay.h Normal file
View File

@@ -0,0 +1,77 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* AVR busy wait delay Cycles routines:
*
* DELAY_CYCLES(count): Delay execution in cycles
* DELAY_NS(count): Delay execution in nanoseconds
* DELAY_US(count): Delay execution in microseconds
*/
#ifndef MARLIN_DELAY_H
#define MARLIN_DELAY_H
#define nop() __asm__ __volatile__("nop;\n\t":::)
FORCE_INLINE static void __delay_4cycles(uint8_t cy) {
__asm__ __volatile__(
L("1")
A("dec %[cnt]")
A("nop")
A("brne 1b")
: [cnt] "+r"(cy) // output: +r means input+output
: // input:
: "cc" // clobbers:
);
}
/* ---------------- Delay in cycles */
FORCE_INLINE static void DELAY_CYCLES(uint16_t x) {
if (__builtin_constant_p(x)) {
#define MAXNOPS 4
if (x <= (MAXNOPS)) {
switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); }
}
else {
const uint32_t rem = (x) % (MAXNOPS);
switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); }
if ((x = (x) / (MAXNOPS)))
__delay_4cycles(x); // if need more then 4 nop loop is more optimal
}
#undef MAXNOPS
}
else
__delay_4cycles(x / 4);
}
#undef nop
/* ---------------- Delay in nanoseconds */
#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) / 1000L )
/* ---------------- Delay in microseconds */
#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) )
#endif // MARLIN_DELAY_H

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,16 +20,19 @@
*
*/
#include "../../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if BOTH(DIGIPOT_I2C, DIGIPOT_MCP4018)
#if ENABLED(DIGIPOT_I2C) && ENABLED(DIGIPOT_MCP4018)
#include "enum.h"
#include "Stream.h"
#include "utility/twi.h"
#include <SlowSoftI2CMaster.h> //https://github.com/stawel/SlowSoftI2CMaster
// Settings for the I2C based DIGIPOT (MCP4018) based on WT150
#define DIGIPOT_I2C_ADDRESS 0x2F
#define DIGIPOT_A4988_Rsx 0.250
#define DIGIPOT_A4988_Vrefmax 1.666
#define DIGIPOT_A4988_MAX_VALUE 127
@@ -78,15 +81,15 @@ static SlowSoftI2CMaster pots[DIGIPOT_I2C_NUM_CHANNELS] = {
static void i2c_send(const uint8_t channel, const byte v) {
if (WITHIN(channel, 0, DIGIPOT_I2C_NUM_CHANNELS - 1)) {
pots[channel].i2c_start(((DIGIPOT_I2C_ADDRESS_A) << 1) | I2C_WRITE);
pots[channel].i2c_start(((DIGIPOT_I2C_ADDRESS) << 1) | I2C_WRITE);
pots[channel].i2c_write(v);
pots[channel].i2c_stop();
}
}
// This is for the MCP4018 I2C based digipot
void digipot_i2c_set_current(const uint8_t channel, const float current) {
i2c_send(channel, current_to_wiper(_MIN(_MAX(current, 0), float(DIGIPOT_A4988_MAX_CURRENT))));
void digipot_i2c_set_current(uint8_t channel, float current) {
i2c_send(channel, current_to_wiper(MIN(MAX(current, 0), float(DIGIPOT_A4988_MAX_CURRENT))));
}
void digipot_i2c_init() {

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,24 +20,18 @@
*
*/
#include "../../inc/MarlinConfig.h"
#include "MarlinConfig.h"
#if ENABLED(DIGIPOT_I2C) && DISABLED(DIGIPOT_MCP4018)
#include "Stream.h"
#include <Wire.h>
#if MB(MKS_SBASE)
#include "digipot_mcp4451_I2C_routines.h"
#endif
#include "utility/twi.h"
#include "Wire.h"
// Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
#if MB(5DPRINT)
#define DIGIPOT_I2C_FACTOR 117.96
#define DIGIPOT_I2C_MAX_CURRENT 1.736
#elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI)
#define DIGIPOT_I2C_FACTOR 113.5
#define DIGIPOT_I2C_MAX_CURRENT 2.0
#else
#define DIGIPOT_I2C_FACTOR 106.7
#define DIGIPOT_I2C_MAX_CURRENT 2.5
@@ -47,42 +41,37 @@ static byte current_to_wiper(const float current) {
return byte(CEIL(float((DIGIPOT_I2C_FACTOR * current))));
}
static void digipot_i2c_send(const byte addr, const byte a, const byte b) {
#if MB(MKS_SBASE)
digipot_mcp4451_start(addr);
digipot_mcp4451_send_byte(a);
digipot_mcp4451_send_byte(b);
#else
Wire.beginTransmission(I2C_ADDRESS(addr));
Wire.write(a);
Wire.write(b);
Wire.endTransmission();
#endif
static void i2c_send(const byte addr, const byte a, const byte b) {
Wire.beginTransmission(addr);
Wire.write(a);
Wire.write(b);
Wire.endTransmission();
}
// This is for the MCP4451 I2C based digipot
void digipot_i2c_set_current(const uint8_t channel, const float current) {
void digipot_i2c_set_current(uint8_t channel, float current) {
current = MIN((float) MAX(current, 0), DIGIPOT_I2C_MAX_CURRENT);
// these addresses are specific to Azteeg X3 Pro, can be set to others,
// In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
const byte addr = channel < 4 ? DIGIPOT_I2C_ADDRESS_A : DIGIPOT_I2C_ADDRESS_B; // channel 0-3 vs 4-7
byte addr = 0x2C; // channel 0-3
if (channel >= 4) {
addr = 0x2E; // channel 4-7
channel -= 4;
}
// Initial setup
digipot_i2c_send(addr, 0x40, 0xFF);
digipot_i2c_send(addr, 0xA0, 0xFF);
i2c_send(addr, 0x40, 0xFF);
i2c_send(addr, 0xA0, 0xFF);
// Set actual wiper value
byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
digipot_i2c_send(addr, addresses[channel & 0x3], current_to_wiper(_MIN(float(_MAX(current, 0)), DIGIPOT_I2C_MAX_CURRENT)));
i2c_send(addr, addresses[channel], current_to_wiper(current));
}
void digipot_i2c_init() {
#if MB(MKS_SBASE)
configure_i2c(16); // Setting clock_option to 16 ensure the I2C bus is initialized at 400kHz
#else
Wire.begin();
#endif
// setup initial currents as defined in Configuration_adv.h
static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
Wire.begin();
// setup initial currents as defined in Configuration_adv.h
for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
}

1192
Marlin/dogm_bitmaps.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1

View File

@@ -0,0 +1,194 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: HD44780_C v1.2
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 8 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 8
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t HD44780_C_5x7[2522] U8G_SECTION(".progmem.HD44780_C_5x7") = {
0, 6, 9, 0, 254, 7, 1, 145, 3, 34, 32, 255, 255, 8, 255, 7,
255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
5, 7, 7, 6, 0, 0, 32, 112, 160, 160, 168, 112, 32, 3, 7, 7,
6, 1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4,
32, 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5,
128, 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7,
6, 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0,
112, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136,
136, 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7,
6, 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255,
112, 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200,
136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128,
3, 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7,
7, 6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1,
0, 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168,
168, 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5,
5, 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240,
136, 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8,
8, 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6,
0, 0, 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224,
64, 64, 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5,
5, 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0,
136, 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136,
5, 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6,
0, 0, 248, 16, 32, 64, 248, 5, 5, 5, 6, 0, 2, 184, 168, 168,
168, 184, 5, 5, 5, 6, 0, 2, 184, 136, 184, 160, 184, 5, 5, 5,
6, 0, 2, 184, 160, 184, 136, 184, 5, 6, 6, 6, 0, 1, 8, 40,
72, 248, 64, 32, 5, 5, 5, 6, 0, 0, 56, 112, 224, 136, 240, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5,
7, 7, 6, 0, 0, 248, 136, 128, 240, 136, 136, 240, 5, 7, 7, 6,
0, 0, 248, 136, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 80,
0, 248, 128, 240, 128, 248, 5, 7, 7, 6, 0, 0, 168, 168, 168, 112,
168, 168, 168, 5, 7, 7, 6, 0, 0, 240, 8, 8, 112, 8, 8, 240,
5, 7, 7, 6, 0, 0, 136, 136, 152, 168, 200, 136, 136, 5, 8, 8,
6, 0, 0, 80, 32, 136, 152, 168, 168, 200, 136, 5, 7, 7, 6, 0,
0, 120, 40, 40, 40, 40, 168, 72, 5, 7, 7, 6, 0, 0, 248, 136,
136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136, 136, 80, 32,
64, 128, 5, 7, 7, 6, 0, 0, 32, 112, 168, 168, 168, 112, 32, 5,
7, 7, 6, 0, 0, 136, 136, 136, 120, 8, 8, 8, 5, 7, 7, 6,
0, 0, 168, 168, 168, 168, 168, 168, 248, 5, 7, 7, 6, 0, 0, 192,
64, 64, 112, 72, 72, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 200,
168, 168, 200, 5, 7, 7, 6, 0, 0, 112, 136, 8, 56, 8, 136, 112,
5, 7, 7, 6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7,
6, 0, 0, 120, 136, 136, 120, 40, 72, 136, 5, 7, 7, 6, 0, 0,
24, 96, 128, 240, 136, 136, 112, 4, 5, 5, 6, 0, 0, 224, 144, 224,
144, 224, 5, 5, 5, 6, 0, 0, 248, 136, 128, 128, 128, 5, 7, 7,
6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 5, 5, 5, 6, 0, 0,
168, 168, 112, 168, 168, 5, 5, 5, 6, 0, 0, 240, 8, 48, 8, 240,
5, 5, 5, 6, 0, 0, 136, 152, 168, 200, 136, 5, 7, 7, 6, 0,
0, 80, 32, 136, 152, 168, 200, 136, 4, 5, 5, 6, 0, 0, 144, 160,
192, 160, 144, 5, 5, 5, 6, 0, 0, 248, 40, 40, 168, 72, 5, 5,
5, 6, 0, 0, 136, 216, 168, 136, 136, 5, 5, 5, 6, 0, 0, 136,
136, 248, 136, 136, 5, 5, 5, 6, 0, 0, 248, 136, 136, 136, 136, 5,
5, 5, 6, 0, 0, 248, 32, 32, 32, 32, 5, 5, 5, 6, 0, 0,
136, 136, 120, 8, 8, 5, 5, 5, 6, 0, 0, 168, 168, 168, 168, 248,
5, 5, 5, 6, 0, 0, 192, 64, 112, 72, 112, 5, 5, 5, 6, 0,
0, 136, 136, 200, 168, 200, 4, 5, 5, 6, 0, 0, 128, 128, 224, 144,
224, 5, 5, 5, 6, 0, 0, 112, 136, 56, 136, 112, 5, 5, 5, 6,
0, 0, 144, 168, 232, 168, 144, 5, 5, 5, 6, 0, 0, 120, 136, 120,
40, 72, 5, 5, 5, 6, 0, 1, 32, 72, 144, 72, 32, 5, 5, 5,
6, 0, 1, 32, 144, 72, 144, 32, 5, 3, 3, 6, 0, 0, 72, 144,
216, 5, 3, 3, 6, 0, 4, 216, 72, 144, 5, 7, 7, 6, 0, 0,
144, 208, 176, 144, 56, 40, 56, 5, 7, 7, 6, 0, 0, 32, 0, 32,
64, 128, 136, 112, 5, 7, 7, 6, 0, 0, 24, 32, 32, 112, 32, 32,
192, 5, 7, 7, 6, 0, 0, 32, 80, 64, 240, 64, 64, 120, 1, 2,
2, 6, 2, 0, 128, 128, 1, 4, 4, 6, 2, 0, 128, 128, 128, 128,
3, 5, 5, 6, 1, 0, 160, 160, 160, 0, 224, 3, 5, 5, 6, 1,
0, 160, 160, 160, 0, 160, 5, 7, 7, 6, 0, 0, 160, 0, 232, 16,
32, 64, 128, 5, 5, 5, 6, 0, 1, 216, 112, 32, 112, 216, 5, 7,
7, 6, 0, 0, 160, 64, 168, 16, 32, 64, 128, 3, 6, 6, 6, 1,
1, 224, 64, 64, 64, 64, 224, 5, 6, 6, 6, 0, 1, 248, 80, 80,
80, 80, 248, 5, 7, 7, 6, 0, 0, 32, 112, 168, 32, 32, 32, 32,
5, 7, 7, 6, 0, 0, 32, 32, 32, 32, 168, 112, 32, 5, 7, 7,
6, 0, 0, 128, 144, 176, 248, 176, 144, 128, 5, 7, 7, 6, 0, 0,
8, 72, 104, 248, 104, 72, 8, 5, 7, 7, 6, 0, 0, 128, 136, 168,
248, 168, 136, 128, 5, 7, 7, 6, 0, 0, 128, 224, 136, 16, 32, 64,
128, 2, 2, 2, 6, 2, 2, 192, 192, 5, 8, 8, 6, 0, 255, 120,
40, 40, 40, 72, 136, 248, 136, 5, 8, 8, 6, 0, 255, 136, 136, 136,
136, 136, 136, 248, 8, 5, 8, 8, 6, 0, 255, 168, 168, 168, 168, 168,
168, 248, 8, 5, 6, 6, 6, 0, 255, 120, 40, 72, 136, 248, 136, 5,
7, 7, 6, 0, 255, 32, 32, 112, 168, 168, 112, 32, 5, 6, 6, 6,
0, 255, 136, 136, 136, 136, 248, 8, 5, 6, 6, 6, 0, 255, 168, 168,
168, 168, 248, 8, 2, 2, 2, 6, 2, 6, 64, 128, 3, 1, 1, 6,
1, 7, 160, 5, 2, 2, 6, 0, 6, 72, 176, 5, 8, 8, 6, 0,
0, 16, 32, 0, 112, 136, 248, 128, 112, 5, 6, 6, 6, 0, 255, 112,
128, 136, 112, 32, 96, 3, 7, 7, 6, 1, 0, 160, 0, 160, 160, 160,
32, 192, 5, 6, 6, 6, 0, 1, 32, 112, 112, 112, 248, 32, 5, 5,
5, 6, 0, 1, 80, 0, 136, 0, 80, 5, 5, 5, 6, 0, 1, 112,
136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8,
8, 5, 7, 7, 6, 0, 0, 136, 144, 184, 72, 184, 8, 56, 5, 7,
7, 6, 0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0,
0, 192, 64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 136,
248, 136, 248, 136, 248, 136, 4, 5, 5, 6, 0, 2, 192, 0, 48, 0,
96, 5, 8, 8, 6, 0, 0, 64, 160, 224, 168, 8, 40, 120, 32, 5,
8, 8, 6, 0, 0, 64, 112, 64, 120, 64, 112, 64, 224, 5, 8, 8,
6, 0, 0, 32, 112, 32, 248, 32, 112, 32, 112, 5, 7, 7, 6, 0,
0, 104, 0, 232, 0, 104, 16, 56, 5, 8, 8, 6, 0, 0, 16, 112,
16, 240, 16, 112, 16, 56, 5, 7, 7, 6, 0, 1, 32, 112, 32, 248,
32, 112, 32, 5, 8, 8, 6, 0, 0, 16, 144, 80, 48, 80, 144, 16,
56, 5, 8, 8, 6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 5,
7, 7, 6, 0, 0, 120, 168, 168, 120, 40, 40, 40, 5, 8, 8, 6,
0, 0, 248, 248, 248, 248, 248, 248, 248, 248
};

View File

@@ -0,0 +1,192 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: HD44780_J
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 6 h=10 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-2
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t HD44780_J_5x7[2492] U8G_SECTION(".progmem.HD44780_J_5x7") = {
0, 6, 9, 0, 254, 7, 1, 145, 3, 34, 32, 255, 255, 8, 254, 7,
255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
5, 7, 7, 6, 0, 0, 136, 80, 248, 32, 248, 32, 32, 3, 7, 7,
6, 1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4,
32, 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5,
128, 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7,
6, 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0,
112, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136,
136, 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7,
6, 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255,
112, 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200,
136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128,
3, 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7,
7, 6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1,
0, 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168,
168, 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5,
5, 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240,
136, 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8,
8, 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6,
0, 0, 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224,
64, 64, 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5,
5, 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0,
136, 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136,
5, 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6,
0, 0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64,
128, 64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128,
128, 3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 5,
5, 6, 0, 1, 32, 16, 248, 16, 32, 5, 5, 5, 6, 0, 1, 32,
64, 248, 64, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 3, 3, 3, 6, 0, 0,
224, 160, 224, 3, 4, 4, 6, 2, 3, 224, 128, 128, 128, 3, 4, 4,
6, 0, 0, 32, 32, 32, 224, 3, 3, 3, 6, 0, 0, 128, 64, 32,
2, 2, 2, 6, 1, 2, 192, 192, 5, 6, 6, 6, 0, 0, 248, 8,
248, 8, 16, 32, 5, 5, 5, 6, 0, 0, 248, 8, 48, 32, 64, 4,
5, 5, 6, 0, 0, 16, 32, 96, 160, 32, 5, 5, 5, 6, 0, 0,
32, 248, 136, 8, 48, 5, 4, 4, 6, 0, 0, 248, 32, 32, 248, 5,
5, 5, 6, 0, 0, 16, 248, 48, 80, 144, 5, 5, 5, 6, 0, 0,
64, 248, 72, 80, 64, 5, 4, 4, 6, 0, 0, 112, 16, 16, 248, 4,
5, 5, 6, 0, 0, 240, 16, 240, 16, 240, 5, 4, 4, 6, 0, 0,
168, 168, 8, 48, 5, 1, 1, 6, 0, 3, 248, 5, 7, 7, 6, 0,
0, 248, 8, 40, 48, 32, 32, 64, 5, 7, 7, 6, 0, 0, 8, 16,
32, 96, 160, 32, 32, 5, 7, 7, 6, 0, 0, 32, 248, 136, 136, 8,
16, 32, 5, 6, 6, 6, 0, 0, 248, 32, 32, 32, 32, 248, 5, 7,
7, 6, 0, 0, 16, 248, 16, 48, 80, 144, 16, 5, 7, 7, 6, 0,
0, 64, 248, 72, 72, 72, 72, 144, 5, 7, 7, 6, 0, 0, 32, 248,
32, 248, 32, 32, 32, 5, 6, 6, 6, 0, 0, 120, 72, 136, 8, 16,
96, 5, 7, 7, 6, 0, 0, 64, 120, 144, 16, 16, 16, 32, 5, 6,
6, 6, 0, 0, 248, 8, 8, 8, 8, 248, 5, 7, 7, 6, 0, 0,
80, 248, 80, 80, 16, 32, 64, 5, 6, 6, 6, 0, 0, 192, 8, 200,
8, 16, 224, 5, 6, 6, 6, 0, 0, 248, 8, 16, 32, 80, 136, 5,
7, 7, 6, 0, 0, 64, 248, 72, 80, 64, 64, 56, 5, 6, 6, 6,
0, 0, 136, 136, 72, 8, 16, 96, 5, 6, 6, 6, 0, 0, 120, 72,
168, 24, 16, 96, 5, 7, 7, 6, 0, 0, 16, 224, 32, 248, 32, 32,
64, 5, 6, 6, 6, 0, 0, 168, 168, 168, 8, 16, 32, 5, 7, 7,
6, 0, 0, 112, 0, 248, 32, 32, 32, 64, 3, 7, 7, 6, 1, 0,
128, 128, 128, 192, 160, 128, 128, 5, 7, 7, 6, 0, 0, 32, 32, 248,
32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 112, 0, 0, 0, 0, 248,
5, 6, 6, 6, 0, 0, 248, 8, 80, 32, 80, 128, 5, 7, 7, 6,
0, 0, 32, 248, 16, 32, 112, 168, 32, 3, 7, 7, 6, 1, 0, 32,
32, 32, 32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 32, 16, 136, 136,
136, 136, 5, 7, 7, 6, 0, 0, 128, 128, 248, 128, 128, 128, 120, 5,
6, 6, 6, 0, 0, 248, 8, 8, 8, 16, 96, 5, 5, 5, 6, 0,
1, 64, 160, 16, 8, 8, 5, 7, 7, 6, 0, 0, 32, 248, 32, 32,
168, 168, 32, 5, 6, 6, 6, 0, 0, 248, 8, 8, 80, 32, 16, 4,
6, 6, 6, 1, 0, 224, 0, 224, 0, 224, 16, 5, 6, 6, 6, 0,
0, 32, 64, 128, 136, 248, 8, 5, 6, 6, 6, 0, 0, 8, 8, 80,
32, 80, 128, 5, 6, 6, 6, 0, 0, 248, 64, 248, 64, 64, 56, 5,
7, 7, 6, 0, 0, 64, 64, 248, 72, 80, 64, 64, 5, 7, 7, 6,
0, 0, 112, 16, 16, 16, 16, 16, 248, 5, 6, 6, 6, 0, 0, 248,
8, 248, 8, 8, 248, 5, 7, 7, 6, 0, 0, 112, 0, 248, 8, 8,
16, 32, 4, 7, 7, 6, 0, 0, 144, 144, 144, 144, 16, 32, 64, 5,
6, 6, 6, 0, 0, 32, 160, 160, 168, 168, 176, 5, 7, 7, 6, 0,
0, 128, 128, 128, 136, 144, 160, 192, 5, 6, 6, 6, 0, 0, 248, 136,
136, 136, 136, 248, 5, 6, 6, 6, 0, 0, 248, 136, 136, 8, 16, 32,
5, 6, 6, 6, 0, 0, 192, 0, 8, 8, 16, 224, 4, 3, 3, 6,
0, 4, 32, 144, 64, 3, 3, 3, 6, 0, 4, 224, 160, 224, 5, 5,
5, 6, 0, 1, 72, 168, 144, 144, 104, 5, 7, 7, 6, 0, 0, 80,
0, 112, 8, 120, 136, 120, 4, 8, 8, 6, 1, 255, 96, 144, 144, 224,
144, 144, 224, 128, 5, 5, 5, 6, 0, 0, 112, 128, 96, 136, 112, 5,
6, 6, 6, 0, 255, 136, 136, 152, 232, 136, 128, 5, 5, 5, 6, 0,
0, 120, 160, 144, 136, 112, 5, 7, 7, 6, 0, 254, 48, 72, 136, 136,
240, 128, 128, 5, 8, 8, 6, 0, 254, 120, 136, 136, 136, 120, 8, 8,
112, 5, 5, 5, 6, 0, 1, 56, 32, 32, 160, 64, 4, 3, 3, 6,
0, 3, 16, 208, 16, 4, 8, 8, 6, 0, 255, 16, 0, 48, 16, 16,
16, 144, 96, 3, 3, 3, 6, 0, 4, 160, 64, 160, 5, 7, 7, 6,
0, 0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7, 6, 0, 0, 64,
64, 224, 64, 224, 64, 120, 5, 7, 7, 6, 0, 0, 112, 0, 176, 200,
136, 136, 136, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136, 112,
5, 7, 7, 6, 0, 255, 176, 200, 136, 136, 240, 128, 128, 5, 7, 7,
6, 0, 255, 104, 152, 136, 136, 120, 8, 8, 5, 6, 6, 6, 0, 0,
112, 136, 248, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88, 168, 208, 5,
5, 5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6, 0, 0,
80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 248, 128, 64,
32, 64, 128, 248, 5, 5, 5, 6, 0, 0, 248, 80, 80, 80, 152, 5,
7, 7, 6, 0, 0, 248, 0, 136, 80, 32, 80, 136, 5, 7, 7, 6,
0, 255, 136, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 0, 8,
240, 32, 248, 32, 32, 5, 5, 5, 6, 0, 0, 248, 64, 120, 72, 136,
5, 5, 5, 6, 0, 0, 248, 168, 248, 136, 136, 5, 5, 5, 6, 0,
1, 32, 0, 248, 0, 32, 0, 0, 0, 6, 0, 0, 6, 10, 10, 6,
0, 254, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252
};

View File

@@ -0,0 +1,226 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: HD44780_W
Copyright: A.Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t HD44780_W_5x7[3034] U8G_SECTION(".progmem.HD44780_W_5x7") = {
0, 6, 9, 0, 254, 7, 2, 79, 3, 222, 16, 255, 255, 8, 255, 7,
255, 4, 7, 7, 6, 0, 0, 16, 48, 112, 240, 112, 48, 16, 4, 7,
7, 6, 1, 0, 128, 192, 224, 240, 224, 192, 128, 5, 3, 3, 6, 0,
4, 216, 72, 144, 5, 3, 3, 6, 0, 4, 216, 144, 72, 5, 7, 7,
6, 0, 0, 32, 112, 248, 0, 32, 112, 248, 5, 7, 7, 6, 0, 0,
248, 112, 32, 0, 248, 112, 32, 5, 5, 5, 6, 0, 1, 112, 248, 248,
248, 112, 5, 7, 7, 6, 0, 0, 8, 8, 40, 72, 248, 64, 32, 5,
7, 7, 6, 0, 0, 32, 112, 168, 32, 32, 32, 32, 5, 7, 7, 6,
0, 0, 32, 32, 32, 32, 168, 112, 32, 5, 5, 5, 6, 0, 1, 32,
64, 248, 64, 32, 5, 5, 5, 6, 0, 1, 32, 16, 248, 16, 32, 5,
7, 7, 6, 0, 0, 16, 32, 64, 32, 16, 0, 248, 5, 7, 7, 6,
0, 0, 64, 32, 16, 32, 64, 0, 248, 5, 5, 5, 6, 0, 1, 32,
32, 112, 112, 248, 5, 5, 5, 6, 0, 0, 248, 112, 112, 32, 32, 0,
0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128,
0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, 0, 0,
80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, 120, 160,
112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, 64, 152,
24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, 2, 3,
3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, 64, 128,
128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, 32, 64,
128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, 5, 6,
0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, 64, 128,
5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, 192, 5,
5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0,
112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, 192, 64,
64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, 128, 128,
248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, 5, 7,
7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, 6, 0,
0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, 48, 64,
128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, 32,
32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, 112, 5,
7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5, 5, 6,
2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, 192, 0,
192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, 32, 16,
5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, 0, 128,
64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, 8, 16,
32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168, 112, 5,
7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7, 7, 6,
0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, 0, 112,
136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144, 136, 136,
136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 248,
5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5, 7, 7,
6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6, 0, 0,
136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 128, 128,
128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, 16, 144,
96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136, 5, 7,
7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7, 6, 0,
0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136,
200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 136,
136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128, 128, 5,
7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7, 7, 6,
0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0, 0, 120,
128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32, 32, 32,
32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 136, 112,
5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5, 7, 7,
6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6, 0, 0,
136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136, 136,
80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, 64, 128,
248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224, 5, 5,
5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1, 0, 224,
32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80, 136, 5,
1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64, 5, 5,
5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 128,
128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128, 128, 136,
112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120, 5, 5,
5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0, 0, 48,
72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136, 136, 120,
8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136, 136, 1,
7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8, 8, 6,
1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6, 0, 0,
128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192, 64, 64,
64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168, 168, 5,
5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6, 0, 0,
112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136, 240, 128,
128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5, 5, 5,
6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0, 112, 128,
112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64, 72, 48,
5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5, 6, 0,
0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136, 168, 168,
80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6, 6, 6,
0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0, 248, 16,
32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64, 64, 32,
1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3, 7, 7,
6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 6, 6, 6, 0, 1,
8, 40, 72, 248, 64, 32, 5, 7, 7, 6, 0, 0, 32, 80, 136, 136,
136, 136, 248, 5, 7, 7, 6, 0, 0, 248, 136, 128, 240, 136, 136, 240,
5, 8, 8, 6, 0, 255, 120, 40, 40, 40, 72, 136, 248, 136, 5, 7,
7, 6, 0, 0, 168, 168, 168, 112, 168, 168, 168, 5, 7, 7, 6, 0,
0, 240, 8, 8, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 136, 136,
152, 168, 200, 136, 136, 5, 8, 8, 6, 0, 0, 80, 32, 136, 152, 168,
168, 200, 136, 5, 7, 7, 6, 0, 0, 120, 40, 40, 40, 40, 168, 72,
5, 7, 7, 6, 0, 0, 248, 136, 136, 136, 136, 136, 136, 5, 7, 7,
6, 0, 0, 136, 136, 136, 80, 32, 64, 128, 5, 8, 8, 6, 0, 255,
136, 136, 136, 136, 136, 136, 248, 8, 5, 7, 7, 6, 0, 0, 136, 136,
136, 120, 8, 8, 8, 5, 7, 7, 6, 0, 0, 168, 168, 168, 168, 168,
168, 248, 5, 8, 8, 6, 0, 255, 168, 168, 168, 168, 168, 168, 248, 8,
5, 7, 7, 6, 0, 0, 192, 64, 64, 112, 72, 72, 112, 5, 7, 7,
6, 0, 0, 136, 136, 136, 200, 168, 168, 200, 5, 7, 7, 6, 0, 0,
112, 136, 40, 80, 8, 136, 112, 5, 5, 5, 6, 0, 0, 64, 160, 144,
144, 104, 5, 7, 7, 6, 0, 0, 32, 48, 40, 40, 32, 224, 224, 5,
7, 7, 6, 0, 0, 248, 136, 128, 128, 128, 128, 128, 5, 5, 5, 6,
0, 0, 248, 80, 80, 80, 152, 5, 7, 7, 6, 0, 0, 248, 128, 64,
32, 64, 128, 248, 5, 5, 5, 6, 0, 0, 120, 144, 144, 144, 96, 5,
7, 7, 6, 0, 0, 48, 40, 56, 40, 200, 216, 24, 5, 6, 6, 6,
0, 0, 8, 112, 160, 32, 32, 16, 5, 6, 6, 6, 0, 1, 32, 112,
112, 112, 248, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136,
112, 5, 5, 5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6,
0, 0, 48, 72, 32, 80, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88,
168, 208, 5, 6, 6, 6, 0, 0, 80, 248, 248, 248, 112, 32, 5, 5,
5, 6, 0, 0, 112, 128, 96, 136, 112, 5, 7, 7, 6, 0, 0, 112,
136, 136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 216, 216, 216, 216,
216, 216, 216, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128,
5, 7, 7, 6, 0, 0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7,
6, 0, 0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0,
136, 112, 80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 248, 32, 248,
32, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5,
8, 8, 6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 5, 7, 7,
6, 0, 0, 24, 32, 32, 112, 32, 32, 192, 5, 7, 7, 6, 0, 0,
248, 136, 184, 184, 184, 136, 248, 5, 7, 7, 6, 0, 0, 112, 8, 120,
136, 120, 0, 248, 5, 5, 5, 6, 0, 1, 40, 80, 160, 80, 40, 5,
7, 7, 6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7, 6,
0, 0, 120, 136, 136, 120, 40, 72, 136, 5, 7, 7, 6, 0, 0, 248,
136, 168, 136, 152, 168, 248, 2, 3, 3, 6, 2, 4, 64, 128, 192, 4,
5, 5, 6, 0, 3, 96, 144, 144, 144, 96, 5, 7, 7, 6, 0, 0,
32, 32, 248, 32, 32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32,
64, 240, 3, 5, 5, 6, 0, 3, 224, 32, 224, 32, 224, 5, 8, 8,
6, 0, 0, 224, 144, 224, 128, 144, 184, 144, 24, 5, 8, 8, 6, 0,
255, 136, 136, 136, 136, 152, 232, 128, 128, 5, 7, 7, 6, 0, 0, 120,
152, 152, 120, 24, 24, 24, 2, 2, 2, 6, 2, 2, 192, 192, 5, 5,
5, 6, 0, 0, 80, 136, 168, 168, 80, 3, 5, 5, 6, 0, 3, 64,
192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 112, 0,
248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5, 7, 7, 6,
0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6, 0, 0, 136,
144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192, 64, 192, 72,
216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32, 64, 128, 136,
112, 5, 8, 8, 6, 0, 0, 64, 32, 32, 80, 136, 248, 136, 136, 5,
8, 8, 6, 0, 0, 16, 32, 32, 80, 136, 248, 136, 136, 5, 8, 8,
6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6, 0,
0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0, 80,
0, 32, 80, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0, 32, 80, 32,
112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96, 160, 184, 224,
160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136, 112, 32, 96,
5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128, 248, 5, 8,
8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5, 8, 8, 6,
0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7, 6, 0, 0,
80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0, 128, 64, 0,
224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64, 0, 224, 64,
64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224, 64, 64, 64,
224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64, 224, 5, 7,
7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8, 8, 6, 0,
0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6, 0, 0, 64,
32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 112,
136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, 136, 136, 136,
112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136, 136, 112, 5,
5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 7, 7, 6, 0, 0,
112, 32, 112, 168, 112, 32, 112, 5, 8, 8, 6, 0, 0, 64, 32, 136,
136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 136, 136,
136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 136, 136, 136, 136,
112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136, 136, 136, 112, 5,
8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32, 32, 5, 8, 8,
6, 0, 0, 192, 64, 112, 72, 72, 112, 64, 224, 5, 7, 7, 6, 0,
0, 48, 72, 72, 112, 72, 72, 176, 5, 8, 8, 6, 0, 0, 64, 32,
0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112,
8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 8, 120,
136, 120, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, 8, 120, 136, 120,
5, 7, 7, 6, 0, 0, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8,
6, 0, 0, 32, 80, 32, 112, 8, 120, 136, 120, 5, 6, 6, 6, 0,
0, 208, 40, 120, 160, 168, 80, 5, 6, 6, 6, 0, 255, 112, 128, 136,
112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248, 128,
112, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 128, 112, 5,
8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 128, 112, 5, 7, 7,
6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 3, 8, 8, 6, 1, 0,
128, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
0, 64, 192, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 64,
192, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 64, 192, 64, 64,
224, 5, 7, 7, 6, 0, 0, 160, 64, 160, 16, 120, 136, 112, 5, 8,
8, 6, 0, 0, 104, 144, 0, 176, 200, 136, 136, 136, 5, 8, 8, 6,
0, 0, 64, 32, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
16, 32, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136,
112, 5, 5, 5, 6, 0, 1, 32, 0, 248, 0, 32, 5, 7, 7, 6,
0, 0, 16, 32, 112, 168, 112, 32, 64, 5, 8, 8, 6, 0, 0, 64,
32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0, 0, 16, 32, 0,
136, 136, 136, 152, 104, 5, 8, 8, 6, 0, 0, 32, 80, 0, 136, 136,
136, 152, 104, 5, 7, 7, 6, 0, 0, 80, 0, 136, 136, 136, 152, 104,
5, 9, 9, 6, 0, 255, 16, 32, 0, 136, 136, 136, 248, 8, 112, 4,
7, 7, 6, 1, 0, 192, 64, 96, 80, 96, 64, 224, 5, 8, 8, 6,
0, 255, 80, 0, 136, 136, 136, 248, 8, 112
};

View File

@@ -0,0 +1,286 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: ISO10646-1
Copyright: A.Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
#if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7)
//
// Reduced font (only symbols 32 - 127) - About 1400 bytes smaller
//
const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
0,6,9,0,254,7,1,146,3,33,32,127,255,7,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
6,0,2,104,144,0,0,0,6,0,0};
#else
//
// Extended (original) font (symbols 32 - 255)
//
const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
0, 6, 9, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 8, 255, 7,
255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
0, 0, 112, 136, 136, 136, 136, 136, 112, 3, 7, 7, 6, 1, 0, 64,
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128,
224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
6, 0, 2, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
0, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 5, 7,
7, 6, 0, 0, 32, 112, 168, 160, 168, 112, 32, 5, 7, 7, 6, 0,
0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, 136, 112,
80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 32, 248, 32, 248, 32,
1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, 8, 8,
6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 3, 1, 1, 6, 1,
7, 160, 5, 7, 7, 6, 0, 0, 248, 136, 184, 184, 184, 136, 248, 5,
7, 7, 6, 0, 1, 112, 8, 120, 136, 120, 0, 248, 5, 5, 5, 6,
0, 1, 40, 80, 160, 80, 40, 5, 3, 3, 6, 0, 1, 248, 8, 8,
2, 2, 2, 6, 2, 6, 64, 128, 5, 7, 7, 6, 0, 0, 248, 136,
168, 136, 152, 168, 248, 5, 1, 1, 6, 0, 6, 248, 4, 4, 4, 6,
0, 3, 96, 144, 144, 96, 5, 7, 7, 6, 0, 0, 32, 32, 248, 32,
32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, 64, 240, 3, 5,
5, 6, 0, 3, 224, 32, 224, 32, 224, 2, 2, 2, 6, 2, 6, 64,
128, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 152, 232, 128, 128, 5,
7, 7, 6, 0, 0, 120, 152, 152, 120, 24, 24, 24, 2, 2, 2, 6,
2, 2, 192, 192, 2, 2, 2, 6, 2, 255, 64, 128, 3, 5, 5, 6,
0, 3, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 1, 112, 136, 136,
136, 112, 0, 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5,
7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6,
0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192,
64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32,
64, 128, 136, 112, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248,
136, 136, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 136, 136,
5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8,
8, 6, 0, 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6,
0, 0, 80, 0, 112, 136, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0,
32, 80, 32, 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96,
160, 184, 224, 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136,
112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128,
248, 5, 8, 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5,
8, 8, 6, 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7,
6, 0, 0, 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0,
128, 64, 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224,
64, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64,
224, 5, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8,
8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6,
0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136,
136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8,
6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0,
0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16,
32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0,
136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136,
136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32,
32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224,
4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8,
8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6,
0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0,
32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144,
0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8,
120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136,
120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6,
6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64,
32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0,
112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112,
3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8,
8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6,
1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0,
160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160,
16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136,
136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112,
5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8,
8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6,
0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0,
80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248,
0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5,
8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8,
6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0,
0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80,
0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136,
136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96,
64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112
};
#endif

View File

@@ -0,0 +1,184 @@
/*
Fontname: ISO10646-1-PL
Copyright: A.Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-2
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_1_PL_5x7[2732] U8G_FONT_SECTION(".progmem.ISO10646_1_PL_5x7") = {
0,6,9,0,254,7,1,146,3,33,32,255,255,8,254,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
6,0,2,104,144,0,0,0,6,0,0,5,9,9,6,0,
254,112,136,136,248,136,136,136,16,32,5,7,7,6,0,254,
112,8,120,136,120,16,32,5,8,8,6,0,0,16,32,112,
136,128,128,136,112,5,7,7,6,0,0,16,32,112,128,128,
136,112,5,9,9,6,0,254,248,128,128,240,128,128,248,8,
16,5,7,7,6,0,254,112,136,248,128,112,16,32,5,7,
7,6,0,0,128,144,160,192,128,128,248,5,7,7,6,0,
0,96,40,48,96,160,32,112,5,8,8,6,0,0,16,168,
136,200,168,152,136,136,5,8,8,6,0,0,8,16,0,176,
200,136,136,136,5,8,8,6,0,0,16,32,112,136,136,136,
136,112,5,8,8,6,0,0,16,32,0,112,136,136,136,112,
5,8,8,6,0,0,16,120,128,128,112,8,8,240,5,8,
8,6,0,0,16,32,0,112,128,112,8,240,5,8,8,6,
0,0,32,248,8,16,32,64,128,248,5,8,8,6,0,0,
16,32,0,248,16,32,64,248,5,7,7,6,0,0,248,8,
16,248,64,128,248,5,8,8,6,0,0,48,48,0,248,16,
32,64,248,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,1,7,7,
6,2,0,128,0,128,128,128,128,128,5,7,7,6,0,0,
32,112,168,160,168,112,32,5,7,7,6,0,0,48,64,64,
224,64,80,168,5,5,5,6,0,0,136,112,80,112,136,5,
7,7,6,0,0,136,80,32,248,32,248,32,1,7,7,6,
2,0,128,128,128,0,128,128,128,5,8,8,6,0,0,48,
72,32,80,80,32,144,96,3,1,1,6,1,7,160,5,7,
7,6,0,0,248,136,184,184,184,136,248,5,7,7,6,0,
1,112,8,120,136,120,0,248,5,5,5,6,0,1,40,80,
160,80,40,5,3,3,6,0,1,248,8,8,2,2,2,6,
2,6,64,128,5,7,7,6,0,0,248,136,168,136,152,168,
248,5,1,1,6,0,6,248,4,4,4,6,0,3,96,144,
144,96,5,7,7,6,0,0,32,32,248,32,32,0,248,4,
5,5,6,0,3,96,144,32,64,240,3,5,5,6,0,3,
224,32,224,32,224,2,2,2,6,2,6,64,128,5,8,8,
6,0,255,136,136,136,136,152,232,128,128,5,7,7,6,0,
0,120,152,152,120,24,24,24,2,2,2,6,2,2,192,192,
2,2,2,6,2,255,64,128,3,5,5,6,0,3,64,192,
64,64,224,5,7,7,6,0,1,112,136,136,136,112,0,248,
5,5,5,6,0,1,160,80,40,80,160,5,7,7,6,0,
0,136,144,168,88,184,8,8,5,7,7,6,0,0,136,144,
184,72,152,32,56,5,8,8,6,0,0,192,64,192,72,216,
56,8,8,5,7,7,6,0,0,32,0,32,64,128,136,112,
5,8,8,6,0,0,64,32,0,112,136,248,136,136,5,8,
8,6,0,0,16,32,0,112,136,248,136,136,5,8,8,6,
0,0,32,80,0,112,136,248,136,136,5,8,8,6,0,0,
104,144,0,112,136,248,136,136,5,8,8,6,0,0,80,0,
112,136,136,248,136,136,5,8,8,6,0,0,32,80,32,112,
136,248,136,136,5,7,7,6,0,0,56,96,160,184,224,160,
184,5,8,8,6,0,255,112,136,128,128,136,112,32,96,5,
8,8,6,0,0,64,32,0,248,128,240,128,248,5,8,8,
6,0,0,8,16,0,248,128,240,128,248,5,8,8,6,0,
0,32,80,0,248,128,240,128,248,5,7,7,6,0,0,80,
0,248,128,240,128,248,3,8,8,6,1,0,128,64,0,224,
64,64,64,224,3,8,8,6,1,0,32,64,0,224,64,64,
64,224,3,8,8,6,1,0,64,160,0,224,64,64,64,224,
3,7,7,6,1,0,160,0,224,64,64,64,224,5,7,7,
6,0,0,112,72,72,232,72,72,112,5,8,8,6,0,0,
104,144,0,136,200,168,152,136,5,8,8,6,0,0,64,32,
112,136,136,136,136,112,5,8,8,6,0,0,16,32,112,136,
136,136,136,112,5,8,8,6,0,0,32,80,0,112,136,136,
136,112,5,8,8,6,0,0,104,144,0,112,136,136,136,112,
5,8,8,6,0,0,80,0,112,136,136,136,136,112,5,5,
5,6,0,1,136,80,32,80,136,5,8,8,6,0,255,16,
112,168,168,168,168,112,64,5,8,8,6,0,0,64,32,136,
136,136,136,136,112,5,8,8,6,0,0,16,32,136,136,136,
136,136,112,5,8,8,6,0,0,32,80,0,136,136,136,136,
112,5,8,8,6,0,0,80,0,136,136,136,136,136,112,5,
8,8,6,0,0,16,32,136,80,32,32,32,32,5,9,9,
6,0,255,192,64,112,72,72,112,64,64,224,4,8,8,6,
1,255,96,144,144,160,144,144,224,128,5,8,8,6,0,0,
64,32,0,112,8,120,136,120,5,8,8,6,0,0,16,32,
0,112,8,120,136,120,5,8,8,6,0,0,32,80,0,112,
8,120,136,120,5,8,8,6,0,0,104,144,0,112,8,120,
136,120,5,7,7,6,0,0,80,0,112,8,120,136,120,5,
8,8,6,0,0,32,80,32,112,8,120,136,120,5,6,6,
6,0,0,208,40,120,160,168,80,5,6,6,6,0,255,112,
128,136,112,32,96,5,8,8,6,0,0,64,32,0,112,136,
248,128,112,5,8,8,6,0,0,16,32,0,112,136,248,128,
112,5,8,8,6,0,0,32,80,0,112,136,248,128,112,5,
7,7,6,0,0,80,0,112,136,248,128,112,3,8,8,6,
1,0,128,64,0,64,192,64,64,224,3,8,8,6,1,0,
32,64,0,64,192,64,64,224,3,8,8,6,1,0,64,160,
0,64,192,64,64,224,3,7,7,6,1,0,160,0,64,192,
64,64,224,5,7,7,6,0,0,160,64,160,16,120,136,112,
5,8,8,6,0,0,104,144,0,176,200,136,136,136,5,8,
8,6,0,0,64,32,0,112,136,136,136,112,5,8,8,6,
0,0,16,32,0,112,136,136,136,112,5,8,8,6,0,0,
32,80,0,112,136,136,136,112,5,8,8,6,0,0,104,144,
0,112,136,136,136,112,5,7,7,6,0,0,80,0,112,136,
136,136,112,5,5,5,6,0,1,32,0,248,0,32,5,7,
7,6,0,255,16,112,168,168,168,112,64,5,8,8,6,0,
0,64,32,0,136,136,136,152,104,5,8,8,6,0,0,16,
32,0,136,136,136,152,104,5,8,8,6,0,0,32,80,0,
136,136,136,152,104,5,7,7,6,0,0,80,0,136,136,136,
152,104,5,9,9,6,0,255,16,32,0,136,136,136,248,8,
112,4,7,7,6,1,255,192,64,96,80,96,64,224,5,8,
8,6,0,255,80,0,136,136,136,120,8,112};

View File

@@ -0,0 +1,197 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/*
Fontname: ISO10646-1-tr
Copyright: public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_TR[2591] U8G_SECTION(".progmem.ISO10646_TR") = {
0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
6,0,2,104,144,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,7,
7,6,0,0,32,112,168,160,168,112,32,5,7,7,6,0,
0,48,64,64,224,64,80,168,5,5,5,6,0,0,136,112,
80,112,136,5,7,7,6,0,0,136,80,32,248,32,248,32,
1,7,7,6,2,0,128,128,128,0,128,128,128,5,8,8,
6,0,0,48,72,32,80,80,32,144,96,3,1,1,6,1,
7,160,5,7,7,6,0,0,248,136,184,184,184,136,248,5,
7,7,6,0,1,112,8,120,136,120,0,248,5,5,5,6,
0,1,40,80,160,80,40,5,3,3,6,0,1,248,8,8,
2,2,2,6,2,6,64,128,5,7,7,6,0,0,248,136,
168,136,152,168,248,5,1,1,6,0,6,248,4,4,4,6,
0,3,96,144,144,96,5,7,7,6,0,0,32,32,248,32,
32,0,248,4,5,5,6,0,3,96,144,32,64,240,3,5,
5,6,0,3,224,32,224,32,224,2,2,2,6,2,6,64,
128,5,8,8,6,0,255,136,136,136,136,152,232,128,128,5,
7,7,6,0,0,120,152,152,120,24,24,24,2,2,2,6,
2,2,192,192,2,2,2,6,2,255,64,128,3,5,5,6,
0,3,64,192,64,64,224,5,7,7,6,0,1,112,136,136,
136,112,0,248,5,5,5,6,0,1,160,80,40,80,160,5,
7,7,6,0,0,136,144,168,88,184,8,8,5,7,7,6,
0,0,136,144,184,72,152,32,56,5,8,8,6,0,0,192,
64,192,72,216,56,8,8,5,7,7,6,0,0,32,0,32,
64,128,136,112,5,8,8,6,0,0,64,32,0,112,136,248,
136,136,5,8,8,6,0,0,16,32,0,112,136,248,136,136,
5,8,8,6,0,0,32,80,0,112,136,248,136,136,5,8,
8,6,0,0,104,144,0,112,136,248,136,136,5,8,8,6,
0,0,80,0,112,136,136,248,136,136,5,8,8,6,0,0,
32,80,32,112,136,248,136,136,5,7,7,6,0,0,56,96,
160,184,224,160,184,5,8,8,6,0,255,112,136,128,128,136,
112,32,96,5,8,8,6,0,0,64,32,0,248,128,240,128,
248,5,8,8,6,0,0,8,16,0,248,128,240,128,248,5,
8,8,6,0,0,32,80,0,248,128,240,128,248,5,7,7,
6,0,0,80,0,248,128,240,128,248,3,8,8,6,1,0,
128,64,0,224,64,64,64,224,3,8,8,6,1,0,32,64,
0,224,64,64,64,224,3,8,8,6,1,0,64,160,0,224,
64,64,64,224,3,7,7,6,1,0,160,0,224,64,64,64,
224,5,9,9,6,0,255,80,32,112,136,128,184,136,136,112,
5,8,8,6,0,0,104,144,0,136,200,168,152,136,5,8,
8,6,0,0,64,32,112,136,136,136,136,112,5,8,8,6,
0,0,16,32,112,136,136,136,136,112,5,8,8,6,0,0,
32,80,0,112,136,136,136,112,5,8,8,6,0,0,104,144,
0,112,136,136,136,112,5,8,8,6,0,0,80,0,112,136,
136,136,136,112,5,5,5,6,0,1,136,80,32,80,136,5,
8,8,6,0,255,16,112,168,168,168,168,112,64,5,8,8,
6,0,0,64,32,136,136,136,136,136,112,5,8,8,6,0,
0,16,32,136,136,136,136,136,112,5,8,8,6,0,0,32,
80,0,136,136,136,136,112,5,8,8,6,0,0,80,0,136,
136,136,136,136,112,1,7,7,6,2,0,128,0,128,128,128,
128,128,5,9,9,6,0,255,120,128,128,112,8,8,240,32,
96,4,8,8,6,1,255,96,144,144,160,144,144,224,128,5,
8,8,6,0,0,64,32,0,112,8,120,136,120,5,8,8,
6,0,0,16,32,0,112,8,120,136,120,5,8,8,6,0,
0,32,80,0,112,8,120,136,120,5,8,8,6,0,0,104,
144,0,112,8,120,136,120,5,7,7,6,0,0,80,0,112,
8,120,136,120,5,8,8,6,0,0,32,80,32,112,8,120,
136,120,5,6,6,6,0,0,208,40,120,160,168,80,5,7,
7,6,0,255,112,128,128,136,112,32,96,5,8,8,6,0,
0,64,32,0,112,136,248,128,112,5,8,8,6,0,0,16,
32,0,112,136,248,128,112,5,8,8,6,0,0,32,80,0,
112,136,248,128,112,5,7,7,6,0,0,80,0,112,136,248,
128,112,3,8,8,6,1,0,128,64,0,64,192,64,64,224,
3,8,8,6,1,0,32,64,0,64,192,64,64,224,3,8,
8,6,1,0,64,160,0,64,192,64,64,224,3,7,7,6,
1,0,160,0,64,192,64,64,224,5,8,8,6,0,255,80,
32,112,136,136,120,8,112,5,8,8,6,0,0,104,144,0,
176,200,136,136,136,5,8,8,6,0,0,64,32,0,112,136,
136,136,112,5,8,8,6,0,0,16,32,0,112,136,136,136,
112,5,8,8,6,0,0,32,80,0,112,136,136,136,112,5,
8,8,6,0,0,104,144,0,112,136,136,136,112,5,7,7,
6,0,0,80,0,112,136,136,136,112,5,5,5,6,0,1,
32,0,248,0,32,5,7,7,6,0,255,16,112,168,168,168,
112,64,5,8,8,6,0,0,64,32,0,136,136,136,152,104,
5,8,8,6,0,0,16,32,0,136,136,136,152,104,5,8,
8,6,0,0,32,80,0,136,136,136,152,104,5,7,7,6,
0,0,80,0,136,136,136,152,104,1,5,5,6,2,0,128,
128,128,128,128,5,7,7,6,0,255,112,128,112,8,240,32,
96,5,8,8,6,0,255,80,0,136,136,136,120,8,112};

View File

@@ -0,0 +1,196 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: ISO10646_5_Cyrillic
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_5_Cyrillic_5x7[2560] U8G_SECTION(".progmem.ISO10646_5_Cyrillic_5x7") = {
0, 6, 9, 0, 254, 7, 1, 145, 3, 32, 32, 255, 255, 8, 255, 7,
255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1,
0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80,
136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64,
5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0,
0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128,
128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120,
5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0,
0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136,
136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136,
136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8,
8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6,
0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192,
64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168,
168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6,
0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136,
240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5,
5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0,
112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64,
72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5,
6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136,
168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6,
6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0,
248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64,
64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3,
7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, 6,
0, 3, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 8, 8, 6, 0, 0,
64, 248, 128, 128, 240, 128, 128, 248, 5, 8, 8, 6, 0, 0, 80, 248,
128, 128, 240, 128, 128, 248, 5, 7, 7, 6, 0, 0, 224, 64, 64, 112,
72, 72, 112, 5, 8, 8, 6, 0, 0, 16, 32, 248, 136, 128, 128, 128,
128, 5, 7, 7, 6, 0, 0, 48, 72, 128, 224, 128, 72, 48, 5, 7,
7, 6, 0, 0, 112, 136, 128, 112, 8, 136, 112, 3, 7, 7, 6, 1,
0, 224, 64, 64, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 160, 0,
224, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
16, 144, 96, 5, 7, 7, 6, 0, 0, 160, 160, 160, 184, 168, 168, 184,
5, 7, 7, 6, 0, 0, 160, 160, 160, 248, 168, 168, 184, 4, 7, 7,
6, 0, 0, 224, 64, 112, 80, 80, 80, 80, 5, 8, 8, 6, 0, 0,
16, 32, 136, 144, 160, 224, 144, 136, 5, 8, 8, 6, 0, 0, 64, 32,
136, 152, 168, 200, 136, 136, 5, 9, 9, 6, 0, 255, 80, 32, 136, 136,
136, 80, 32, 32, 32, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 136,
136, 248, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136,
5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 136, 136, 240, 5, 7, 7,
6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, 0,
248, 136, 128, 128, 128, 128, 128, 5, 8, 8, 6, 0, 255, 120, 40, 40,
40, 72, 136, 248, 136, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
128, 248, 5, 7, 7, 6, 0, 0, 168, 168, 168, 112, 168, 168, 168, 5,
7, 7, 6, 0, 0, 240, 8, 8, 112, 8, 8, 240, 5, 7, 7, 6,
0, 0, 136, 136, 152, 168, 200, 136, 136, 5, 8, 8, 6, 0, 0, 80,
32, 136, 152, 168, 168, 200, 136, 5, 7, 7, 6, 0, 0, 136, 144, 160,
192, 160, 144, 136, 5, 7, 7, 6, 0, 0, 120, 40, 40, 40, 40, 168,
72, 5, 7, 7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7,
7, 6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 5, 7, 7, 6, 0,
0, 112, 136, 136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 136,
136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 128, 128, 128, 136, 112, 5,
7, 7, 6, 0, 0, 248, 32, 32, 32, 32, 32, 32, 5, 7, 7, 6,
0, 0, 136, 136, 136, 80, 32, 64, 128, 5, 7, 7, 6, 0, 0, 32,
112, 168, 168, 168, 112, 32, 5, 7, 7, 6, 0, 0, 136, 136, 80, 32,
80, 136, 136, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 136, 136, 248,
8, 5, 7, 7, 6, 0, 0, 136, 136, 136, 152, 104, 8, 8, 5, 7,
7, 6, 0, 0, 168, 168, 168, 168, 168, 168, 248, 5, 8, 8, 6, 0,
255, 168, 168, 168, 168, 168, 168, 248, 8, 5, 7, 7, 6, 0, 0, 192,
64, 64, 112, 72, 72, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 200,
168, 168, 200, 5, 7, 7, 6, 0, 0, 128, 128, 128, 240, 136, 136, 240,
5, 7, 7, 6, 0, 0, 112, 136, 8, 56, 8, 136, 112, 5, 7, 7,
6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7, 6, 0, 0,
120, 136, 136, 120, 40, 72, 136, 5, 5, 5, 6, 0, 0, 112, 8, 120,
136, 120, 5, 7, 7, 6, 0, 0, 24, 96, 128, 240, 136, 136, 112, 4,
5, 5, 6, 0, 0, 224, 144, 224, 144, 224, 5, 5, 5, 6, 0, 0,
248, 136, 128, 128, 128, 5, 6, 6, 6, 0, 255, 120, 40, 72, 136, 248,
136, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 5, 5, 6,
0, 0, 168, 168, 112, 168, 168, 5, 5, 5, 6, 0, 0, 240, 8, 48,
8, 240, 5, 5, 5, 6, 0, 0, 136, 152, 168, 200, 136, 5, 7, 7,
6, 0, 0, 80, 32, 136, 152, 168, 200, 136, 4, 5, 5, 6, 0, 0,
144, 160, 192, 160, 144, 5, 5, 5, 6, 0, 0, 248, 40, 40, 168, 72,
5, 5, 5, 6, 0, 0, 136, 216, 168, 136, 136, 5, 5, 5, 6, 0,
0, 136, 136, 248, 136, 136, 5, 5, 5, 6, 0, 0, 112, 136, 136, 136,
112, 5, 5, 5, 6, 0, 0, 248, 136, 136, 136, 136, 5, 6, 6, 6,
0, 255, 240, 136, 136, 240, 128, 128, 5, 5, 5, 6, 0, 0, 112, 128,
128, 136, 112, 5, 5, 5, 6, 0, 0, 248, 32, 32, 32, 32, 5, 6,
6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 0,
32, 112, 168, 168, 112, 32, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80,
136, 5, 6, 6, 6, 0, 255, 136, 136, 136, 136, 248, 8, 5, 5, 5,
6, 0, 0, 136, 136, 248, 8, 8, 5, 5, 5, 6, 0, 0, 168, 168,
168, 168, 248, 5, 6, 6, 6, 0, 255, 168, 168, 168, 168, 248, 8, 5,
5, 5, 6, 0, 0, 192, 64, 112, 72, 112, 5, 5, 5, 6, 0, 0,
136, 136, 200, 168, 200, 3, 5, 5, 6, 1, 0, 128, 128, 192, 160, 192,
5, 5, 5, 6, 0, 0, 112, 136, 56, 136, 112, 5, 5, 5, 6, 0,
0, 144, 168, 232, 168, 144, 5, 5, 5, 6, 0, 0, 120, 136, 120, 40,
72, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248, 128, 112, 5,
7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 5, 9, 9, 6,
0, 255, 64, 224, 64, 64, 120, 72, 72, 72, 16, 5, 8, 8, 6, 0,
0, 16, 32, 0, 248, 136, 128, 128, 128, 5, 5, 5, 6, 0, 0, 112,
136, 96, 136, 112, 5, 5, 5, 6, 0, 0, 112, 128, 112, 8, 240, 1,
7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 7, 7, 6,
1, 0, 160, 0, 64, 64, 64, 64, 64, 3, 8, 8, 6, 1, 255, 32,
0, 32, 32, 32, 32, 160, 64, 5, 5, 5, 6, 0, 0, 160, 160, 184,
168, 184, 5, 5, 5, 6, 0, 0, 160, 160, 248, 168, 184, 5, 6, 6,
6, 0, 0, 64, 224, 64, 120, 72, 72, 4, 8, 8, 6, 0, 0, 16,
32, 0, 144, 160, 192, 160, 144, 5, 8, 8, 6, 0, 0, 64, 32, 0,
136, 152, 168, 200, 136, 5, 9, 9, 6, 0, 255, 80, 32, 0, 136, 136,
136, 120, 8, 112, 5, 6, 6, 6, 0, 255, 136, 136, 136, 136, 248, 32
};

View File

@@ -0,0 +1,293 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: ISO10646_CN
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w=11 h=11 x= 2 y=10 dx=12 dy= 0 ascent=10 len=22
Font Bounding box w=12 h=11 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent =10 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_CN[4105] U8G_SECTION(".progmem.ISO10646_CN") = {
0, 12, 11, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 10, 255, 7,
255, 0, 0, 0, 6, 0, 10, 1, 7, 7, 6, 2, 0, 128, 128, 128,
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 0,
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 64, 128, 248, 3, 7, 7, 6, 0, 0, 224, 128, 128, 128, 128, 128,
224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
0, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
6, 1, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
6, 0, 3, 104, 144, 0, 0, 0, 6, 0, 10, 0, 0, 0, 12, 0,
10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0,
0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0,
10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0,
0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0,
10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0,
0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0,
10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
12, 0, 10, 0, 0, 0, 12, 0, 10, 11, 11, 22, 12, 0, 255, 255,
224, 2, 0, 2, 0, 4, 0, 13, 0, 20, 128, 36, 64, 196, 32, 4,
0, 4, 0, 4, 0, 11, 11, 22, 12, 0, 255, 249, 0, 138, 0, 171,
224, 172, 64, 170, 64, 170, 64, 170, 64, 170, 128, 33, 0, 82, 128, 140,
96, 11, 11, 22, 12, 0, 255, 36, 0, 36, 0, 63, 128, 68, 0, 132,
0, 4, 0, 255, 224, 10, 0, 17, 0, 32, 128, 192, 96, 11, 11, 22,
12, 0, 255, 36, 0, 36, 0, 63, 192, 68, 0, 4, 0, 255, 224, 9,
0, 9, 0, 17, 32, 33, 32, 64, 224, 11, 11, 22, 12, 0, 255, 32,
0, 61, 224, 81, 32, 145, 32, 17, 32, 255, 32, 17, 32, 41, 32, 37,
224, 69, 32, 128, 0, 11, 11, 22, 12, 0, 255, 32, 128, 127, 192, 8,
64, 255, 224, 17, 0, 32, 128, 95, 64, 128, 32, 63, 128, 0, 0, 127,
192, 11, 11, 22, 12, 0, 255, 34, 64, 71, 224, 148, 128, 228, 128, 47,
224, 68, 128, 244, 128, 7, 224, 52, 128, 196, 128, 7, 224, 11, 11, 22,
12, 0, 255, 4, 128, 143, 224, 73, 0, 25, 0, 47, 192, 9, 0, 9,
0, 47, 192, 73, 0, 137, 0, 15, 224, 11, 11, 22, 12, 0, 255, 16,
0, 63, 128, 81, 0, 14, 0, 49, 128, 192, 96, 63, 128, 36, 128, 63,
128, 36, 128, 63, 128, 11, 11, 22, 12, 0, 255, 34, 128, 250, 64, 7,
224, 250, 128, 138, 128, 138, 128, 250, 128, 34, 128, 178, 128, 170, 160, 100,
224, 11, 11, 22, 12, 0, 255, 34, 32, 71, 64, 146, 128, 239, 224, 34,
0, 71, 192, 236, 64, 7, 192, 52, 64, 199, 192, 4, 64, 11, 11, 22,
12, 0, 255, 8, 0, 15, 192, 8, 0, 8, 0, 255, 224, 8, 0, 14,
0, 9, 128, 8, 64, 8, 0, 8, 0, 10, 11, 22, 12, 0, 255, 255,
128, 0, 128, 0, 128, 128, 128, 128, 128, 255, 128, 128, 0, 128, 0, 128,
64, 128, 64, 127, 192, 11, 11, 22, 12, 0, 255, 71, 192, 65, 0, 239,
224, 65, 0, 69, 0, 105, 96, 201, 32, 77, 96, 73, 32, 79, 224, 200,
32, 11, 11, 22, 12, 0, 255, 8, 0, 4, 0, 4, 0, 10, 0, 10,
0, 10, 0, 17, 0, 17, 0, 32, 128, 64, 64, 128, 32, 11, 11, 22,
12, 0, 255, 34, 64, 34, 0, 247, 224, 34, 0, 35, 224, 53, 32, 229,
32, 37, 64, 40, 128, 41, 64, 114, 32, 11, 10, 20, 12, 0, 0, 68,
64, 68, 64, 68, 64, 127, 192, 4, 0, 4, 0, 132, 32, 132, 32, 132,
32, 255, 224, 11, 11, 22, 12, 0, 255, 4, 0, 0, 0, 127, 192, 4,
0, 4, 0, 4, 0, 127, 192, 4, 0, 4, 0, 4, 0, 255, 224, 11,
11, 22, 12, 0, 255, 255, 224, 17, 0, 1, 192, 254, 0, 72, 128, 37,
0, 4, 0, 255, 224, 21, 0, 36, 128, 196, 96, 11, 11, 22, 12, 0,
255, 17, 0, 127, 192, 68, 64, 127, 192, 68, 64, 127, 192, 4, 0, 255,
224, 4, 0, 4, 0, 4, 0, 9, 11, 22, 12, 0, 255, 16, 0, 255,
128, 128, 128, 128, 128, 255, 128, 128, 128, 128, 128, 255, 128, 128, 128, 128,
128, 255, 128, 11, 11, 22, 12, 0, 255, 113, 0, 1, 0, 3, 224, 249,
32, 33, 32, 65, 32, 81, 32, 137, 32, 250, 32, 2, 32, 4, 192, 11,
11, 22, 12, 0, 255, 127, 192, 17, 0, 17, 0, 17, 0, 17, 0, 255,
224, 17, 0, 17, 0, 33, 0, 33, 0, 65, 0, 11, 11, 22, 12, 0,
255, 33, 0, 34, 0, 244, 64, 87, 224, 80, 32, 87, 192, 148, 64, 84,
64, 36, 64, 87, 192, 148, 64, 11, 11, 22, 12, 0, 255, 17, 0, 10,
0, 127, 192, 4, 0, 4, 0, 255, 224, 4, 0, 10, 0, 17, 0, 32,
128, 192, 96, 10, 11, 22, 12, 0, 255, 95, 192, 0, 64, 132, 64, 132,
64, 191, 64, 132, 64, 140, 64, 148, 64, 164, 64, 140, 64, 129, 192, 11,
11, 22, 12, 0, 255, 36, 0, 39, 192, 36, 0, 36, 0, 255, 224, 0,
0, 20, 64, 36, 128, 71, 0, 12, 0, 112, 0, 11, 11, 22, 12, 0,
255, 36, 128, 4, 128, 15, 192, 228, 128, 36, 128, 63, 224, 36, 128, 36,
128, 40, 128, 80, 0, 143, 224, 11, 11, 22, 12, 0, 255, 8, 0, 8,
0, 255, 128, 136, 128, 136, 128, 255, 128, 136, 128, 136, 128, 255, 160, 136,
32, 7, 224, 11, 11, 22, 12, 0, 255, 39, 128, 36, 128, 244, 128, 36,
128, 116, 128, 108, 128, 164, 128, 36, 128, 36, 160, 40, 160, 48, 96, 10,
11, 22, 12, 0, 255, 255, 192, 128, 64, 128, 64, 158, 64, 146, 64, 146,
64, 158, 64, 128, 64, 128, 64, 255, 192, 128, 64, 11, 11, 22, 12, 0,
255, 127, 192, 68, 0, 95, 192, 80, 64, 95, 192, 80, 64, 95, 192, 66,
0, 74, 128, 82, 64, 166, 32, 11, 11, 22, 12, 0, 255, 4, 0, 7,
224, 4, 0, 127, 192, 64, 64, 64, 64, 64, 64, 127, 192, 0, 0, 82,
64, 137, 32, 11, 11, 22, 12, 0, 255, 71, 128, 36, 128, 4, 128, 4,
128, 232, 96, 32, 0, 47, 192, 36, 64, 34, 128, 49, 0, 38, 192, 11,
11, 22, 12, 0, 255, 127, 192, 74, 64, 127, 192, 4, 0, 255, 224, 4,
0, 63, 128, 32, 128, 36, 128, 36, 128, 255, 224, 11, 11, 22, 12, 0,
255, 34, 0, 79, 224, 72, 32, 79, 224, 200, 0, 79, 224, 74, 160, 90,
160, 111, 224, 74, 160, 72, 96, 11, 11, 22, 12, 0, 255, 243, 192, 36,
64, 42, 128, 241, 0, 34, 128, 101, 224, 114, 32, 165, 64, 32, 128, 35,
0, 44, 0, 11, 11, 22, 12, 0, 255, 4, 0, 255, 224, 128, 32, 0,
0, 255, 224, 4, 0, 36, 0, 39, 192, 36, 0, 84, 0, 143, 224, 11,
11, 22, 12, 0, 255, 115, 224, 16, 128, 81, 0, 35, 224, 250, 32, 42,
160, 34, 160, 34, 160, 32, 128, 33, 64, 98, 32, 11, 11, 22, 12, 0,
255, 34, 0, 247, 128, 34, 128, 54, 128, 226, 160, 37, 160, 36, 96, 104,
32, 0, 0, 82, 64, 137, 32, 11, 11, 22, 12, 0, 255, 115, 192, 66,
0, 66, 0, 123, 224, 74, 64, 74, 64, 122, 64, 74, 64, 66, 64, 68,
64, 136, 64, 11, 11, 22, 12, 0, 255, 8, 0, 255, 224, 8, 0, 31,
192, 48, 64, 95, 192, 144, 64, 31, 192, 16, 64, 16, 64, 16, 192, 11,
11, 22, 12, 0, 255, 2, 0, 127, 224, 66, 0, 66, 0, 95, 192, 66,
0, 71, 0, 74, 128, 82, 64, 98, 32, 130, 0, 11, 11, 22, 12, 0,
255, 243, 192, 150, 64, 145, 128, 166, 96, 161, 0, 151, 192, 145, 0, 149,
0, 231, 224, 129, 0, 129, 0, 11, 11, 22, 12, 0, 255, 15, 128, 136,
128, 79, 128, 8, 128, 143, 128, 64, 0, 31, 192, 53, 64, 85, 64, 149,
64, 63, 224, 11, 11, 22, 12, 0, 255, 39, 224, 32, 128, 248, 128, 32,
128, 32, 128, 56, 128, 224, 128, 32, 128, 32, 128, 32, 128, 97, 128, 11,
11, 22, 12, 0, 255, 31, 224, 145, 0, 87, 192, 20, 64, 23, 192, 148,
64, 87, 192, 17, 0, 85, 64, 153, 32, 35, 0, 11, 11, 22, 12, 0,
255, 32, 128, 39, 224, 242, 64, 33, 128, 34, 64, 52, 32, 226, 64, 34,
64, 34, 64, 34, 64, 100, 64, 11, 11, 22, 12, 0, 255, 65, 0, 65,
0, 79, 224, 233, 32, 73, 32, 73, 32, 111, 224, 201, 32, 73, 32, 73,
32, 207, 224, 11, 11, 22, 12, 0, 255, 33, 0, 241, 0, 79, 224, 169,
32, 249, 32, 47, 224, 57, 32, 233, 32, 41, 32, 47, 224, 40, 32, 11,
11, 22, 12, 0, 255, 143, 224, 73, 32, 9, 32, 203, 160, 73, 32, 79,
224, 72, 32, 75, 160, 74, 160, 107, 160, 80, 224, 11, 11, 22, 12, 0,
255, 127, 192, 4, 0, 68, 64, 36, 64, 36, 128, 4, 0, 255, 224, 4,
0, 4, 0, 4, 0, 4, 0, 11, 11, 22, 12, 0, 255, 130, 0, 66,
0, 31, 224, 194, 0, 95, 192, 82, 64, 95, 192, 71, 0, 74, 128, 82,
64, 191, 224, 11, 11, 22, 12, 0, 255, 4, 0, 127, 224, 72, 128, 127,
224, 72, 128, 79, 128, 64, 0, 95, 192, 72, 64, 71, 128, 152, 96, 11,
11, 22, 12, 0, 255, 1, 0, 239, 224, 161, 0, 164, 64, 175, 224, 164,
64, 175, 224, 169, 32, 233, 32, 2, 128, 12, 96, 11, 11, 22, 12, 0,
255, 20, 192, 246, 160, 188, 96, 167, 128, 168, 128, 191, 224, 169, 32, 239,
224, 9, 32, 15, 224, 9, 32, 11, 11, 22, 12, 0, 255, 127, 128, 64,
128, 66, 128, 98, 128, 84, 128, 72, 128, 72, 128, 84, 160, 98, 160, 64,
96, 128, 32, 11, 11, 22, 12, 0, 255, 4, 0, 127, 224, 64, 32, 127,
224, 64, 0, 125, 224, 84, 32, 76, 160, 84, 96, 100, 160, 141, 96, 11,
11, 22, 12, 0, 255, 130, 0, 95, 224, 4, 0, 8, 64, 159, 224, 64,
32, 10, 128, 10, 128, 74, 160, 146, 160, 34, 96, 11, 11, 22, 12, 0,
255, 65, 0, 79, 224, 232, 32, 66, 128, 68, 64, 104, 32, 199, 192, 65,
0, 65, 0, 65, 0, 207, 224, 11, 11, 22, 12, 0, 255, 80, 32, 125,
32, 145, 32, 255, 32, 17, 32, 125, 32, 85, 32, 85, 32, 84, 32, 92,
32, 16, 224, 11, 11, 22, 12, 0, 255, 63, 128, 32, 128, 63, 128, 32,
128, 255, 224, 72, 0, 123, 192, 73, 64, 121, 64, 72, 128, 251, 96, 11,
11, 22, 12, 0, 255, 4, 0, 4, 0, 4, 0, 36, 128, 36, 64, 68,
64, 68, 32, 132, 32, 4, 0, 4, 0, 28, 0, 11, 11, 22, 12, 0,
255, 4, 0, 4, 0, 4, 0, 255, 224, 4, 0, 10, 0, 10, 0, 17,
0, 17, 0, 32, 128, 192, 96, 9, 10, 20, 10, 0, 0, 136, 128, 73,
0, 8, 0, 255, 128, 0, 128, 0, 128, 127, 128, 0, 128, 0, 128, 255,
128, 11, 11, 22, 12, 0, 255, 33, 0, 18, 0, 255, 224, 0, 0, 120,
128, 74, 128, 122, 128, 74, 128, 122, 128, 72, 128, 89, 128, 11, 11, 22,
12, 0, 255, 39, 192, 0, 0, 0, 0, 239, 224, 33, 0, 34, 0, 36,
64, 47, 224, 32, 32, 80, 0, 143, 224, 11, 11, 22, 12, 0, 255, 32,
128, 39, 0, 249, 0, 33, 192, 119, 0, 33, 0, 249, 224, 39, 0, 113,
32, 169, 32, 32, 224, 11, 11, 22, 12, 0, 255, 16, 64, 16, 64, 253,
224, 16, 64, 56, 192, 53, 64, 82, 64, 148, 64, 16, 64, 16, 64, 16,
192, 11, 11, 22, 12, 0, 255, 0, 64, 248, 64, 11, 224, 8, 64, 136,
64, 82, 64, 81, 64, 33, 64, 80, 64, 72, 64, 137, 192, 10, 11, 22,
12, 0, 255, 132, 0, 132, 64, 132, 128, 245, 0, 134, 0, 132, 0, 132,
0, 148, 0, 164, 64, 196, 64, 131, 192, 11, 11, 22, 12, 0, 255, 17,
32, 125, 0, 17, 0, 255, 224, 41, 0, 253, 64, 73, 64, 124, 128, 8,
160, 253, 96, 10, 32, 11, 11, 22, 12, 0, 255, 23, 192, 36, 64, 36,
64, 103, 192, 161, 0, 47, 224, 33, 0, 35, 128, 37, 64, 41, 32, 33,
0, 11, 11, 22, 12, 0, 255, 8, 0, 255, 224, 16, 0, 39, 192, 32,
128, 97, 0, 175, 224, 33, 0, 33, 0, 33, 0, 35, 0, 11, 11, 22,
12, 0, 255, 36, 0, 47, 224, 180, 0, 164, 128, 164, 160, 170, 192, 42,
128, 40, 128, 41, 64, 50, 64, 36, 32, 11, 11, 22, 12, 0, 255, 127,
224, 128, 0, 63, 192, 32, 64, 63, 192, 16, 0, 31, 192, 16, 64, 40,
128, 71, 0, 56, 224, 11, 11, 22, 12, 0, 255, 127, 224, 64, 0, 64,
0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 128,
0, 11, 11, 22, 12, 0, 255, 255, 224, 4, 0, 127, 192, 68, 64, 127,
192, 68, 64, 127, 192, 68, 0, 36, 0, 24, 0, 231, 224, 11, 11, 22,
12, 0, 255, 17, 224, 253, 0, 69, 0, 41, 224, 253, 64, 17, 64, 125,
64, 17, 64, 85, 64, 146, 64, 52, 64, 11, 11, 22, 12, 0, 255, 33,
0, 95, 224, 64, 0, 207, 192, 64, 0, 79, 192, 64, 0, 79, 192, 72,
64, 79, 192, 72, 64, 11, 11, 22, 12, 0, 255, 4, 0, 127, 192, 64,
64, 127, 192, 64, 64, 127, 192, 64, 64, 127, 192, 4, 64, 82, 32, 191,
160, 11, 11, 22, 12, 0, 255, 127, 192, 68, 64, 127, 192, 68, 64, 127,
192, 4, 0, 27, 0, 224, 224, 17, 0, 17, 0, 97, 0, 11, 11, 22,
12, 0, 255, 255, 224, 4, 0, 8, 0, 127, 224, 73, 32, 79, 32, 73,
32, 79, 32, 73, 32, 73, 32, 127, 224, 11, 11, 22, 12, 0, 255, 253,
224, 86, 64, 121, 64, 56, 128, 85, 64, 146, 32, 255, 224, 4, 0, 39,
192, 36, 0, 255, 224, 11, 11, 22, 12, 0, 255, 251, 128, 82, 0, 123,
224, 18, 64, 250, 64, 20, 64, 63, 128, 32, 128, 63, 128, 32, 128, 63,
128, 11, 11, 22, 12, 0, 255, 31, 224, 32, 0, 39, 192, 100, 64, 167,
192, 32, 0, 47, 224, 40, 32, 39, 192, 33, 0, 35, 0, 11, 11, 22,
12, 0, 255, 243, 224, 130, 32, 130, 32, 250, 32, 130, 32, 130, 32, 138,
32, 178, 32, 194, 224, 2, 0, 2, 0, 11, 11, 22, 12, 0, 255, 36,
128, 70, 160, 149, 192, 228, 128, 39, 224, 68, 128, 245, 192, 6, 160, 52,
128, 196, 128, 7, 224, 11, 11, 22, 12, 0, 255, 39, 192, 65, 0, 135,
224, 224, 32, 34, 128, 69, 128, 242, 128, 15, 224, 48, 128, 193, 64, 2,
32, 11, 11, 22, 12, 0, 255, 2, 0, 2, 0, 34, 0, 35, 192, 34,
0, 34, 0, 34, 0, 34, 0, 34, 0, 34, 0, 255, 224, 9, 11, 22,
12, 0, 255, 8, 0, 8, 0, 255, 128, 136, 128, 136, 128, 136, 128, 255,
128, 136, 128, 136, 128, 136, 128, 255, 128, 11, 11, 22, 12, 0, 255, 33,
0, 83, 160, 65, 0, 247, 224, 81, 0, 83, 192, 86, 64, 83, 192, 90,
64, 83, 192, 66, 64, 11, 11, 22, 12, 0, 255, 127, 192, 4, 0, 4,
0, 4, 0, 255, 224, 10, 0, 10, 0, 18, 0, 34, 32, 66, 32, 129,
224, 11, 11, 22, 12, 0, 255, 17, 0, 33, 0, 47, 224, 97, 0, 163,
128, 35, 128, 37, 64, 37, 64, 41, 32, 33, 0, 33, 0, 11, 11, 22,
12, 0, 255, 247, 224, 148, 32, 244, 32, 151, 224, 148, 128, 244, 128, 151,
224, 148, 128, 244, 160, 150, 96, 4, 32, 11, 11, 22, 12, 0, 255, 123,
224, 148, 128, 4, 0, 127, 192, 4, 0, 255, 224, 1, 0, 255, 224, 33,
0, 17, 0, 7, 0, 11, 11, 22, 12, 0, 255, 33, 0, 71, 192, 145,
0, 47, 224, 96, 128, 175, 224, 32, 128, 36, 128, 34, 128, 32, 128, 35,
128, 11, 11, 22, 12, 0, 255, 39, 192, 36, 64, 247, 192, 46, 224, 42,
160, 62, 224, 225, 0, 47, 224, 35, 128, 37, 64, 105, 32, 11, 11, 22,
12, 0, 255, 20, 0, 39, 224, 42, 0, 98, 0, 163, 192, 34, 0, 34,
0, 35, 224, 34, 0, 34, 0, 34, 0
};

View File

@@ -0,0 +1,192 @@
/*
Fontname: ISO10646_CZ
Copyright: A. Hardtung, public domain
Modified for Czech accents by Petr Zahradnik, http://www.zahradniksebavi.cz
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_CZ[2832] U8G_SECTION(".progmem.ISO10646_CZ") = {
0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
6,0,2,104,144,0,0,0,6,0,0,5,8,8,6,0,
0,16,32,112,136,136,248,136,136,5,8,8,6,0,0,8,
16,248,128,128,240,128,248,3,8,8,6,1,0,32,64,224,
64,64,64,64,224,5,8,8,6,0,0,16,32,112,136,136,
136,136,112,5,8,8,6,0,0,16,32,136,136,136,136,136,
112,5,8,8,6,0,0,16,32,136,136,80,32,32,32,5,
8,8,6,0,0,16,32,0,112,8,120,136,120,5,8,8,
6,0,0,16,32,0,112,136,248,128,112,2,8,8,6,2,
0,64,128,0,128,128,128,128,128,5,8,8,6,0,0,16,
32,0,112,136,136,136,112,5,8,8,6,0,0,16,32,0,
136,136,136,152,104,5,9,9,6,0,255,16,32,0,136,136,
136,120,8,112,5,8,8,6,0,0,80,32,112,136,128,128,
136,112,5,8,8,6,0,0,80,32,0,112,128,128,136,112,
5,8,8,6,0,0,80,32,240,136,136,136,136,240,6,8,
8,6,0,0,4,20,24,112,144,144,144,112,5,8,8,6,
0,0,80,32,248,128,128,240,128,248,5,8,8,6,0,0,
80,32,0,112,136,248,128,112,5,8,8,6,0,0,80,32,
136,200,168,152,136,136,5,8,8,6,0,0,80,32,0,176,
200,136,136,136,5,8,8,6,0,0,80,32,240,136,240,160,
144,136,5,8,8,6,0,0,80,32,0,176,200,128,128,128,
5,8,8,6,0,0,80,32,120,128,128,112,8,240,5,8,
8,6,0,0,80,32,0,112,128,112,8,240,5,8,8,6,
0,0,80,32,248,32,32,32,32,32,6,8,8,6,0,0,
4,68,72,224,64,64,64,48,5,8,8,6,0,0,32,80,
168,136,136,136,136,112,5,8,8,6,0,0,32,80,32,136,
136,136,152,104,5,8,8,6,0,0,80,32,248,8,48,64,
128,248,5,8,8,6,0,0,80,32,0,248,16,32,64,248,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,
7,7,6,0,0,32,112,168,160,168,112,32,5,7,7,6,
0,0,48,64,64,224,64,80,168,5,5,5,6,0,0,136,
112,80,112,136,5,7,7,6,0,0,136,80,32,248,32,248,
32,1,7,7,6,2,0,128,128,128,0,128,128,128,5,8,
8,6,0,0,48,72,32,80,80,32,144,96,3,1,1,6,
1,7,160,5,7,7,6,0,0,248,136,184,184,184,136,248,
5,7,7,6,0,1,112,8,120,136,120,0,248,5,5,5,
6,0,1,40,80,160,80,40,5,3,3,6,0,1,248,8,
8,2,2,2,6,2,6,64,128,5,7,7,6,0,0,248,
136,168,136,152,168,248,5,1,1,6,0,6,248,4,4,4,
6,0,3,96,144,144,96,5,7,7,6,0,0,32,32,248,
32,32,0,248,4,5,5,6,0,3,96,144,32,64,240,3,
5,5,6,0,3,224,32,224,32,224,2,2,2,6,2,6,
64,128,5,8,8,6,0,255,136,136,136,136,152,232,128,128,
5,7,7,6,0,0,120,152,152,120,24,24,24,2,2,2,
6,2,2,192,192,2,2,2,6,2,255,64,128,3,5,5,
6,0,3,64,192,64,64,224,5,7,7,6,0,1,112,136,
136,136,112,0,248,5,5,5,6,0,1,160,80,40,80,160,
5,7,7,6,0,0,136,144,168,88,184,8,8,5,7,7,
6,0,0,136,144,184,72,152,32,56,5,8,8,6,0,0,
192,64,192,72,216,56,8,8,5,7,7,6,0,0,32,0,
32,64,128,136,112,5,8,8,6,0,0,64,32,0,112,136,
248,136,136,5,8,8,6,0,0,16,32,0,112,136,248,136,
136,5,8,8,6,0,0,32,80,0,112,136,248,136,136,5,
8,8,6,0,0,104,144,0,112,136,248,136,136,5,8,8,
6,0,0,80,0,112,136,136,248,136,136,5,8,8,6,0,
0,32,80,32,112,136,248,136,136,5,7,7,6,0,0,56,
96,160,184,224,160,184,5,8,8,6,0,255,112,136,128,128,
136,112,32,96,5,8,8,6,0,0,64,32,0,248,128,240,
128,248,5,8,8,6,0,0,8,16,0,248,128,240,128,248,
5,8,8,6,0,0,32,80,0,248,128,240,128,248,5,7,
7,6,0,0,80,0,248,128,240,128,248,3,8,8,6,1,
0,128,64,0,224,64,64,64,224,3,8,8,6,1,0,32,
64,0,224,64,64,64,224,3,8,8,6,1,0,64,160,0,
224,64,64,64,224,3,7,7,6,1,0,160,0,224,64,64,
64,224,5,9,9,6,0,255,80,32,112,136,128,184,136,136,
112,5,8,8,6,0,0,104,144,0,136,200,168,152,136,5,
8,8,6,0,0,64,32,112,136,136,136,136,112,5,8,8,
6,0,0,16,32,112,136,136,136,136,112,5,8,8,6,0,
0,32,80,0,112,136,136,136,112,5,8,8,6,0,0,104,
144,0,112,136,136,136,112,5,8,8,6,0,0,80,0,112,
136,136,136,136,112,5,5,5,6,0,1,136,80,32,80,136,
5,8,8,6,0,255,16,112,168,168,168,168,112,64,5,8,
8,6,0,0,64,32,136,136,136,136,136,112,5,8,8,6,
0,0,16,32,136,136,136,136,136,112,5,8,8,6,0,0,
32,80,0,136,136,136,136,112,5,8,8,6,0,0,80,0,
136,136,136,136,136,112,1,7,7,6,2,0,128,0,128,128,
128,128,128,5,9,9,6,0,255,120,128,128,112,8,8,240,
32,96,4,8,8,6,1,255,96,144,144,160,144,144,224,128,
5,8,8,6,0,0,64,32,0,112,8,120,136,120,5,8,
8,6,0,0,16,32,0,112,8,120,136,120,5,8,8,6,
0,0,32,80,0,112,8,120,136,120,5,8,8,6,0,0,
104,144,0,112,8,120,136,120,5,7,7,6,0,0,80,0,
112,8,120,136,120,5,8,8,6,0,0,32,80,32,112,8,
120,136,120,5,6,6,6,0,0,208,40,120,160,168,80,5,
7,7,6,0,255,112,128,128,136,112,32,96,5,8,8,6,
0,0,64,32,0,112,136,248,128,112,5,8,8,6,0,0,
16,32,0,112,136,248,128,112,5,8,8,6,0,0,32,80,
0,112,136,248,128,112,5,7,7,6,0,0,80,0,112,136,
248,128,112,3,8,8,6,1,0,128,64,0,64,192,64,64,
224,3,8,8,6,1,0,32,64,0,64,192,64,64,224,3,
8,8,6,1,0,64,160,0,64,192,64,64,224,3,7,7,
6,1,0,160,0,64,192,64,64,224,5,8,8,6,0,255,
80,32,112,136,136,120,8,112,5,8,8,6,0,0,104,144,
0,176,200,136,136,136,5,8,8,6,0,0,64,32,0,112,
136,136,136,112,5,8,8,6,0,0,16,32,0,112,136,136,
136,112,5,8,8,6,0,0,32,80,0,112,136,136,136,112,
5,8,8,6,0,0,104,144,0,112,136,136,136,112,5,7,
7,6,0,0,80,0,112,136,136,136,112,5,5,5,6,0,
1,32,0,248,0,32,5,7,7,6,0,255,16,112,168,168,
168,112,64,5,8,8,6,0,0,64,32,0,136,136,136,152,
104,5,8,8,6,0,0,16,32,0,136,136,136,152,104,5,
8,8,6,0,0,32,80,0,136,136,136,152,104,5,7,7,
6,0,0,80,0,136,136,136,152,104,1,5,5,6,2,0,
128,128,128,128,128,5,7,7,6,0,255,112,128,112,8,240,
32,96,5,8,8,6,0,255,80,0,136,136,136,120,8,112
};

View File

@@ -0,0 +1,205 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/*
Fontname: ISO10646_4_Greek
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 9 x= 2 y= 6 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_Greek_5x7[2715] U8G_SECTION(".progmem.ISO10646_Greek_5x7") = {
0,6,9,0,254,7,1,145,3,32,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
48,64,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,16,96,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,6,6,6,0,0,112,136,8,104,168,
112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,7,
7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,0,
0,112,136,128,128,128,136,112,5,7,7,6,0,0,224,144,
136,136,136,144,224,5,7,7,6,0,0,248,128,128,240,128,
128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,5,
7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,6,
0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,128,
128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,16,
16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,136,
5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,7,
6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,0,
136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,136,
136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,128,
128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,7,
7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,0,
0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,32,
32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,136,
136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,5,
7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,6,
0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,136,
136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,32,
64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,224,
5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,1,
0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,80,
136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,64,
5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,0,
0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,128,
128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,120,
5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,0,
0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,136,
136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,136,
136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,8,
8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,6,
0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,192,
64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,168,
168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,6,
0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,136,
240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,5,
5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,0,
112,128,112,8,240,5,7,7,6,0,0,64,64,224,64,64,
72,48,5,5,5,6,0,0,136,136,136,152,104,5,5,5,
6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,136,
168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,6,
6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,0,
248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,64,
64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,3,
7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,6,
0,3,104,144,0,0,0,6,0,0,0,0,0,6,0,0,
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
0,0,2,2,2,6,1,6,64,128,3,3,3,6,1,5,
32,64,160,5,8,8,6,0,0,64,160,80,80,136,248,136,
136,2,2,2,6,1,2,192,192,5,8,8,6,0,0,64,
128,248,128,240,128,128,248,5,8,8,6,0,0,64,128,136,
136,248,136,136,136,4,8,8,6,0,0,64,128,112,32,32,
32,32,112,0,0,0,6,0,0,5,8,8,6,0,0,64,
128,112,136,136,136,136,112,0,0,0,6,0,0,5,8,8,
6,0,0,64,128,8,136,112,32,32,32,5,8,8,6,0,
0,64,128,112,136,136,136,80,216,3,8,8,6,1,0,32,
64,160,0,64,64,64,32,5,7,7,6,0,0,32,80,136,
136,248,136,136,5,7,7,6,0,0,240,72,72,112,72,72,
240,5,7,7,6,0,0,248,128,128,128,128,128,128,5,6,
6,6,0,0,32,80,80,136,136,248,5,7,7,6,0,0,
248,128,128,240,128,128,248,5,7,7,6,0,0,248,8,16,
32,64,128,248,5,7,7,6,0,0,136,136,136,248,136,136,
136,5,7,7,6,0,0,112,136,136,168,136,136,112,3,7,
7,6,1,0,224,64,64,64,64,64,224,5,7,7,6,0,
0,136,144,160,192,160,144,136,5,7,7,6,0,0,32,80,
136,136,136,136,136,5,7,7,6,0,0,136,216,168,168,136,
136,136,5,7,7,6,0,0,136,200,200,168,152,152,136,5,
7,7,6,0,0,248,0,0,112,0,0,248,5,7,7,6,
0,0,112,136,136,136,136,136,112,5,7,7,6,0,0,248,
80,80,80,80,80,80,5,7,7,6,0,0,240,136,136,240,
128,128,128,0,0,0,6,0,0,5,7,7,6,0,0,248,
128,64,32,64,128,248,5,7,7,6,0,0,248,32,32,32,
32,32,32,5,7,7,6,0,0,136,136,80,32,32,32,32,
5,7,7,6,0,0,112,32,112,168,112,32,112,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
168,168,168,168,112,32,32,5,6,6,6,0,0,112,136,136,
80,80,216,3,8,8,6,1,0,160,0,224,64,64,64,64,
224,5,8,8,6,0,0,80,0,136,136,136,80,32,32,5,
8,8,6,0,0,32,64,8,104,152,144,144,104,5,8,8,
6,0,0,32,64,0,112,136,224,136,112,5,9,9,6,0,
255,32,64,0,112,136,136,136,136,8,2,8,8,6,1,0,
64,128,0,128,128,128,128,64,5,8,8,6,0,0,16,32,
80,0,136,136,136,112,5,6,6,6,0,0,8,104,152,144,
144,104,4,6,6,6,0,255,96,144,240,144,224,128,5,6,
6,6,0,255,136,72,80,32,32,64,5,6,6,6,0,0,
48,64,112,136,136,112,5,5,5,6,0,0,112,136,224,136,
112,5,8,8,6,0,255,128,112,64,128,128,112,8,112,5,
6,6,6,0,255,184,200,136,136,136,8,5,5,5,6,0,
0,112,136,248,136,112,3,5,5,6,1,0,128,128,128,128,
96,4,5,5,6,0,0,144,160,192,160,144,5,6,6,6,
0,0,64,32,32,80,80,136,5,6,6,6,0,255,136,136,
136,216,168,128,5,5,5,6,0,0,136,136,80,96,32,5,
9,9,6,0,255,128,224,128,112,32,64,240,8,112,5,5,
5,6,0,0,112,136,136,136,112,5,5,5,6,0,0,248,
80,80,80,80,5,6,6,6,0,255,112,136,136,200,176,128,
5,7,7,6,0,255,48,64,128,64,48,8,112,5,5,5,
6,0,0,104,144,144,144,96,4,5,5,6,0,0,240,64,
64,64,48,5,5,5,6,0,0,136,136,144,144,224,5,7,
7,6,0,255,32,168,168,168,112,32,32,5,6,6,6,0,
255,136,80,32,32,80,136,5,6,6,6,0,255,168,168,168,
168,112,32,5,5,5,6,0,0,80,136,136,168,112,4,7,
7,6,0,0,160,0,64,64,64,64,48,5,7,7,6,0,
0,80,0,136,136,144,144,224,4,8,8,6,0,0,32,64,
0,96,144,144,144,96,5,8,8,6,0,0,32,64,0,136,
136,144,144,96,5,8,8,6,0,0,32,64,0,80,136,136,
168,112,5,7,7,6,0,255,144,160,192,160,144,136,16,5,
8,8,6,0,0,96,144,160,128,240,136,136,112,5,7,7,
6,0,0,112,80,56,144,144,144,96,5,6,6,6,0,0,
152,80,32,32,32,32,5,8,8,6,0,0,64,128,152,80,
32,32,32,32,5,8,8,6,0,0,80,0,152,80,32,32,
32,32,5,7,7,6,0,255,48,168,168,168,168,112,32,5,
5,5,6,0,0,248,80,80,80,88,5,6,6,6,0,255,
136,80,112,80,136,16,5,7,7,6,0,255,112,136,136,136,
112,32,112,5,6,6,6,0,255,112,136,136,112,32,112,5,
6,6,6,0,0,112,136,128,112,32,112,5,7,7,6,0,
255,8,8,112,128,112,16,96,5,6,6,6,0,0,248,128,
128,240,128,128,4,5,5,6,0,0,240,128,224,128,128,5,
6,6,6,0,0,248,0,0,112,0,248,4,5,5,6,0,
0,64,128,240,16,32,5,7,7,6,0,0,224,80,40,40,
8,8,16,5,7,7,6,0,0,192,32,80,40,8,8,8,
5,7,7,6,0,255,168,168,168,168,88,8,112,5,6,6,
6,0,255,168,168,168,88,8,112,5,6,6,6,0,0,104,
136,136,120,8,8,5,6,6,6,0,255,104,136,136,120,8,
8,4,8,8,6,0,255,128,224,144,144,144,144,32,192,5,
5,5,6,0,0,104,144,112,16,224,5,6,6,6,0,0,
96,144,16,96,136,112,4,6,6,6,0,0,96,144,16,96,
128,112,5,6,6,6,0,0,136,80,32,80,136,248,5,5,
5,6,0,0,136,80,32,80,112,5,6,6,6,0,0,120,
128,240,136,136,112,4,5,5,6,0,0,240,128,224,144,96,
3,6,6,6,1,0,64,224,64,64,64,64,3,6,6,6,
1,255,64,224,64,64,64,128,5,5,5,6,0,0,136,80,
112,80,136,5,6,6,6,0,255,112,136,136,240,128,112,4,
5,5,6,0,0,112,128,128,128,112,2,8,8,6,1,255,
64,0,192,64,64,64,64,128,5,7,7,6,0,0,112,136,
136,248,136,136,112,4,5,5,6,0,0,112,128,224,128,112,
4,5,5,6,0,0,224,16,112,16,224,5,7,7,6,0,
0,128,240,136,136,136,240,128,4,7,7,6,0,255,128,224,
144,144,144,224,128,5,6,6,6,0,0,112,136,128,128,136,
112,5,6,6,6,0,0,136,216,168,136,136,136,5,6,6,
6,0,255,136,216,168,136,136,128,5,8,8,6,0,255,112,
136,136,136,112,64,224,64,5,6,6,6,0,0,112,136,8,
8,136,112,5,6,6,6,0,0,112,136,160,128,136,112,5,
6,6,6,0,0,112,136,40,8,136,112};

View File

@@ -0,0 +1,192 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: ISO10646_Kana
Copyright: A. Hardtung, public domain
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 5 h= 8 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_Kana_5x7[2482] U8G_SECTION(".progmem.ISO10646_Kana_5x7") = {
0, 6, 9, 0, 254, 7, 1, 145, 3, 32, 32, 255, 255, 8, 255, 7,
255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1,
0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80,
136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64,
5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0,
0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128,
128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120,
5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0,
0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136,
136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136,
136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8,
8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6,
0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192,
64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168,
168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6,
0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136,
240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5,
5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0,
112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64,
72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5,
6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136,
168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6,
6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0,
248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64,
64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3,
7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, 6,
0, 3, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 3, 3, 6, 0, 1,
248, 0, 248, 4, 4, 4, 6, 0, 0, 240, 16, 96, 64, 5, 6, 6,
6, 0, 0, 248, 8, 40, 48, 32, 64, 3, 4, 4, 6, 1, 0, 32,
64, 192, 64, 4, 6, 6, 6, 0, 0, 16, 32, 96, 160, 32, 32, 4,
4, 4, 6, 0, 0, 32, 240, 144, 32, 5, 6, 6, 6, 0, 0, 32,
248, 136, 8, 16, 32, 3, 4, 4, 6, 1, 0, 224, 64, 64, 224, 5,
5, 5, 6, 0, 0, 248, 32, 32, 32, 248, 4, 4, 4, 6, 0, 0,
32, 240, 96, 160, 5, 6, 6, 6, 0, 0, 16, 248, 48, 80, 144, 16,
5, 6, 6, 6, 0, 0, 64, 248, 72, 72, 72, 144, 5, 8, 8, 6,
0, 0, 40, 0, 64, 248, 72, 72, 72, 144, 5, 6, 6, 6, 0, 0,
32, 248, 32, 248, 32, 32, 5, 8, 8, 6, 0, 0, 40, 0, 32, 248,
32, 248, 32, 32, 4, 5, 5, 6, 0, 0, 112, 144, 16, 32, 192, 5,
7, 7, 6, 0, 0, 40, 0, 112, 144, 16, 32, 192, 5, 6, 6, 6,
0, 0, 64, 120, 144, 16, 16, 32, 5, 8, 8, 6, 0, 0, 40, 0,
64, 120, 144, 16, 16, 32, 5, 5, 5, 6, 0, 0, 248, 8, 8, 8,
248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 8, 248, 5, 6,
6, 6, 0, 0, 80, 248, 80, 16, 32, 64, 5, 8, 8, 6, 0, 0,
40, 0, 80, 248, 80, 16, 32, 64, 5, 5, 5, 6, 0, 0, 192, 8,
200, 16, 224, 5, 7, 7, 6, 0, 0, 40, 0, 192, 8, 200, 16, 224,
5, 5, 5, 6, 0, 0, 248, 16, 32, 80, 136, 5, 7, 7, 6, 0,
0, 40, 0, 248, 16, 32, 80, 136, 5, 6, 6, 6, 0, 0, 64, 248,
72, 80, 64, 56, 5, 8, 8, 6, 0, 0, 40, 0, 64, 248, 72, 80,
64, 56, 5, 5, 5, 6, 0, 0, 136, 136, 72, 16, 96, 5, 7, 7,
6, 0, 0, 40, 0, 136, 136, 72, 16, 96, 5, 5, 5, 6, 0, 0,
120, 72, 168, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 120, 72, 168,
16, 96, 5, 6, 6, 6, 0, 0, 16, 224, 32, 248, 32, 64, 5, 8,
8, 6, 0, 0, 40, 0, 16, 224, 32, 248, 32, 64, 5, 4, 4, 6,
0, 0, 168, 168, 8, 48, 5, 5, 5, 6, 0, 0, 168, 168, 8, 16,
32, 5, 7, 7, 6, 0, 0, 40, 0, 168, 168, 8, 16, 32, 5, 6,
6, 6, 0, 0, 112, 0, 248, 32, 32, 64, 5, 8, 8, 6, 0, 0,
40, 0, 112, 0, 248, 32, 32, 64, 3, 6, 6, 6, 1, 0, 128, 128,
192, 160, 128, 128, 4, 8, 8, 6, 1, 0, 80, 0, 128, 128, 192, 160,
128, 128, 5, 6, 6, 6, 0, 0, 32, 248, 32, 32, 64, 128, 5, 5,
5, 6, 0, 0, 112, 0, 0, 0, 248, 5, 5, 5, 6, 0, 0, 248,
8, 80, 32, 208, 5, 6, 6, 6, 0, 0, 32, 248, 16, 32, 112, 168,
3, 6, 6, 6, 1, 0, 32, 32, 32, 32, 64, 128, 5, 5, 5, 6,
0, 0, 16, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 40, 0, 16,
136, 136, 136, 136, 5, 8, 8, 6, 0, 0, 24, 24, 0, 16, 136, 136,
136, 136, 5, 6, 6, 6, 0, 0, 128, 128, 248, 128, 128, 120, 5, 7,
7, 6, 0, 0, 40, 128, 128, 248, 128, 128, 120, 5, 7, 7, 6, 0,
0, 24, 152, 128, 248, 128, 128, 120, 5, 5, 5, 6, 0, 0, 248, 8,
8, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 16, 96,
5, 8, 8, 6, 0, 0, 24, 24, 0, 248, 8, 8, 16, 96, 5, 4,
4, 6, 0, 1, 64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 40, 0,
64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 24, 24, 64, 160, 16, 8,
5, 6, 6, 6, 0, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6,
0, 0, 40, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6, 0, 0,
24, 24, 32, 248, 32, 168, 168, 32, 5, 5, 5, 6, 0, 0, 248, 8,
80, 32, 16, 4, 5, 5, 6, 1, 0, 224, 0, 224, 0, 240, 5, 5,
5, 6, 0, 0, 32, 64, 136, 248, 8, 5, 5, 5, 6, 0, 0, 8,
40, 16, 40, 192, 5, 5, 5, 6, 0, 0, 248, 64, 248, 64, 56, 5,
4, 4, 6, 0, 0, 64, 248, 80, 64, 5, 6, 6, 6, 0, 0, 64,
248, 72, 80, 64, 64, 4, 4, 4, 6, 0, 0, 96, 32, 32, 240, 5,
5, 5, 6, 0, 0, 112, 16, 16, 16, 248, 4, 5, 5, 6, 0, 0,
240, 16, 240, 16, 240, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 248,
5, 6, 6, 6, 0, 0, 112, 0, 248, 8, 16, 32, 4, 6, 6, 6,
0, 0, 144, 144, 144, 144, 16, 32, 5, 5, 5, 6, 0, 0, 32, 160,
168, 168, 176, 4, 5, 5, 6, 0, 0, 128, 128, 144, 160, 192, 5, 5,
5, 6, 0, 0, 248, 136, 136, 136, 248, 4, 4, 4, 6, 0, 0, 240,
144, 16, 32, 5, 5, 5, 6, 0, 0, 248, 136, 8, 16, 32, 5, 6,
6, 6, 0, 0, 16, 248, 80, 80, 248, 16, 5, 5, 5, 6, 0, 0,
248, 8, 48, 32, 248, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 48,
5, 5, 5, 6, 0, 0, 192, 8, 8, 16, 224, 5, 8, 8, 6, 0,
0, 40, 0, 32, 248, 136, 8, 16, 32, 4, 4, 4, 6, 0, 0, 64,
240, 80, 160, 4, 4, 4, 6, 0, 0, 64, 240, 32, 64, 5, 7, 7,
6, 0, 0, 40, 0, 248, 136, 8, 16, 96, 5, 8, 8, 6, 0, 0,
40, 0, 16, 248, 80, 80, 248, 16, 5, 7, 7, 6, 0, 0, 40, 0,
248, 8, 48, 32, 248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 248,
8, 48, 2, 2, 2, 6, 2, 2, 192, 192, 5, 1, 1, 6, 0, 2,
248, 5, 4, 4, 6, 0, 1, 128, 96, 16, 8, 5, 5, 5, 6, 0,
1, 40, 128, 96, 16, 8, 5, 6, 6, 6, 0, 0, 248, 8, 8, 8,
8, 8
};

View File

@@ -0,0 +1,151 @@
/*
Fontname: ISO10646_SK
Copyright: A. Hardtung, modified by Roman Moravcik
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent = 8 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_SK[2203] U8G_SECTION(".progmem.ISO10646_SK") = {
0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
6,0,2,104,144,0,0,0,6,0,0,5,8,8,6,0,
0,16,32,112,136,136,248,136,136,5,8,8,6,0,0,80,
0,112,136,136,248,136,136,5,8,8,6,0,0,8,16,248,
128,128,240,128,248,3,8,8,6,1,0,32,64,224,64,64,
64,64,224,5,8,8,6,0,0,16,32,112,136,136,136,136,
112,5,8,8,6,0,0,32,80,112,136,136,136,136,112,5,
8,8,6,0,0,16,32,136,136,136,136,136,112,5,8,8,
6,0,0,16,32,136,136,80,32,32,32,5,8,8,6,0,
0,16,32,0,112,8,120,136,120,5,7,7,6,0,0,80,
0,112,8,120,136,120,5,8,8,6,0,0,16,32,0,112,
136,248,128,112,2,8,8,6,2,0,64,128,0,128,128,128,
128,128,5,8,8,6,0,0,16,32,0,112,136,136,136,112,
5,8,8,6,0,0,32,80,0,112,136,136,136,112,5,8,
8,6,0,0,16,32,0,136,136,136,152,104,5,9,9,6,
0,255,16,32,0,136,136,136,120,8,112,5,8,8,6,0,
0,80,32,112,136,128,128,136,112,5,8,8,6,0,0,80,
32,0,112,128,128,136,112,5,8,8,6,0,0,80,32,240,
136,136,136,136,240,6,8,8,6,0,0,4,20,24,112,144,
144,144,112,5,8,8,6,0,0,16,32,128,128,128,128,128,
248,3,8,8,6,1,0,32,64,0,192,64,64,64,224,5,
8,8,6,0,0,16,144,160,128,128,128,128,248,5,8,8,
6,1,0,8,200,80,64,64,64,64,224,5,8,8,6,0,
0,80,32,136,200,168,152,136,136,5,8,8,6,0,0,80,
32,0,176,200,136,136,136,5,8,8,6,0,0,16,32,240,
136,240,160,144,136,5,8,8,6,0,0,16,32,0,176,200,
128,128,128,5,8,8,6,0,0,80,32,120,128,128,112,8,
240,5,8,8,6,0,0,80,32,0,112,128,112,8,240,5,
8,8,6,0,0,80,32,248,32,32,32,32,32,6,8,8,
6,0,0,4,68,72,224,64,64,64,48,5,8,8,6,0,
0,80,32,248,8,48,64,128,248,5,8,8,6,0,0,80,
32,0,248,16,32,64,248,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
0,0,6,0,0,0,0,0,6,0,0};

View File

@@ -0,0 +1,304 @@
/*
Fontname: ISO10646_ko_KR
Copyright: A. Hardtung, public domain
Korean Font : Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/) , NanumGothic, SIL OPEN FONT LICENSE
Capital A Height: 7, '1' Height: 7
Calculated Max Values w=12 h=11 x=12 y= 5 dx=13 dy= 0 ascent=10 len=22
Font Bounding box w=13 h=12 x= 0 y=-2
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
Pure Font ascent = 7 descent=-1
X Font ascent = 7 descent=-1
Max Font ascent =10 descent=-1
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_ko_KR[4639] U8G_SECTION(".progmem.ISO10646_ko_KR") = {
0,12,14,0,253,7,1,146,3,33,32,255,255,11,253,7,
255,0,0,0,6,5,255,1,7,7,6,2,0,128,128,128,
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,0,
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
32,64,128,248,3,7,7,6,0,0,224,128,128,128,128,128,
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
0,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
6,1,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
6,0,3,104,144,0,0,0,6,5,255,0,0,0,12,11,
255,0,0,0,12,11,255,10,12,24,12,1,255,0,128,248,
128,8,128,8,128,8,192,16,128,32,128,192,128,0,128,0,
128,0,128,0,128,11,12,24,12,1,255,248,128,8,128,8,
128,8,224,16,128,32,128,192,128,0,0,63,128,0,128,0,
128,0,128,11,12,24,12,1,255,248,128,8,128,8,128,8,
224,16,128,32,128,192,128,31,0,32,128,32,128,32,128,31,
0,9,11,22,12,1,0,2,128,250,128,10,128,10,128,10,
128,19,128,34,128,194,128,2,128,2,128,2,128,9,12,24,
12,1,255,0,128,252,128,4,128,4,128,5,128,8,128,16,
128,32,128,64,128,0,128,0,128,0,128,9,12,24,12,1,
255,252,128,4,128,4,128,9,128,16,128,32,128,192,128,31,
128,16,128,16,128,16,128,31,128,11,9,18,12,0,0,127,
192,0,64,0,64,0,64,4,64,4,64,4,0,4,0,255,
224,11,12,24,12,1,255,127,128,0,128,0,128,8,128,8,
128,255,224,0,0,31,0,32,128,32,128,32,128,31,0,12,
12,24,12,0,255,0,64,126,64,2,64,2,64,18,64,18,
112,18,64,16,64,255,64,0,64,0,64,0,64,11,9,18,
12,0,0,127,192,0,64,0,64,0,64,18,64,18,64,18,
0,18,0,255,224,10,12,24,12,1,255,127,128,0,128,0,
128,0,128,255,192,0,0,0,0,64,128,127,128,64,128,64,
128,127,128,9,12,24,12,1,255,0,128,252,128,4,128,4,
128,4,128,8,128,16,128,32,128,192,128,0,128,0,128,0,
128,10,12,24,12,1,255,130,64,130,64,130,64,131,192,130,
64,250,64,0,0,31,0,32,128,32,128,32,128,31,0,11,
9,18,12,0,0,32,0,32,0,32,0,32,0,63,192,4,
0,4,0,4,0,255,224,11,12,24,12,0,255,32,0,32,
0,32,0,32,0,63,192,0,0,255,224,4,0,4,0,4,
0,4,0,4,0,11,12,24,12,1,255,0,128,252,128,128,
128,128,128,128,128,128,224,128,128,254,128,0,128,0,128,0,
128,0,128,10,12,24,12,1,255,2,64,250,64,130,64,130,
64,130,64,131,192,130,64,250,64,2,64,2,64,2,64,2,
64,11,9,18,12,0,0,63,192,32,0,32,0,32,0,63,
192,4,0,4,0,4,0,255,224,11,12,24,12,0,255,63,
192,32,0,32,0,63,192,4,0,255,224,0,0,63,192,0,
64,63,192,32,0,63,192,11,12,24,12,0,255,127,192,64,
0,64,0,127,192,4,0,4,0,255,224,0,0,63,128,64,
64,64,64,63,128,9,12,24,12,1,255,0,128,254,128,128,
128,128,128,128,128,254,128,16,128,16,128,255,128,0,128,0,
128,0,128,11,9,18,12,0,0,63,192,32,0,32,0,32,
0,63,192,0,0,0,0,0,0,255,224,9,12,24,12,1,
255,252,128,128,128,128,128,128,128,128,128,252,128,0,128,31,
0,32,128,32,128,32,128,31,0,11,12,24,12,1,255,0,
128,252,128,4,128,4,128,252,128,128,224,128,128,128,128,252,
128,0,128,0,128,0,128,10,12,24,12,1,255,250,64,10,
64,10,64,251,192,130,64,130,64,250,64,0,0,63,192,0,
64,0,64,0,64,11,12,24,12,1,255,252,128,4,128,4,
224,252,128,128,224,252,128,0,128,31,0,32,128,32,128,32,
128,31,0,10,12,24,12,1,255,1,64,241,64,17,64,17,
64,247,64,129,64,129,64,129,64,241,64,1,64,1,64,1,
64,9,12,24,12,1,255,0,128,248,128,8,128,11,128,248,
128,128,128,131,128,128,128,252,128,0,128,0,128,0,128,9,
12,24,12,1,255,248,128,8,128,11,128,248,128,131,128,128,
128,248,128,0,0,63,128,0,128,0,128,0,128,11,10,20,
12,0,0,63,192,0,64,0,64,63,192,32,0,32,0,63,
192,4,0,4,0,255,224,11,10,20,12,0,0,63,192,0,
64,0,64,63,192,32,0,32,0,63,192,9,0,9,0,255,
224,11,10,20,12,0,0,63,192,0,64,0,64,63,192,32,
0,32,0,63,192,0,0,0,0,255,224,9,12,24,12,1,
255,0,128,252,128,4,128,4,128,252,128,128,128,128,128,128,
128,252,128,0,128,0,128,0,128,9,12,24,12,1,255,252,
128,4,128,4,128,252,128,128,128,128,128,252,128,0,128,32,
128,32,0,32,0,63,128,9,12,24,12,1,255,252,128,4,
128,4,128,252,128,128,128,252,128,0,128,31,0,32,128,32,
128,32,128,31,0,9,12,24,12,1,255,2,128,250,128,138,
128,138,128,142,128,138,128,138,128,250,128,2,128,2,128,2,
128,2,128,10,12,24,12,1,255,1,64,249,64,137,64,139,
64,137,64,249,64,1,64,1,64,33,64,32,0,32,0,63,
192,9,12,24,12,1,255,252,128,132,128,133,128,132,128,133,
128,252,128,0,128,0,128,32,0,32,0,32,0,63,128,11,
9,18,12,0,0,127,192,64,64,64,64,64,64,127,192,4,
0,4,0,4,0,255,224,9,12,24,12,1,255,132,128,132,
128,132,128,132,128,255,128,132,128,132,128,252,128,0,128,0,
128,0,128,0,128,10,12,24,12,1,255,1,64,137,64,137,
64,137,64,251,64,137,64,137,64,249,64,1,64,1,64,1,
64,1,64,9,12,24,12,1,255,138,128,138,128,250,128,142,
128,138,128,250,128,0,0,63,128,0,128,63,128,32,0,63,
128,11,10,20,12,0,1,32,64,32,64,63,192,32,64,32,
64,63,192,4,0,4,0,4,0,255,224,10,11,22,12,1,
0,64,128,64,128,127,128,64,128,127,128,0,0,255,192,8,
0,8,0,8,0,8,0,11,12,24,12,0,255,32,64,63,
192,32,64,32,64,63,192,0,0,255,224,2,0,34,0,32,
0,32,0,63,192,9,12,24,12,1,255,132,128,132,128,132,
128,132,128,252,128,132,128,132,128,252,128,0,128,0,128,0,
128,0,128,10,12,24,12,1,255,16,128,16,128,16,192,40,
128,68,128,130,128,0,0,64,128,127,128,64,128,64,128,127,
128,11,12,24,12,0,255,0,160,16,160,16,160,16,160,16,
160,16,224,40,160,68,160,130,160,0,160,0,160,0,160,10,
12,24,12,0,255,0,64,16,64,16,64,16,64,17,192,40,
64,68,64,130,64,0,64,0,64,0,64,0,64,10,12,24,
12,0,255,16,64,16,64,17,192,40,64,68,64,130,64,0,
0,31,192,0,64,31,192,16,0,31,192,11,12,24,12,0,
255,0,160,16,160,16,160,16,160,17,160,16,160,40,160,68,
160,130,160,0,160,0,160,0,160,11,12,24,12,0,255,16,
160,16,160,16,160,17,160,40,160,68,160,130,160,0,160,16,
160,16,0,16,0,31,224,10,12,24,12,1,255,1,64,33,
64,33,64,35,64,81,64,137,64,1,64,5,64,4,0,10,
0,17,0,32,128,11,10,20,12,0,0,4,0,4,0,4,
0,10,0,17,0,32,128,68,64,4,0,4,0,255,224,11,
12,24,12,0,255,4,0,4,0,10,0,17,0,36,128,4,
0,255,224,0,0,63,128,0,128,0,128,0,128,11,9,18,
12,0,0,4,0,4,0,10,0,17,0,32,128,64,64,128,
32,0,0,255,224,9,12,24,12,1,255,0,128,16,128,16,
128,16,128,16,128,40,128,68,128,130,128,0,128,0,128,0,
128,0,128,9,12,24,12,1,255,0,128,16,128,16,128,40,
128,68,128,130,128,0,0,63,128,0,128,63,128,32,0,63,
128,11,12,24,12,1,255,120,128,132,128,132,128,132,224,132,
128,120,128,0,0,64,128,127,128,64,128,64,128,127,128,9,
12,24,12,1,255,0,128,120,128,132,128,132,128,133,128,132,
128,132,128,132,128,120,128,0,128,0,128,0,128,10,12,24,
12,1,255,120,128,132,128,132,128,133,128,132,128,120,128,0,
128,72,0,121,0,73,0,74,128,124,64,9,12,24,12,1,
255,120,128,133,128,132,128,132,128,133,128,120,128,0,0,63,
128,0,128,63,128,32,0,63,128,10,12,24,12,1,255,1,
64,113,64,139,64,137,64,137,64,137,64,139,64,137,64,113,
64,1,64,1,64,1,64,11,9,18,12,0,0,31,0,32,
128,32,128,32,128,31,0,0,0,4,0,4,0,255,224,12,
12,24,12,0,255,31,128,32,64,32,64,32,64,31,128,4,
0,255,240,0,0,32,0,32,0,32,0,63,192,12,12,24,
12,0,255,60,64,66,64,66,64,66,64,60,112,16,64,255,
64,0,64,32,64,32,0,32,0,63,192,11,9,18,12,0,
0,31,128,32,64,32,64,32,64,31,128,0,0,16,128,16,
128,255,224,12,12,24,12,0,255,31,128,32,64,32,64,31,
128,0,0,17,0,255,240,0,0,31,128,32,64,32,64,31,
128,9,12,24,12,1,255,120,128,132,128,132,128,120,128,0,
128,255,128,16,128,23,128,16,128,64,0,64,0,127,128,10,
12,24,12,0,255,60,64,66,64,66,64,66,64,60,64,0,
64,255,192,8,64,8,64,8,64,8,64,8,64,12,9,18,
12,0,0,31,128,32,64,32,64,32,64,31,128,0,0,0,
0,0,0,255,240,12,12,24,12,0,255,31,128,32,64,32,
64,31,128,0,0,255,240,0,0,63,192,32,64,32,64,32,
64,63,192,10,12,24,12,0,255,0,64,60,64,66,64,66,
64,66,64,60,64,0,64,0,64,255,192,0,64,0,64,0,
64,9,12,24,12,1,255,0,128,120,128,132,128,132,128,132,
128,132,128,132,128,132,128,120,128,0,128,0,128,0,128,9,
12,24,12,1,255,120,128,132,128,132,128,132,128,132,128,120,
128,0,128,0,128,32,128,32,0,32,0,63,128,9,12,24,
12,1,255,120,128,132,128,132,128,132,128,132,128,120,128,0,
0,63,128,0,128,63,128,32,0,63,128,9,12,24,12,1,
255,120,128,132,128,132,128,132,128,132,128,120,128,0,0,32,
128,32,128,63,128,32,128,63,128,11,12,24,12,1,255,0,
128,248,128,8,128,8,128,16,128,40,224,68,128,130,128,0,
128,0,128,0,128,0,128,11,12,24,12,1,255,248,128,8,
128,8,128,16,224,40,128,198,128,0,128,127,0,0,128,0,
128,0,128,0,128,11,12,24,12,1,255,248,128,8,128,8,
128,16,224,40,128,198,128,0,0,31,0,32,128,32,128,32,
128,31,0,11,12,24,12,0,255,0,160,248,160,8,160,8,
160,16,160,40,224,68,160,130,160,0,160,0,160,0,160,0,
160,9,12,24,12,1,255,0,128,248,128,8,128,8,128,19,
128,40,128,68,128,130,128,0,128,0,128,0,128,0,128,9,
12,24,12,1,255,248,128,8,128,9,128,16,128,40,128,198,
128,0,0,63,128,0,128,0,128,0,128,0,128,9,12,24,
12,1,255,248,128,8,128,8,128,17,128,40,128,198,128,0,
128,0,128,32,0,32,0,32,0,63,128,9,12,24,12,1,
255,248,128,8,128,9,128,16,128,40,128,198,128,0,0,63,
128,0,128,63,128,32,0,63,128,9,12,24,12,1,255,248,
128,8,128,8,128,17,128,40,128,198,128,0,0,63,128,32,
128,32,128,32,128,63,128,9,12,24,12,1,255,248,128,8,
128,8,128,17,128,40,128,198,128,0,0,31,0,32,128,32,
128,32,128,31,0,11,12,24,12,0,255,0,160,248,160,8,
160,8,160,17,160,40,160,68,160,130,160,0,160,0,160,0,
160,0,160,11,12,24,12,0,255,63,128,4,0,10,0,17,
0,32,128,4,0,255,224,0,0,63,128,0,128,0,128,0,
128,11,12,24,12,0,255,127,192,4,0,10,0,17,0,96,
192,4,0,255,224,0,0,63,128,64,64,64,64,63,128,11,
12,24,12,0,255,0,64,127,64,8,64,28,64,34,64,65,
96,8,64,8,64,255,192,0,64,0,64,0,64,11,12,24,
10,0,255,127,192,4,0,10,0,17,0,96,192,0,0,255,
224,4,0,36,0,32,0,32,0,63,192,11,12,24,12,0,
255,63,128,4,0,10,0,49,128,0,0,255,224,4,0,0,
0,31,0,32,128,32,128,31,0,11,12,24,12,0,255,63,
128,4,0,10,0,49,128,0,0,255,224,0,0,63,128,0,
128,63,128,32,0,63,128,9,12,24,12,1,255,0,128,252,
128,4,128,8,128,16,128,40,128,68,128,130,128,0,128,0,
128,0,128,0,128,10,12,24,12,0,255,0,64,56,64,0,
64,254,64,16,192,40,64,68,64,130,64,0,64,0,64,0,
64,0,64,11,12,24,12,0,255,0,160,56,160,0,160,254,
160,16,160,41,160,68,160,130,160,0,160,0,160,0,160,0,
160,11,10,20,12,0,1,14,0,0,0,63,128,4,0,10,
0,17,0,96,192,4,0,4,0,255,224,11,12,24,12,0,
255,28,32,0,32,127,32,8,32,20,32,34,32,193,160,8,
32,255,224,0,32,0,32,0,32,11,12,24,12,0,255,14,
0,0,0,63,128,4,0,10,0,49,128,0,0,255,224,4,
0,63,128,0,128,0,128,11,12,24,12,0,255,4,0,63,
128,4,0,10,0,49,128,255,224,4,0,63,128,0,128,63,
128,32,0,63,128,11,12,24,12,0,255,4,0,63,128,4,
0,10,0,49,128,0,0,255,224,4,0,31,0,32,128,32,
128,31,0,10,12,24,12,0,255,28,64,0,64,127,64,8,
64,20,64,99,64,0,64,255,192,8,64,8,64,8,64,8,
64,11,12,24,12,0,255,28,32,0,32,127,32,8,32,20,
32,34,32,65,32,128,160,0,32,0,32,0,32,0,32,9,
12,24,12,1,255,56,128,0,128,254,128,16,128,40,128,68,
128,130,128,0,0,63,128,32,128,32,128,63,128,10,14,28,
12,1,253,0,128,248,128,8,128,8,128,248,192,16,128,32,
128,64,128,128,128,0,128,0,128,0,128,0,0,128,0,9,
12,24,12,1,255,0,128,248,128,128,128,128,128,251,128,128,
128,128,128,128,128,248,128,0,128,0,128,0,128,11,10,20,
12,0,0,63,192,32,0,32,0,63,192,32,0,32,0,63,
192,0,0,0,0,255,224,11,12,24,12,0,255,63,192,32,
0,63,192,32,0,63,192,0,0,255,224,0,0,32,0,32,
0,32,0,63,192,11,12,24,12,0,255,0,160,254,160,40,
160,40,160,40,224,40,160,40,160,254,160,0,160,0,160,0,
160,0,160,11,12,24,12,0,255,0,160,254,160,40,160,40,
224,40,160,254,160,0,160,0,160,16,160,16,0,16,0,31,
224,11,9,18,12,0,0,127,192,17,0,17,0,17,0,127,
192,0,0,4,0,4,0,255,224,11,9,18,12,0,0,127,
192,17,0,17,0,17,0,127,192,0,0,0,0,0,0,255,
224,9,12,24,12,1,255,252,128,72,128,72,128,72,128,72,
128,252,128,0,0,63,128,0,128,63,128,32,0,63,128,10,
12,24,12,1,255,56,128,0,128,254,128,0,128,124,128,130,
192,130,128,130,128,124,128,0,128,0,128,0,128,11,12,24,
12,0,255,14,0,63,128,0,0,31,0,32,128,31,0,4,
0,255,224,0,0,63,128,32,128,63,128,12,12,24,12,0,
255,28,64,0,64,127,64,0,64,62,64,65,112,62,64,0,
64,8,64,255,192,0,64,0,64,0,0,0,12,9,0,0,
0,0,12,10,0,0,0,0,12,10,2,0,0,0,12,10,
0,0,0,0,12,10,0,0,0,0,12,10,0,0,0,0,
12,10,0,0,0,0,12,10,0,0,0,0,12,10,0};

View File

@@ -0,0 +1,45 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Fontname: Marlin_symbols
Copyright: Created with Fony 1.4.7
Capital A Height: 0, '1' Height: 0
Calculated Max Values w= 5 h=10 x= 0 y= 3 dx= 6 dy= 0 ascent= 8 len=10
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 0 descent= 0
X Font ascent = 0 descent= 0
Max Font ascent = 8 descent=-2
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t Marlin_symbols[140] U8G_SECTION(".progmem.Marlin_symbols") = {
0, 6, 9, 0, 254, 0, 0, 0, 0, 0, 1, 9, 0, 8, 254, 0,
0, 5, 8, 8, 6, 0, 0, 64, 240, 200, 136, 136, 152, 120, 16, 5,
8, 8, 6, 0, 0, 192, 248, 136, 136, 136, 136, 136, 248, 5, 5, 5,
6, 0, 1, 32, 48, 248, 48, 32, 5, 8, 8, 6, 0, 0, 32, 112,
248, 32, 32, 32, 32, 224, 5, 9, 9, 6, 0, 255, 32, 112, 168, 168,
184, 136, 136, 112, 32, 5, 9, 9, 6, 0, 255, 224, 128, 192, 176, 168,
40, 48, 40, 40, 5, 9, 9, 6, 0, 255, 248, 168, 136, 136, 136, 136,
136, 168, 248, 5, 10, 10, 6, 0, 254, 32, 80, 80, 80, 80, 136, 168,
168, 136, 112, 3, 3, 3, 6, 0, 3, 64, 160, 64
};

73
Marlin/drivers.h Normal file
View File

@@ -0,0 +1,73 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _DRIVERS_H_
#define _DRIVERS_H_
#include "MarlinConfig.h"
#define A4988 0x001
#define DRV8825 0x002
#define LV8729 0x003
#define L6470 0x104
#define TB6560 0x005
#define TB6600 0x006
#define TMC2100 0x007
#define TMC2130 0x108
#define TMC2130_STANDALONE 0x008
#define TMC2208 0x109
#define TMC2208_STANDALONE 0x009
#define TMC26X 0x10A
#define TMC26X_STANDALONE 0x00A
#define TMC2660 0x10B
#define TMC2660_STANDALONE 0x00B
#define _AXIS_DRIVER_TYPE(A,T) ( defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T) )
#define AXIS_DRIVER_TYPE_X(T) _AXIS_DRIVER_TYPE(X,T)
#define AXIS_DRIVER_TYPE_Y(T) _AXIS_DRIVER_TYPE(Y,T)
#define AXIS_DRIVER_TYPE_Z(T) _AXIS_DRIVER_TYPE(Z,T)
#define AXIS_DRIVER_TYPE_X2(T) (ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)) && _AXIS_DRIVER_TYPE(X2,T)
#define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Y2,T))
#define AXIS_DRIVER_TYPE_Z2(T) (ENABLED(Z_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Z2,T))
#define AXIS_DRIVER_TYPE_E0(T) (E_STEPPERS > 0 && _AXIS_DRIVER_TYPE(E0,T))
#define AXIS_DRIVER_TYPE_E1(T) (E_STEPPERS > 1 && _AXIS_DRIVER_TYPE(E1,T))
#define AXIS_DRIVER_TYPE_E2(T) (E_STEPPERS > 2 && _AXIS_DRIVER_TYPE(E2,T))
#define AXIS_DRIVER_TYPE_E3(T) (E_STEPPERS > 3 && _AXIS_DRIVER_TYPE(E3,T))
#define AXIS_DRIVER_TYPE_E4(T) (E_STEPPERS > 4 && _AXIS_DRIVER_TYPE(E4,T))
#define AXIS_DRIVER_TYPE(A,T) AXIS_DRIVER_TYPE_##A(T)
#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) || \
AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) || \
AXIS_DRIVER_TYPE_Z(T) || AXIS_DRIVER_TYPE_Z2(T) || \
AXIS_DRIVER_TYPE_E0(T) || AXIS_DRIVER_TYPE_E1(T) || \
AXIS_DRIVER_TYPE_E2(T) || AXIS_DRIVER_TYPE_E3(T) || \
AXIS_DRIVER_TYPE_E4(T) )
// Test for supported TMC drivers that require advanced configuration
// Does not match standalone configurations
#define HAS_TRINAMIC (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208))
#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE_##A(TMC2130) || \
AXIS_DRIVER_TYPE_##A(TMC2208) )
#endif // _DRIVERS_H_

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,9 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../HAL/shared/Marduino.h"
#ifndef __DURATION_T__
#define __DURATION_T__
#include <stdio.h>
#include <inttypes.h>
struct duration_t {
/**
@@ -120,7 +123,7 @@ struct duration_t {
* 59m 59s
* 59s
*/
char* toString(char * const buffer) const {
void toString(char *buffer) const {
int y = this->year(),
d = this->day() % 365,
h = this->hour() % 24,
@@ -132,7 +135,6 @@ struct duration_t {
else if (h) sprintf_P(buffer, PSTR("%ih %im %is"), h, m, s);
else if (m) sprintf_P(buffer, PSTR("%im %is"), m, s);
else sprintf_P(buffer, PSTR("%is"), s);
return buffer;
}
/**
@@ -151,16 +153,18 @@ struct duration_t {
m = uint16_t(this->minute() % 60UL);
if (with_days) {
uint16_t d = this->day();
sprintf_P(buffer, PSTR("%hud %02hu:%02hu"), d, h % 24, m);
sprintf_P(buffer, PSTR("%ud %02u:%02u"), d, h % 24, m);
return d >= 10 ? 9 : 8;
}
else if (h < 100) {
sprintf_P(buffer, PSTR("%02hu:%02hu"), h, m);
sprintf_P(buffer, PSTR("%02u:%02u"), h, m);
return 5;
}
else {
sprintf_P(buffer, PSTR("%hu:%02hu"), h, m);
sprintf_P(buffer, PSTR("%u:%02u"), h, m);
return 6;
}
}
};
#endif // __DURATION_T__

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,19 +24,15 @@
* emergency_parser.cpp - Intercept special commands directly in the serial stream
*/
#include "../inc/MarlinConfigPre.h"
#include "MarlinConfig.h"
#if ENABLED(EMERGENCY_PARSER)
#include "emergency_parser.h"
// Static data members
bool EmergencyParser::killed_by_M112, // = false
EmergencyParser::enabled;
#if ENABLED(HOST_PROMPT_SUPPORT)
uint8_t EmergencyParser::M876_reason; // = 0
#endif
bool EmergencyParser::killed_by_M112; // = false
EmergencyParser::State EmergencyParser::state; // = EP_RESET
// Global instance
EmergencyParser emergency_parser;

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,27 +19,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* emergency_parser.h - Intercept special commands directly in the serial stream
*/
#include "../inc/MarlinConfigPre.h"
#if ENABLED(HOST_PROMPT_SUPPORT)
#include "host_actions.h"
#endif
#ifndef _EMERGENCY_PARSER_H_
#define _EMERGENCY_PARSER_H_
// External references
extern bool wait_for_user, wait_for_heatup;
extern volatile bool wait_for_user, wait_for_heatup;
void quickstop_stepper();
class EmergencyParser {
public:
// Currently looking for: M108, M112, M410, M876
// Currently looking for: M108, M112, M410
enum State : char {
EP_RESET,
EP_N,
@@ -52,29 +48,17 @@ public:
EP_M4,
EP_M41,
EP_M410,
#if ENABLED(HOST_PROMPT_SUPPORT)
EP_M8,
EP_M87,
EP_M876,
EP_M876S,
EP_M876SN,
#endif
EP_IGNORE // to '\n'
};
static bool killed_by_M112;
static State state;
#if ENABLED(HOST_PROMPT_SUPPORT)
static uint8_t M876_reason;
#endif
EmergencyParser() {}
EmergencyParser() { enable(); }
__attribute__((always_inline)) inline
static void update(const uint8_t c) {
FORCE_INLINE static void enable() { enabled = true; }
FORCE_INLINE static void disable() { enabled = false; }
FORCE_INLINE static void update(State &state, const uint8_t c) {
switch (state) {
case EP_RESET:
switch (c) {
@@ -101,9 +85,6 @@ public:
case ' ': break;
case '1': state = EP_M1; break;
case '4': state = EP_M4; break;
#if ENABLED(HOST_PROMPT_SUPPORT)
case '8': state = EP_M8; break;
#endif
default: state = EP_IGNORE;
}
break;
@@ -132,59 +113,32 @@ public:
state = (c == '0') ? EP_M410 : EP_IGNORE;
break;
#if ENABLED(HOST_PROMPT_SUPPORT)
case EP_M8:
state = (c == '7') ? EP_M87 : EP_IGNORE;
break;
case EP_M87:
state = (c == '6') ? EP_M876 : EP_IGNORE;
break;
case EP_M876:
switch (c) {
case ' ': break;
case 'S': state = EP_M876S; break;
default: state = EP_IGNORE; break;
}
break;
case EP_M876S:
switch (c) {
case ' ': break;
case '0': case '1': case '2':
case '3': case '4': case '5':
case '6': case '7': case '8':
case '9':
state = EP_M876SN;
M876_reason = (uint8_t)(c - '0');
break;
}
break;
#endif
case EP_IGNORE:
if (c == '\n') state = EP_RESET;
break;
default:
if (c == '\n') {
if (enabled) switch (state) {
case EP_M108: wait_for_user = wait_for_heatup = false; break;
case EP_M112: killed_by_M112 = true; break;
case EP_M410: quickstop_stepper(); break;
#if ENABLED(HOST_PROMPT_SUPPORT)
case EP_M876SN: host_response_handler(M876_reason); break;
#endif
default: break;
switch (state) {
case EP_M108:
wait_for_user = wait_for_heatup = false;
break;
case EP_M112:
killed_by_M112 = true;
break;
case EP_M410:
quickstop_stepper();
break;
default:
break;
}
state = EP_RESET;
}
}
}
private:
static bool enabled;
};
extern EmergencyParser emergency_parser;
#endif // _EMERGENCY_PARSER_H_

239
Marlin/endstop_interrupts.h Normal file
View File

@@ -0,0 +1,239 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Endstop Interrupts
*
* Without endstop interrupts the endstop pins must be polled continually in
* the temperature-ISR via endstops.update(), most of the time finding no change.
* With this feature endstops.update() is called only when we know that at
* least one endstop has changed state, saving valuable CPU cycles.
*
* This feature only works when all used endstop pins can generate either an
* 'external interrupt' or a 'pin change interrupt'.
*
* Test whether pins issue interrupts on your board by flashing 'pin_interrupt_test.ino'.
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
*/
#ifndef _ENDSTOP_INTERRUPTS_H_
#define _ENDSTOP_INTERRUPTS_H_
#include "macros.h"
// One ISR for all EXT-Interrupts
void endstop_ISR(void) { endstops.update(); }
/**
* Patch for pins_arduino.h (...\Arduino\hardware\arduino\avr\variants\mega\pins_arduino.h)
*
* These macros for the Arduino MEGA do not include the two connected pins on Port J (D13, D14).
* So we extend them here because these are the normal pins for Y_MIN and Y_MAX on RAMPS.
* There are more PCI-enabled processor pins on Port J, but they are not connected to Arduino MEGA.
*/
#if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA)
#undef digitalPinToPCICR
#define digitalPinToPCICR(p) ( WITHIN(p, 10, 15) || \
WITHIN(p, 50, 53) || \
WITHIN(p, 62, 69) ? &PCICR : (uint8_t*)0 )
#undef digitalPinToPCICRbit
#define digitalPinToPCICRbit(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \
WITHIN(p, 14, 15) ? 1 : \
WITHIN(p, 62, 69) ? 2 : \
0 )
#undef digitalPinToPCMSK
#define digitalPinToPCMSK(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? &PCMSK0 : \
WITHIN(p, 14, 15) ? &PCMSK1 : \
WITHIN(p, 62, 69) ? &PCMSK2 : \
(uint8_t *)0 )
#undef digitalPinToPCMSKbit
#define digitalPinToPCMSKbit(p) ( WITHIN(p, 10, 13) ? ((p) - 6) : \
(p) == 14 || (p) == 51 ? 2 : \
(p) == 15 || (p) == 52 ? 1 : \
(p) == 50 ? 3 : \
(p) == 53 ? 0 : \
WITHIN(p, 62, 69) ? ((p) - 62) : \
0 )
#endif
// Install Pin change interrupt for a pin. Can be called multiple times.
void pciSetup(const int8_t pin) {
SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin
SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
}
// Handlers for pin change interrupts
#ifdef PCINT0_vect
ISR(PCINT0_vect) { endstop_ISR(); }
#endif
#ifdef PCINT1_vect
ISR(PCINT1_vect) { endstop_ISR(); }
#endif
#ifdef PCINT2_vect
ISR(PCINT2_vect) { endstop_ISR(); }
#endif
#ifdef PCINT3_vect
ISR(PCINT3_vect) { endstop_ISR(); }
#endif
void setup_endstop_interrupts( void ) {
#if HAS_X_MAX
#if digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT // if pin has an external interrupt
attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(X_MAX_PIN) != NULL, "X_MAX_PIN is not interrupt-capable"); // if pin has no pin change interrupt - error
pciSetup(X_MAX_PIN); // assign it
#endif
#endif
#if HAS_X_MIN
#if digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(X_MIN_PIN) != NULL, "X_MIN_PIN is not interrupt-capable");
pciSetup(X_MIN_PIN);
#endif
#endif
#if HAS_Y_MAX
#if digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Y_MAX_PIN) != NULL, "Y_MAX_PIN is not interrupt-capable");
pciSetup(Y_MAX_PIN);
#endif
#endif
#if HAS_Y_MIN
#if digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable");
pciSetup(Y_MIN_PIN);
#endif
#endif
#if HAS_Z_MAX
#if digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Z_MAX_PIN) != NULL, "Z_MAX_PIN is not interrupt-capable");
pciSetup(Z_MAX_PIN);
#endif
#endif
#if HAS_Z_MIN
#if digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Z_MIN_PIN) != NULL, "Z_MIN_PIN is not interrupt-capable");
pciSetup(Z_MIN_PIN);
#endif
#endif
#if HAS_X2_MAX
#if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
attachInterrupt(digitalPinToInterrupt(X2_MAX_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(X2_MAX_PIN) != NULL, "X2_MAX_PIN is not interrupt-capable");
pciSetup(X2_MAX_PIN);
#endif
#endif
#if HAS_X2_MIN
#if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
attachInterrupt(digitalPinToInterrupt(X2_MIN_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(X2_MIN_PIN) != NULL, "X2_MIN_PIN is not interrupt-capable");
pciSetup(X2_MIN_PIN);
#endif
#endif
#if HAS_Y2_MAX
#if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
attachInterrupt(digitalPinToInterrupt(Y2_MAX_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Y2_MAX_PIN) != NULL, "Y2_MAX_PIN is not interrupt-capable");
pciSetup(Y2_MAX_PIN);
#endif
#endif
#if HAS_Y2_MIN
#if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
attachInterrupt(digitalPinToInterrupt(Y2_MIN_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Y2_MIN_PIN) != NULL, "Y2_MIN_PIN is not interrupt-capable");
pciSetup(Y2_MIN_PIN);
#endif
#endif
#if HAS_Z2_MAX
#if digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Z2_MAX_PIN) != NULL, "Z2_MAX_PIN is not interrupt-capable");
pciSetup(Z2_MAX_PIN);
#endif
#endif
#if HAS_Z2_MIN
#if digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Z2_MIN_PIN) != NULL, "Z2_MIN_PIN is not interrupt-capable");
pciSetup(Z2_MIN_PIN);
#endif
#endif
#if HAS_Z_MIN_PROBE_PIN
#if digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
#else
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
static_assert(digitalPinToPCICR(Z_MIN_PROBE_PIN) != NULL, "Z_MIN_PROBE_PIN is not interrupt-capable");
pciSetup(Z_MIN_PROBE_PIN);
#endif
#endif
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
}
#endif // _ENDSTOP_INTERRUPTS_H_

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,54 +19,60 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* endstops.h - manages endstops
*/
#include "../inc/MarlinConfig.h"
#include <stdint.h>
#ifndef __ENDSTOPS_H__
#define __ENDSTOPS_H__
#include "MarlinConfig.h"
#define VALIDATE_HOMING_ENDSTOPS
enum EndstopEnum : char {
X_MIN, Y_MIN, Z_MIN, Z_MIN_PROBE,
X_MAX, Y_MAX, Z_MAX,
X2_MIN, X2_MAX,
Y2_MIN, Y2_MAX,
Z2_MIN, Z2_MAX,
Z3_MIN, Z3_MAX,
Z4_MIN, Z4_MAX
X_MIN,
Y_MIN,
Z_MIN,
Z_MIN_PROBE,
X_MAX,
Y_MAX,
Z_MAX,
X2_MIN,
X2_MAX,
Y2_MIN,
Y2_MAX,
Z2_MIN,
Z2_MAX
};
class Endstops {
public:
#if HAS_EXTRA_ENDSTOPS
static bool enabled, enabled_globally;
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
typedef uint16_t esbits_t;
#if ENABLED(X_DUAL_ENDSTOPS)
static float x2_endstop_adj;
static float x_endstop_adj;
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
static float y2_endstop_adj;
static float y_endstop_adj;
#endif
#if ENABLED(Z_MULTI_ENDSTOPS)
static float z2_endstop_adj;
#endif
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
static float z3_endstop_adj;
#endif
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
static float z4_endstop_adj;
#if ENABLED(Z_DUAL_ENDSTOPS)
static float z_endstop_adj;
#endif
#else
typedef uint8_t esbits_t;
#endif
private:
static bool enabled, enabled_globally;
static esbits_t live_state;
static volatile uint8_t hit_state; // Use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT index
#if ENDSTOP_NOISE_THRESHOLD
#if ENABLED(ENDSTOP_NOISE_FILTER)
static esbits_t validated_live_state;
static uint8_t endstop_poll_count; // Countdown from threshold for polling
#endif
@@ -90,8 +96,6 @@ class Endstops {
);
}
static inline bool global_enabled() { return enabled_globally; }
/**
* Periodic call to poll endstops if required. Called from temperature ISR
*/
@@ -114,7 +118,7 @@ class Endstops {
*/
FORCE_INLINE static esbits_t state() {
return
#if ENDSTOP_NOISE_THRESHOLD
#if ENABLED(ENDSTOP_NOISE_FILTER)
validated_live_state
#else
live_state
@@ -128,9 +132,9 @@ class Endstops {
static void event_handler();
/**
* Report endstop states in response to M119
* Report endstop positions in response to M119
*/
static void report_states();
static void M119();
// Enable / disable endstop checking globally
static void enable_globally(const bool onoff=true);
@@ -157,40 +161,14 @@ class Endstops {
static void enable_z_probe(const bool onoff=true);
#endif
static void resync();
// Debugging of endstops
#if ENABLED(PINS_DEBUGGING)
static bool monitor_flag;
static void monitor();
static void run_monitor();
#endif
#if ENABLED(SPI_ENDSTOPS)
typedef struct {
union {
bool any;
struct { bool x:1, y:1, z:1; };
};
} tmc_spi_homing_t;
static tmc_spi_homing_t tmc_spi_homing;
static void clear_endstop_state();
static bool tmc_spi_homing_check();
#endif
};
extern Endstops endstops;
/**
* A class to save and change the endstop state,
* then restore it when it goes out of scope.
*/
class TemporaryGlobalEndstopsState {
bool saved;
public:
TemporaryGlobalEndstopsState(const bool enable) : saved(endstops.global_enabled()) {
endstops.enable_globally(enable);
}
~TemporaryGlobalEndstopsState() { endstops.enable_globally(saved); }
};
#endif // __ENDSTOPS_H__

175
Marlin/enum.h Normal file
View File

@@ -0,0 +1,175 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __ENUM_H__
#define __ENUM_H__
#include "MarlinConfig.h"
/**
* Axis indices as enumerated constants
*
* - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
* - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
* - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
*/
enum AxisEnum : unsigned char {
X_AXIS = 0,
A_AXIS = 0,
Y_AXIS = 1,
B_AXIS = 1,
Z_AXIS = 2,
C_AXIS = 2,
E_CART = 3,
#if ENABLED(HANGPRINTER) // Hangprinter order: A_AXIS, B_AXIS, C_AXIS, D_AXIS, E_AXIS
D_AXIS = 3,
E_AXIS = 4,
#else
E_AXIS = 3,
#endif
X_HEAD, Y_HEAD, Z_HEAD,
ALL_AXES = 0xFE,
NO_AXIS = 0xFF
};
#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR<N; VAR++)
#define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
#define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)
#define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
#define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_CART)
#define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
#define LOOP_MOV_AXIS(VAR) LOOP_S_L_N(VAR, A_AXIS, MOV_AXIS)
#define LOOP_NUM_AXIS(VAR) LOOP_S_L_N(VAR, A_AXIS, NUM_AXIS)
#define LOOP_NUM_AXIS_N(VAR) LOOP_S_L_N(VAR, A_AXIS, NUM_AXIS_N)
typedef enum {
LINEARUNIT_MM,
LINEARUNIT_INCH
} LinearUnit;
typedef enum {
TEMPUNIT_C,
TEMPUNIT_K,
TEMPUNIT_F
} TempUnit;
/**
* Debug flags
* Not yet widely applied
*/
enum DebugFlags : unsigned char {
DEBUG_NONE = 0,
DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed
DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output
DEBUG_ERRORS = _BV(2), ///< Not implemented
DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands
DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling
DEBUG_MESH_ADJUST = _BV(6), ///< UBL bed leveling
DEBUG_ALL = 0xFF
};
#if ENABLED(ADVANCED_PAUSE_FEATURE)
enum AdvancedPauseMenuResponse : char {
ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
};
#if ENABLED(ULTIPANEL)
enum AdvancedPauseMessage : char {
ADVANCED_PAUSE_MESSAGE_INIT,
ADVANCED_PAUSE_MESSAGE_UNLOAD,
ADVANCED_PAUSE_MESSAGE_INSERT,
ADVANCED_PAUSE_MESSAGE_LOAD,
ADVANCED_PAUSE_MESSAGE_PURGE,
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE,
#endif
ADVANCED_PAUSE_MESSAGE_OPTION,
ADVANCED_PAUSE_MESSAGE_RESUME,
ADVANCED_PAUSE_MESSAGE_STATUS,
ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE,
ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
};
#endif
enum AdvancedPauseMode : char {
ADVANCED_PAUSE_MODE_PAUSE_PRINT,
ADVANCED_PAUSE_MODE_LOAD_FILAMENT,
ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT
};
#endif
/**
* States for managing Marlin and host communication
* Marlin sends messages if blocked or busy
*/
#if ENABLED(HOST_KEEPALIVE_FEATURE)
enum MarlinBusyState : char {
NOT_BUSY, // Not in a handler
IN_HANDLER, // Processing a GCode
IN_PROCESS, // Known to be blocking command input (as in G29)
PAUSED_FOR_USER, // Blocking pending any input
PAUSED_FOR_INPUT // Blocking pending text input (concept)
};
#endif
/**
* SD Card
*/
enum LsAction : char { LS_SerialPrint, LS_Count, LS_GetFilename };
/**
* Ultra LCD
*/
enum LCDViewAction : char {
LCDVIEW_NONE,
LCDVIEW_REDRAW_NOW,
LCDVIEW_CALL_REDRAW_NEXT,
LCDVIEW_CLEAR_CALL_REDRAW,
LCDVIEW_CALL_NO_REDRAW
};
/**
* Dual X Carriage modes. A Dual Nozzle can also do duplication.
*/
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
enum DualXMode : char {
DXC_FULL_CONTROL_MODE, // DUAL_X_CARRIAGE only
DXC_AUTO_PARK_MODE, // DUAL_X_CARRIAGE only
DXC_DUPLICATION_MODE
};
#endif
/**
* Workspace planes only apply to G2/G3 moves
* (and "canned cycles" - not a current feature)
*/
#if ENABLED(CNC_WORKSPACE_PLANES)
enum WorkspacePlane : char { PLANE_XY, PLANE_ZX, PLANE_YZ };
#endif
#endif // __ENUM_H__

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
This is an example configuration for the CL-260 Ultimaker 2 clone.
Change Z_MAX_POS to 300 for the CL-260MAX.
(The printer is available on AliExpress; be aware that this is not a beginner's
printer -- it needs tweaking and some parts replaced before being decent.)
The printer comes with a quite old Marlin, the sources are available here:
http://www.thingiverse.com/thing:1635830/ and I recommend replacing them.
The setting "works" for my printer and the extruder using my calibration value.
You might want to tweak some settings, e.g enable EEPROM, increase default Z speed, adjust homing speeds,...
Have fun!
--
tobi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More