Compare commits

..

4371 Commits

Author SHA1 Message Date
Jason Pepas
2b4c269991 📌 Fixed versions for library, toolchain (#24784) 2022-09-26 16:19:58 -05:00
Scott Lahteine
b7806f863b Add missing thermistor names
Fixes #17903

Co-Authored-By: SantinoDnepr <santinodnepr@users.noreply.github.com>
2020-05-10 05:03:08 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
367e1b54ba Merge pull request #7591 from thinkyhead/bf1_misc_patches
M111: no args reports current flags
2017-08-31 15:19:29 -05:00
Scott Lahteine
41e4de62b3 Merge pull request #7592 from thinkyhead/bf1_workspace_planes
CNC workspace planes for G5
2017-08-31 15:18:15 -05:00
Scott Lahteine
8a184a526a Marlin: Patch G33, allow M111 to give status 2017-08-31 14:35:00 -05:00
Scott Lahteine
353c23b16e Enforce BED_CENTER_AT_0_0 on Delta, SCARA 2017-08-31 14:34:59 -05:00
Scott Lahteine
898f48e331 CNC workspace planes for G5
According to LinuxCNC, G5 should throw an error if the current plane mode isn't XY.
2017-08-31 14:29:29 -05:00
Scott Lahteine
5851c2d36f MAX7219 followup (#7564)
* Add MAX7219_DEBUG to Travis CI testing

* Tweak config and use standard pin naming for MAX7219_DEBUG

* MAX7219: Apply coding standards, use macros, etc.

* Make code work...
2017-08-31 11:44:43 -05:00
Scott Lahteine
52073f21c5 Merge pull request #7556 from thinkyhead/bf1_slovak_language
Slovak UTF-8 translation
2017-08-27 21:05:53 -05:00
Scott Lahteine
321f98f867 Fix servo delay in Folgertech config 2017-08-27 20:53:27 -05:00
Scott Lahteine
9721c77fb9 Merge pull request #7577 from thinkyhead/bf1_creality_fix
Fixes required for Creality CR-10
2017-08-27 20:51:15 -05:00
jneilliii
36771e9492 Fixes required for Creality CR-10 2017-08-27 20:39:16 -05:00
Roxy-3D
3f0b38ed5d Add Max7219 LED Matrix Debug Support (#7563)
* Add Max7219 LED Matrix Debug Support

The Max7219 8x8 LED Matrix's are very helpful for debugging new code.
And for that matter, just trying to maximize printer settings without
causing stuttering.

The displays are very inexpensive (under $2.00 with shipping) and
provide a lot of help when trying to debug complicated code.

* Try to keep Makefile up to date.
2017-08-25 17:03:07 -05:00
Scott Lahteine
ca9734805c Merge pull request #7560 from thinkyhead/bf1_m406_patch
Addressing #7552
2017-08-25 03:38:41 -05:00
GMagician
0067bb2840 Addressing #7552
When M405 is used it changes 'volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]' value. When M406 disables M405 it leaves the value unchanged.
This PR applies 'calculate_volumetric_multipliers' in M406 instead of resetting it to 1.0 because M200 may not be compatible with M405 hence I'm sure to restore anyway with correct value.
2017-08-25 03:23:16 -05:00
Scott Lahteine
2b12093589 Merge pull request #7532 from thinkyhead/bf1_fan_mux_vben
New feature: Part-Cooling Fan Multiplexer
2017-08-25 03:16:40 -05:00
Scott Lahteine
ddfe527ff2 Merge pull request #7554 from thinkyhead/bf1_sanguino_config
Sanguinololu example config
2017-08-23 19:58:05 -05:00
Michal Holes
54d48130f3 Slovak UTF-8 translation
Slovak UTF-8 translation
2017-08-23 19:14:35 -05:00
Scott Lahteine
86c024ce98 Organize, document pins.h include lines 2017-08-23 18:33:00 -05:00
Scott Lahteine
c7b07d20f2 Minor patches to pins files 2017-08-23 18:32:59 -05:00
Scott Lahteine
356af7dcb0 Tweak Sanguinololu-related pins files 2017-08-23 18:32:59 -05:00
Scott Lahteine
11a724d8fc Sanguinololu example configuration 2017-08-23 18:32:59 -05:00
Scott Lahteine
d29bf49b66 Add Sanguino 644p to ENV for PlatformIO 2017-08-23 18:32:58 -05:00
Scott Lahteine
e337df2e98 Miscellaneous tweaks to serial outputs, code cleanups 2017-08-23 18:32:58 -05:00
Vben
c0409b85e7 New feature: Part-Cooling Fan Multiplexer 2017-08-18 15:59:04 -05:00
Scott Lahteine
e82e9073d6 Merge pull request #7530 from GMagician/Code-reduction
Code reduction with some configurations
2017-08-18 13:57:59 -05:00
Scott Lahteine
69d1052010 Merge pull request #7529 from GMagician/My-bugfix-1.1.x
#7528 fix
2017-08-18 13:57:22 -05:00
GMagician
6127154af3 Fix identation by tab
There was a tab instead of spaces
2017-08-18 11:34:55 +02:00
GMagician
b94a1c6b9f Code reduction this some configurations
When switching noozle and extruder but these operations are done by the same servo in 'setup' function there is a unnecessary call
2017-08-18 11:11:00 +02:00
GMagician
405a2132f3 #7529 compile fix
I made an error in previous fix
2017-08-17 22:04:28 +02:00
GMagician
869d7f3703 #7504 missing part
#7504 integration has missed this part.
When more than 1 servo is used with bltouch it's impossible to predefine default servo delay for it.
In my original fix I completely removed this part but maybe this is a better compromise
2017-08-17 21:43:47 +02:00
Scott Lahteine
101ba70517 Merge pull request #7505 from thinkyhead/bf1_anet_1_pio
Add Anet 1.0 to Platformio.ini
2017-08-17 00:33:20 -05:00
Scott Lahteine
5e14bb61de Merge pull request #7506 from thinkyhead/bf1_dual_parking_extruder
AutoParking Extruder (APE)
2017-08-17 00:32:20 -05:00
Vben
4817b39d98 Added new feature for AutoParking Extruder (APE) 2017-08-16 17:33:11 -05:00
Scott Lahteine
6772e33ef6 Use [XY]_CENTER for error correction
Followup to #7512
2017-08-16 16:13:09 -05:00
Scott Lahteine
385f1bb9e5 Merge pull request #7504 from thinkyhead/bf1_servo_delays
Individual servo delays
2017-08-16 16:05:22 -05:00
Scott Lahteine
2a31c9f2ce Merge pull request #7515 from cdedwards/bugfix-1.1.x
Fix for G26 spam output
2017-08-16 16:01:10 -05:00
MTrab
5fa61c0ad3 Add Anet 1.0 to Platformio.ini
Added env:anet10 to platformio.ini for easy compile and upload to this board
2017-08-16 15:59:20 -05:00
Scott Lahteine
b3f59ec945 Merge pull request #7519 from thinkyhead/bf1_cleanups_aug_16
Add "Level Corners" menu item
2017-08-16 15:58:15 -05:00
Tannoo
b33739d493 UBL_Language_Update (#7520)
* UBL_Language_Update

Translatable strings

* Use slightly better wording...

* Use slightly better wording...
2017-08-16 09:49:04 -05:00
Scott Lahteine
a1878cd1c0 Add "Level Corners" menu option 2017-08-16 02:54:33 -05:00
Scott Lahteine
0a18fb735e Use "PSU" label to fit on screen 2017-08-16 02:51:00 -05:00
Scott Lahteine
30887feae3 Tweak some formatting in ABL G29 2017-08-16 02:51:00 -05:00
Thomas Moore
257b693ab0 Advanced pause fixes (#7518)
* Disallow filament change while paused

* Use kinematic movemements in pause_print and resume_print
2017-08-15 22:57:13 -05:00
Tannoo
ab2ac1af71 UBL_LCD_storage_corrections (#7517)
Correcting the storage selection.
Also EEPROM error handling on the LCD.
2017-08-15 21:01:11 -05:00
cdedwards
f1843211e6 Fix for G26 spam output
while heating, G26 will continuously spam the heater states instead of printing it out every 5000ms.
2017-08-15 17:04:53 -06:00
Roxy-3D
be5ca34215 Allow G29 to work correctly even if nozzle is off the mesh. (#7512)
* work around previous regressions...
2017-08-15 17:04:52 -05:00
Scott Lahteine
06541ec885 Merge pull request #7448 from thinkyhead/bf1_delta_fixes
Prevent damage if DELTA_HEIGHT is set badly
2017-08-15 16:35:09 -05:00
GMagician
e9c72978c7 Implement SERVO_DELAY as array
This modify give SERVO_DELAY x servo basis
2017-08-15 00:28:47 -05:00
Scott Lahteine
96ae53cf41 Use MOVE_SERVO macro where possible 2017-08-15 00:28:39 -05:00
Scott Lahteine
6172f150c2 Merge pull request #7471 from thinkyhead/bf1_cleanups_aug9
Miscellaneous style tweaks
2017-08-15 00:12:37 -05:00
Scott Lahteine
3be9c19f12 Hold on move axis screens 2017-08-14 22:51:47 -05:00
Scott Lahteine
8fd58cd6dc Patch goto labels for consistency 2017-08-14 22:51:47 -05:00
Scott Lahteine
75e6f72c89 Fix hexadecimal number formatting 2017-08-14 22:50:44 -05:00
Scott Lahteine
ac76101ec3 Eliminate goto in gcode_M48 2017-08-11 17:00:40 -05:00
Scott Lahteine
75e6ead5fd Eliminate goto in gcode_G33 2017-08-11 17:00:40 -05:00
Scott Lahteine
6bd63d27b5 Updates to G29 for probe error handling 2017-08-11 17:00:40 -05:00
Thomas Moore
f54e0fc90f Prevent damage if DELTA_HEIGHT is incorrect 2017-08-11 16:09:14 -05:00
Scott Lahteine
0938c62b48 Neater position_is_reachable call 2017-08-11 15:55:32 -05:00
Scott Lahteine
9d95b1b4df Tweak Conditionals_post.h 2017-08-11 15:55:32 -05:00
Scott Lahteine
35d5a7bdff Tweak CR-10 config/pins 2017-08-11 15:55:31 -05:00
Scott Lahteine
419c8969a7 Merge pull request #7479 from thinkyhead/bf1_fix_italian
Fix Italian string length
2017-08-10 18:42:35 -05:00
Frederik Kemner
25a11cd485 Use bed size and inset instead of travel limits to define mesh area\n\nAs proposed in #7435 (#7480) 2017-08-10 16:53:04 -05:00
Scott Lahteine
7f3406d47b Fix Italian string length
Addressing #7264
2017-08-10 15:41:35 -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
6440904c1c Merge pull request #7442 from thinkyhead/bf1_geeetech_gt2560_revs
Support for Geeetech GT2560 Rev.A/Rev.A+
2017-08-06 00:45:12 -05:00
Jozsef Kiraly
97c21e9007 Support for Geeetech GT2560 Rev.A/Rev.A+ 2017-08-06 00:42:54 -05:00
Scott Lahteine
82cfdd4d8f Merge pull request #7437 from thinkyhead/bf1_geeetech_config
Geeetech I3 Pro X + GT2560 Config
2017-08-05 03:58:47 -05:00
Scott Lahteine
b2822a59f9 Add a sanity check for valid bed size 2017-08-05 03:49:04 -05:00
Scott Lahteine
a7e5c1bf19 Use float to init TMC2133 steps-per-mm 2017-08-05 03:48:52 -05:00
Scott Lahteine
dd66d21749 Extend DEACTIVATE_SERVOS_AFTER_MOVE sanity-check
As proposed in #7429
2017-08-05 03:48:52 -05:00
richarddeweerd
b370906031 Example config for Geeetech I3 Pro X with GT2560 controller 2017-08-05 03:48:52 -05:00
Scott Lahteine
804818b4d9 Bring configs up to date 2017-08-05 03:48:52 -05:00
Scott Lahteine
dd841a3675 Merge pull request #7410 from benlye/user-script-feedback
Make audible user script feedback optional
2017-08-05 02:59:56 -05:00
Florian Heilmann
0fd2923a9f Fix compilation with ADVANCED_PAUSE_FEATURE without SDSUPPORT (#7412)
* Fix compilation of ADVANCED_PAUSE_FEATURE without SDSUPPORT

* Fix Identation

* Make use of IS_SD_PRINTING macro

as per @MagoKimbra
2017-08-05 02:58:38 -05:00
Scott Lahteine
8b97da0e3d Merge pull request #7420 from benlye/patch-1
Add VScode directory to .gitignore
2017-08-05 02:57:07 -05:00
Scott Lahteine
db188934d1 Merge pull request #7432 from FHeilmann/bf_update_de_translation
Update language_de.h v2
2017-08-05 02:53:32 -05:00
benlye
24af9e1bf4 Make audible user script feedback optional
Add a parameter to enable/disable audible user script feedback
2017-08-04 17:24:10 +01:00
Ben Lye
8443872d10 Ignore VScode directory
PlatformIO can be used with VSCode.  VSCode creates a .vscode directory which should be ignored.
2017-08-04 08:50:03 +01:00
Florian Heilmann
6827a162bb Update language_de.h
Add
MSG_BLTOUCH                    
MSG_DELTA_SETTINGS            
MSG_UBL_MESH_EDIT                
MSG_UBL_OUTPUT_MAP_BACKUP        
MSG_UBL_STEP_BY_STEP_MENU       
MSG_Z_FADE_HEIGHT
2017-08-04 09:35:21 +02:00
Scott Lahteine
43d298a324 Merge pull request #7430 from thinkyhead/bf1_fix_dualx
Followup cleanup patch
2017-08-03 16:41:49 -05:00
Scott Lahteine
3497153cf1 Followup cleanup patch
Fix regression in #7428
2017-08-03 14:55:22 -05:00
Scott Lahteine
16f8c4865a Merge pull request #7409 from FHeilmann/bf_update_ru_translation
Update Russian Translation
2017-08-03 14:54:40 -05:00
Scott Lahteine
50bfcf4c3e Merge pull request #7428 from thinkyhead/bf1_cleanup_aug_3
Clean up whitespace, trailing space, bad tab conversion, etc.
2017-08-03 14:30:33 -05:00
Scott Lahteine
622048ffb0 Clean up whitespace, trailing space, bad tab conversion, etc. 2017-08-03 11:20:03 -05:00
Dave Johnson
65a36948c0 Support travis new build environment (#7425)
move from legacy precise to trusty build image
fix PATH not including buildroot/bin
remove symolic link to ~/bin
enable sudo

trusty travis image doesn't source ~/bin by default
avr requires sude
2017-08-03 10:33:53 -05:00
Dave Johnson
c6509076c4 Force legacy "precise" build dist for TravisCI (#7422)
TravisCI "trusty" build dist isn't picking up build path causing travis checks to fail.  Reverting to legacy "precise" dist while we investigate

pristine != precise
2017-08-03 09:06:59 -05:00
Roxy-3D
2cbdc0ebb6 Fix large Z corrections when nozzle moves off of UBL mesh (#7415) 2017-08-02 16:51:04 -05:00
Florian Heilmann
650e5274c4 Update Russian Translation 2017-08-02 21:19:15 +02:00
Scott Lahteine
ce65c13a97 Merge pull request #7398 from fiveangle/bf_lcd_bed_level_requirements
Clarify LCD_BED_LEVELING requirements
2017-08-01 17:46:07 -05:00
Scott Lahteine
6ef71c3d5f Merge pull request #7397 from Kaibob2/patch-4
Fix for #7395
2017-08-01 17:40:59 -05:00
Dave Johnson
936dfb965c Clarify LCD_BED_LEVELING requirements
LCD_BED_LEVELING requires PROBE_MANUALLY with auto bed leveling enabled.  See #7396
2017-08-01 14:13:54 -07:00
Kai
ffe3013bb5 Fix for #7395
Filament change causes freeze during paused print. This PR disables Filament change in the prepare menu when a print from SD Card is paused. See #7395
2017-08-01 21:45:41 +02:00
Scott Lahteine
7ef0650504 Merge pull request #7386 from oysteinkrog/fix/DualX
Fix DUAL_X_CARRIAGE movement
2017-07-31 20:30:06 -05:00
Øystein Krog
e948f77cf9 Fix DUAL_X_CARRIAGE not moving at all
Axis would only move when homing.
Bug introduced in 91841d75c9.
Fixes #6956, fixes #7050 and fixes #7291
2017-07-31 18:44:26 +02:00
Scott Lahteine
08b0456d91 Merge pull request #7379 from thinkyhead/bf_manual_bed_level_floor
Manual Bed Leveling: Goto previous Z height at each probe point
2017-07-30 05:41:12 -05:00
Scott Lahteine
850e404838 Merge pull request #7380 from thinkyhead/bf_touchy_probe_delay
Implement probing delay for piezo sensors
2017-07-30 05:39:45 -05:00
teemuatlut
936d00dda8 Implement probing delay for piezo sensors 2017-07-29 21:46:40 -05:00
Scott Lahteine
29eef360d0 Merge pull request #7308 from thinkyhead/bf_cleanup_config_adv
Fixes for FWRETRACT
2017-07-29 21:20:19 -05:00
Wilfried Chauveau
894608f8a3 Manual Bed Leveling: Goto previous Z height at each probe point 2017-07-29 21:15:37 -05:00
Scott Lahteine
ff06e1a030 Merge pull request #7372 from tcm0116/delta_calib_menu
Move Delta Calibration menu to the Prepare menu
2017-07-29 21:05:03 -05:00
Thomas Moore
15e009b6ca Move Delta Calibration menu to the Prepare menu 2017-07-28 08:33:18 -05:00
Scott Lahteine
8b0bd44b1e Merge pull request #7368 from thinkyhead/bf_fix_warnings
Patch to fix some compiler warnings
2017-07-28 02:53:13 -05:00
Scott Lahteine
bfd396c13a Patch to fix some compiler warnings 2017-07-28 02:27:16 -05:00
Scott Lahteine
48c5f3dddf Tweak kill action #ifdef 2017-07-27 23:42:01 -05:00
Scott Lahteine
be7a9a07c5 Don't reset grid with G29 Q + PROBE_MANUALLY 2017-07-27 22:47:43 -05:00
Scott Lahteine
dfe670247d Merge pull request #7363 from marcio-ao/bugfix-1.1.x
Makefile fixes and U8G support.
2017-07-27 21:31:56 -05:00
Marcio Teixeira
af83c512b8 Added support for U8G. 2017-07-27 07:49:25 -06:00
Scott Lahteine
4eff18854b Rename options with swap_ prefix 2017-07-27 04:14:29 -05:00
Scott Lahteine
14482d2f2a Strip auto-retract for impossible M(IN|AX)_AUTORETRACT combo 2017-07-27 04:14:29 -05:00
Scott Lahteine
9fc72422e4 Don't let the flow multiplier affect retract/recover length 2017-07-27 04:14:29 -05:00
Scott Lahteine
fee696db5d Improve retract() for G10/G11/autoretract 2017-07-27 04:14:29 -05:00
Scott Lahteine
423b0f3a1e Replace MIN_RETRACT with MIN_AUTORETRACT, MAX_AUTORETRACT 2017-07-27 04:14:29 -05:00
Scott Lahteine
283d15a8d0 Add a Travis CI test for FWRETRACT 2017-07-27 04:14:29 -05:00
Scott Lahteine
e52c1a0882 Merge pull request #7341 from thinkyhead/bf_bed_size
Add X_BED_SIZE, Y_BED_SIZE to configurations
2017-07-27 04:05:24 -05:00
Scott Lahteine
5b69d67da9 Merge pull request #7359 from fiveangle/pio_printrboard_revf
Add PIO entry for PRINTRBOARD_REVF
2017-07-26 23:09:06 -05:00
Scott Lahteine
51864fd365 Add bed size as a configuration option 2017-07-26 23:04:54 -05:00
Scott Lahteine
dc7c95e07b Remove @ section fwretract 2017-07-26 22:46:16 -05:00
Scott Lahteine
a972c060d7 Merge pull request #7347 from fiveangle/at90usb_usbcon_unification
Remove extraneous USBCON defines for AT90USB boards
2017-07-26 21:44:18 -05:00
Unknown
42aa10d263 Add PIO entry for PRINTRBOARD_REVF
fix from PIO corruption
2017-07-25 19:09:08 -07:00
Dave Johnson
4718c09c48 Remove extraneous USBCON defines for AT90USB boards
USBCON is definied by serial.h pullikng in MarlinConfig.h which in turn pulls in Arduino.h.  Defining in later includes has shown to cause compile issues so removing all extraneous calls for and potentially easier future linker troubleshooting.
more USBCON unification
2017-07-23 16:41:48 -07:00
Scott Lahteine
21591352d7 Merge pull request #7340 from thinkyhead/bf_neopixel_rgbw
Add support for Printrbot Neopixel RGBW strip.
2017-07-22 16:19:12 -05:00
C. Scott Ananian
890e7a16a9 Add support for Printrbot Neopixel RGBW strip.
Connected as described at http://printrbot.com/shop/led-strip/

Based on patch by Kelly Anderson <kelly@xilka.com> at
http://www.xilka.com/printrbot/marlin/1.1.4/20170707/
2017-07-22 16:07:55 -05:00
Scott Lahteine
a059e95463 Bring Infitary i3 config up to date 2017-07-21 20:49:19 -05:00
Scott Lahteine
d6d6043548 Merge pull request #7338 from thinkyhead/bf_mks_ps_on_pin
MKS 1.3+: Add pin mapping for PS_ON
2017-07-21 20:00:26 -05:00
Scott Lahteine
03989824fa Merge pull request #7339 from thinkyhead/bf_russian_part_1
Update Russian translation - Part 1
2017-07-21 19:57:18 -05:00
Alexey Shvetsov
851f9f5399 Update Russian translation - Part 1
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
2017-07-21 19:32:37 -05:00
Scott Lahteine
b7a16e4468 Merge pull request #7315 from fixoid/patch-1
Fixing SWITCHING_EXTRUDER feature to work with HOTENDS > 1
2017-07-21 19:10:54 -05:00
Alexey Shvetsov
f38b8c5bf8 MKS 1.3+: Add pin mapping for PS_ON
This allows the use of D4 as PS_ON since MKS Gen doesn't have a PS_ON pin. However this effectively allows only 3 servos (instead of 4).

Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
2017-07-21 18:50:05 -05:00
Scott Lahteine
60cb2bd4e7 Merge pull request #7332 from thinkyhead/bf_before_fwretract
Improve FWRETRACT comments
2017-07-21 00:20:56 -05:00
Scott Lahteine
8a3bc6be4d Improve FWRETRACT config options and commentary
Add more details as requested in #7198
2017-07-20 22:57:50 -05:00
Scott Lahteine
b0173ccdb9 Drop extra initializers for vars initialized by EEPROM code 2017-07-20 22:57:49 -05:00
Scott Lahteine
7afafb05b8 Split G10/G11 into separate functions 2017-07-20 02:24:13 -05:00
Scott Lahteine
c45798694f Add some more requirements to the G-code list 2017-07-20 02:24:13 -05:00
Scott Lahteine
72de280c1e BARICUDA valve pressure consistently uint8_t 2017-07-20 02:21:40 -05:00
Scott Lahteine
4d98e3f0a7 General cleanup 2017-07-20 02:21:40 -05:00
fixoid
e530c67349 Fixing SWITCHING_EXTRUDER feature 2017-07-19 21:15:26 +03:00
Tannoo
2ad3ca5d8a Bugfix (#7310) 2017-07-18 22:55:14 -05:00
Roxy-3D
37a6833d7e Allow the sampled point to be added into the Least Squares Best Fit (#7289)
Without this...  The LSF won't work because none of the sampled points
in this code block get added.
2017-07-13 16:33:02 -05:00
C. Scott Ananian
a519b093b9 Fix build by replacing qr_solve by least_squares_fit. (#7285)
This was broken by 9af67e2446.
2017-07-13 12:02:15 -05:00
Scott Lahteine
b9809ea86c Merge pull request #7281 from thinkyhead/bf_seen_not_volatile
Fixes for recent merges
2017-07-13 00:54:10 -05:00
Scott Lahteine
0873c667fa Apply coding standards to recent merges 2017-07-13 00:46:16 -05:00
Scott Lahteine
8c2907d10f Fix ABL broken by recent change 2017-07-12 22:56:18 -05:00
Roxy-3D
9af67e2446 Save 7714 bytes of program memory when doing AUTO_BED_LEVELING_LINEAR (#7276)
We can save more and a pile of RAM by eleminating the eqnBVector and
EqnAMatrix arrays next.
2017-07-10 19:05:11 -05:00
Scott Lahteine
e5904c4df8 Merge pull request #7275 from thinkyhead/bf_seen_not_volatile
Volatile keyword not needed for parser.seen
2017-07-10 16:11:08 -05:00
Scott Lahteine
76e90b93b7 Volatile keyword not needed for parser.seen 2017-07-10 15:38:54 -05:00
Scott Lahteine
f63f1ff12c Merge pull request #7272 from thinkyhead/bf_user_menu_stay
Stay in User Menu after command. Add feedback.
2017-07-10 15:10:07 -05:00
Jamie Bainbridge
00e4ced58e Stay in User Menu after command. Add feedback.
When a user executes a User Menu command, the LCD returns to the main menu. If the user has multiple menu items they want to run, such as one menu item per bed leveling corner, then it's better to stay in the User Menu rather than return to the main menu.

This PR modifies Marlin to stay in the User Menu after a command.
2017-07-10 13:47:12 -05:00
Scott Lahteine
1066b17457 Merge pull request #7260 from thinkyhead/bf_G33_update_27
Updates to G33 and its LCD code
2017-07-10 13:39:36 -05:00
Tannoo
e927941c06 Bugfix (#7265)
Fix compile error when UBL is enabled but there is no LCD Panel.
2017-07-08 09:44:50 -05:00
Scott Lahteine
68aea9c01d Merge pull request #7261 from thinkyhead/bf_configs_by_vendor
Arrange more example configs by vendor
2017-07-07 15:46:22 -05:00
Tannoo
aaacef9441 Corrections (#7231)
20x4 map integration.    Also some minor changes to the UBL Menu layout.     Both 20x4 LCD's and Graphical LCD panels should have similar functionality now.
2017-07-07 11:05:08 -05:00
LVD-AC
4bc79ec877 Updates for G33-LCD interface 2017-07-07 05:00:59 -05:00
Scott Lahteine
186580b55f Arrange example configurations by vendor 2017-07-07 04:48:23 -05:00
Scott Lahteine
6be369f3ea Add some config names to AUTHOR 2017-07-07 04:46:33 -05:00
Scott Lahteine
7fc31a7940 Merge pull request #7258 from thinkyhead/bf_cleanups_jbrazio
Add support for BQ heated bed kit with Hephestos 2
2017-07-07 04:11:07 -05:00
Scott Lahteine
11e376e920 Merge pull request #7256 from thinkyhead/bf_cleanup_july_6
Assign -1 to LCD_PINS_D4-7 if not defined
2017-07-07 03:22:47 -05:00
Scott Lahteine
a3aa798f6d Merge pull request #7257 from thinkyhead/bf_Creality_CR10
Support for Creality CR-10
2017-07-07 03:22:27 -05:00
João Brázio
2065591daf Add support for BQ heated bed kit with Hephestos 2 2017-07-07 03:10:38 -05:00
essgcee
61be28133d Support for Creality CR-10
Creality board is a Melzi / Sanguinololu variant, but using different pins for LCD control (and maybe other minor variations)
2017-07-06 23:08:10 -05:00
Scott Lahteine
9248a90a4c Assign -1 to LCD_PINS_D4-7 if not defined 2017-07-06 22:47:51 -05:00
Scott Lahteine
ce834bb78e Merge pull request #7255 from thinkyhead/bf_cleanup_july_6
Use FastIO for spindle, probe test, and case light
2017-07-06 22:03:27 -05:00
Scott Lahteine
5ef1e5ef60 Tweaks for M43 2017-07-06 21:47:50 -05:00
Scott Lahteine
c7732db99d Fix: Use of digitalRead, digitalWrite breaks on AT90USB 2017-07-06 21:25:56 -05:00
Scott Lahteine
f713f25fa5 Clean up excess whitespace 2017-07-06 21:24:30 -05:00
Scott Lahteine
2cb308fb53 Merge pull request #7253 from thinkyhead/bf_busy_protocol
"Keepalive" is now "Busy protocol"
2017-07-06 16:39:50 -05:00
Scott Lahteine
fc9ce65095 Add BUSY_WHILE_HEATING for hosts that need it 2017-07-06 16:28:57 -05:00
Scott Lahteine
504d26341a Merge pull request #7251 from thinkyhead/bf_simplify3d_workaround
Patch M23 to work around Simplify3D bug
2017-07-06 14:45:04 -05:00
Scott Lahteine
c6d430670a Clear SHOW_BOOTSCREEN with no LCD 2017-07-06 14:21:27 -05:00
Scott Lahteine
11c589c3ec Fix compile issue with G38
Fixes #7250
2017-07-06 14:21:27 -05:00
Scott Lahteine
678914be25 Patch M23 to work around Simplify3D bug
Addressing #7227
2017-07-06 14:00:58 -05:00
Scott Lahteine
ef94ddf53c Merge pull request #7238 from thinkyhead/bf_probe_manual_G33
Add PROBE_MANUALLY support to G33
2017-07-04 18:18:32 -05:00
LVD-AC
3efe4aeef8 Add PROBE_MANUALLY support to G33 2017-07-04 18:06:54 -05:00
Scott Lahteine
28deff01b8 Fix a bug in mfup 2017-07-04 17:38:45 -05:00
Scott Lahteine
cca1cca3a5 Merge pull request #7237 from thinkyhead/bf_cz_mapper
UTF-8 mapper for Czech
2017-07-04 16:45:13 -05:00
Scott Lahteine
a2babb532d Merge pull request #7217 from benlye/add-kill-action
Add configurable action command to send when printer is killed
2017-07-04 16:44:08 -05:00
Petr Zahradník
8c34233452 UTF-8 mapper for Czech 2017-07-04 15:51:23 -05:00
Scott Lahteine
b8066fb36f Merge pull request #7232 from fiveangle/disable_xyz_compatibility_check
DISABLE_[XYZ] compatibility check
2017-07-04 13:26:56 -05:00
Dave Johnson
20f6676d63 DISABLE_[XYZ] compatibility check
DISABLE_[XYZ] is incompatible with HOME_AFTER_DEACTIVATE and Z_SAFE_HOMING
2017-07-03 17:23:53 -07:00
Ben Lye
c28749a567 Add kill action
Sends pre-defined string as action command when printer is kill.
2017-07-03 23:45:19 +01:00
Scott Lahteine
df87278fce Add "CAP:PRINT_JOB:1" (M75 / M76 / M77) to M115 output 2017-07-03 15:59:06 -05:00
Scott Lahteine
4be8d7720e Fix spelling of "Chinese" 2017-07-03 15:24:49 -05:00
Scott Lahteine
760bf49a00 Merge pull request #7221 from thinkyhead/bf_fix_reachable
Fix for issues #6997 and #7152
2017-07-03 03:40:42 -05:00
LVD-AC
567941e341 Fix for issues #6997 and #7152
Probing with the effector in the printing area, but an eccentric probe (e.g. allen key) outside it but still touching the bed gives meaninfull information for calibration. Since calibration is most accurate when probing as close to the towers as possible the testing was way to restrictive hence this fix.
2017-07-03 02:53:49 -05:00
Scott Lahteine
57fff2e95e Merge pull request #7219 from thinkyhead/bf_update_git_scripts
Update Marlin+git helper scripts
2017-07-03 01:49:27 -05:00
Scott Lahteine
94c965fad6 Merge pull request #7220 from thinkyhead/bf_fix_eeprom_opts
Make all EEPROM optimization options available
2017-07-03 01:39:01 -05:00
Scott Lahteine
6a3967ee33 Corrections for probe_pt parameters 2017-07-03 01:34:27 -05:00
Scott Lahteine
534bffa7a9 Correct comment on ABL G29 2017-07-03 01:13:07 -05:00
Scott Lahteine
e1e1a0c344 Provide a default CUSTOM_BOOTSCREEN_TIMEOUT 2017-07-03 01:13:07 -05:00
Scott Lahteine
ab79933d1f Update Marlin+Github helper scripts 2017-07-03 01:13:07 -05:00
Scott Lahteine
69297b2d7b Make all EEPROM optimization options available 2017-07-02 20:47:03 -05:00
Scott Lahteine
015839fc50 Merge pull request #7212 from thinkyhead/bf_m48_real_probe
M48 needs a real probe
2017-07-02 16:22:47 -05:00
Scott Lahteine
d609489b22 Drop setup_homepin 2017-07-02 02:27:09 -05:00
Scott Lahteine
167169e1bf Sanity check for a real probe with M48 2017-07-02 02:27:09 -05:00
Scott Lahteine
395a9f59ac Merge pull request #7211 from thinkyhead/bf_lcd_bootscreen
Use lcd_bootscreen for both
2017-07-02 02:11:07 -05:00
Scott Lahteine
14663efe0d Merge pull request #7210 from fiveangle/printrboard_revf_cleanup
Printrboard RevF cleanup
2017-07-02 01:02:26 -05:00
Scott Lahteine
ae5923a3d0 Make lcd_bootscreen common to both 2017-07-02 00:47:36 -05:00
Scott Lahteine
859248433f Patch for gcode debug 2017-07-02 00:47:35 -05:00
Dave Johnson
09c90c2f6c Printrboard RevF Cleanup
-Update Arduino IDE extension descriptions
-Set default motor currents if not defined in Configuration_adv.h
-Support for MINIPANEL LCD
-Support for choosing internal or panel SD
2017-07-01 22:33:39 -07:00
Scott Lahteine
41e0955c27 Merge pull request #7208 from thinkyhead/bf_lcd_for_melzi
LCD for Melzi support
2017-07-02 00:32:13 -05:00
Scott Lahteine
232a10410d LCD_FOR_MELZI 2017-07-01 22:32:20 -05:00
Scott Lahteine
76c92a1fab Clean up some trailing spaces 2017-07-01 22:32:20 -05:00
Scott Lahteine
312f63dbe8 Merge pull request #7207 from thinkyhead/bf_update_ubl_lcd
Expose DISABLE_M503 option as a test option
2017-07-01 22:10:34 -05:00
Scott Lahteine
cf96109056 Implement the EEPROM_CHITCHAT option 2017-07-01 21:48:18 -05:00
Scott Lahteine
dcec7178d1 Expose DISABLE_M503 option as a test option 2017-07-01 21:31:28 -05:00
Scott Lahteine
3e78a01262 Merge pull request #7204 from thinkyhead/bf_update_ubl_lcd
UBL radar map corrections
2017-07-01 20:59:03 -05:00
Scott Lahteine
2ff967f3e6 Merge pull request #7205 from thinkyhead/bf_infitary_m508
Add configuration for Infitary M508 (i3 clone)
2017-07-01 20:11:02 -05:00
Tom
1ff7d10c80 Add configuration for Infitary M508 (i3 clone)
Based on Infitary's own firmware settings.
2017-07-01 20:04:08 -05:00
Scott Lahteine
4cb45c10dd Patch ubl lcd mesh map indentation 2017-07-01 19:47:52 -05:00
Scott Lahteine
abd6ba62b4 Some cleanups for ubl lcd mesh map 2017-07-01 19:47:49 -05:00
Scott Lahteine
f17bae1f70 Changes for ubl_lcd_map_control patch 2017-07-01 19:47:02 -05:00
Tannoo
8e0f3b7eba UBL radar map corrections 2017-07-01 19:00:44 -05:00
Scott Lahteine
009a6104c5 Merge pull request #7201 from Bob-the-Kuhn/intermittent_Teensy2++_G26_compile_issue
intermittent AT90USB & G26 compile problem (proposal)
2017-07-01 18:54:36 -05:00
Bob-the-Kuhn
fcceed5be6 intermittent Teensy & G26 compile problem
===============================================

also an issue with ubl_motion.cpp
2017-07-01 14:41:24 -05:00
Scott Lahteine
457489d7ac Merge pull request #7187 from thinkyhead/bf_sanitycheck_G33
Add a sanity check for DELTA_AUTO_CALIBRATION
2017-06-30 11:39:09 -05:00
Scott Lahteine
30b327d24c Finish the solution for #7166 2017-06-29 15:17:39 -05:00
Scott Lahteine
6c97c5595c Add a sanity check for DELTA_AUTO_CALIBRATION 2017-06-29 15:03:19 -05:00
Bob-the-Kuhn
553d5ca283 Merge pull request #7183 from Bob-the-Kuhn/Fix_LETTER_OFF_in_gcode.h
Fix LETTER_OFF in gcode.h (make LETTTER_OFF return values that match param indices range)
2017-06-29 09:07:46 -05:00
Bob-the-Kuhn
e6e3132f79 make LETTTER_OFF return values that match param indices range 2017-06-29 09:01:58 -05:00
Bob-the-Kuhn
cd2ac3b759 Merge pull request #7182 from Bob-the-Kuhn/has__value_fix_
Correct has_value() when FASTER_GCODE_PARSER is enabled
2017-06-28 21:16:52 -05:00
Bob-the-Kuhn
bfbf5f8200 correct value_bool() when FASTER_GCODE_PARSER is enabled
Also corrected compile issue when DEBUG_GCODE_PARSER and
AUTO_BED_LEVELING_UBL are both enabled.
2017-06-28 19:51:08 -05:00
Scott Lahteine
814925d692 Merge pull request #7179 from thinkyhead/bf_anet_a6
Add ANET A6 example configuration
2017-06-28 17:06:04 -05:00
Scott Lahteine
406ef69702 Move Anet A8 config to subfolder 2017-06-28 16:58:57 -05:00
Scott Lahteine
379926961c Add Anet A6 config, edit Anet A8 config 2017-06-28 16:58:57 -05:00
Scott Lahteine
5b03f23fa2 Bring configurations up to date, fix some comments 2017-06-28 16:41:49 -05:00
Scott Lahteine
e3cedfa0ec Fix a compiler warning 2017-06-28 16:41:46 -05:00
Scott Lahteine
bb0508b6cf Fix comment in M115 code 2017-06-28 13:08:33 -05:00
Scott Lahteine
5c1888467f Merge pull request #7170 from thinkyhead/bf_M217_echo_to_serial
Add A (action) and E (echo) parameters to M118
2017-06-28 02:13:13 -05:00
Scott Lahteine
85777a56c6 Add A (action) and E (echo) parameters to M118 2017-06-28 02:07:59 -05:00
Scott Lahteine
d1e8d4cd9d Merge pull request #7167 from thinkyhead/bf_20x4_lcd_update
UBL Map Cleanup and LCD display
2017-06-28 01:20:22 -05:00
Scott Lahteine
797d6a97e7 Merge pull request #7168 from thinkyhead/bf_M217_echo_to_serial
M118 echo to serial
2017-06-28 01:12:09 -05:00
Scott Lahteine
b492e0878d Changes to reduce and simplify 2017-06-28 01:10:30 -05:00
Ben Lye
98d362c2da Adding M118 command to send text to serial
Allows the user to send text to the serial console in order to
communicate with a host - sending debuging information or action
commands, for example.  Text must begin with '//' and this is added if
it is not already present at the beginning of the string.
2017-06-28 00:55:20 -05:00
Tannoo
80abc872f3 Updated to better support the coming "radar" 2017-06-27 22:51:58 -05:00
Tannoo
e90cbf5c16 UBL Map Cleanup 2017-06-27 22:51:58 -05:00
Scott Lahteine
ada836db29 Merge pull request #7007 from thinkyhead/bf_followups_friday
Followups for I2C_POSITION_ENCODERS
2017-06-27 22:51:24 -05:00
Scott Lahteine
fc140c4962 Followup for I2C_POSITION_ENCODERS 2017-06-27 20:46:40 -05:00
Scott Lahteine
f4246dc8ff Merge pull request #7165 from thinkyhead/bf_parser_shorthand
Use parser.seenval, add shorthand functions
2017-06-27 18:57:48 -05:00
Scott Lahteine
66faedb2b8 Merge pull request #6938 from thinkyhead/bf_prusa_multiplexer
Initial support for the Průša MK2 Multiplexer
2017-06-27 18:54:30 -05:00
Scott Lahteine
bd776df8c1 Optimize seen_axis by moving 'X' to index 24 2017-06-27 18:47:11 -05:00
Scott Lahteine
05449cf6ee Add shorthand value accessors to gcode.h 2017-06-27 18:39:41 -05:00
Scott Lahteine
12f092c812 Cleanups to gcode.h, use seenval() 2017-06-27 17:57:00 -05:00
Scott Lahteine
941943c167 Apply const, spacing, etc. 2017-06-27 05:23:49 -05:00
Scott Lahteine
5b11b33854 Add support for Průša MK2 Multiplexer 2017-06-27 04:55:30 -05:00
Scott Lahteine
a4a587a897 Fix spelling of Průša 2017-06-27 04:46:46 -05:00
Scott Lahteine
ba1706a265 Fix spacing in gcode.cpp
Followup to #6940
2017-06-27 04:46:46 -05:00
Scott Lahteine
c2c8aafda2 Merge pull request #7157 from thinkyhead/bf_g33_f_parameter
G33 F and Height bug fix
2017-06-27 04:36:22 -05:00
Scott Lahteine
627afb29df Merge pull request #7109 from tnw513/fix-italian
added missing italian translation
2017-06-27 04:12:30 -05:00
Scott Lahteine
61d00d8990 Merge pull request #7156 from benlye/benlye-fix-pinsdebug
Fix #ifdef AVR_AT90USB1286_FAMILY in pinsDebug
2017-06-27 04:11:46 -05:00
Scott Lahteine
f0f9fb7465 Remove line that does nothing 2017-06-27 04:08:50 -05:00
LVD-AC
99592c8458 Update G33: Add F, fix height bug 2017-06-27 04:02:02 -05:00
Ben Lye
31514f453a Fix #ifdef AVR_AT90USB1286_FAMILY in pinsDebug
Can't compile with PINS_DEBUGING enabled on Atmega1284p because it tries
to enumerate pins 46 and 47 (which don't exist) because `#ifdef
AVR_AT90USB1286_FAMILY ` doesn't work as expected.
2017-06-27 08:04:40 +01:00
Scott Lahteine
134116b874 Merge pull request #7153 from thinkyhead/bf_czech_update
Updated Czech language
2017-06-26 17:34:15 -05:00
Scott Lahteine
89c6e92b66 Merge pull request #7144 from thinkyhead/bf_ubl_g26_p4_surface
Added option 'H' to G29 P4.
2017-06-26 16:34:48 -05:00
Petr Zahradník
e80958b631 CZ Translate BLTouch and UBL
Fixup length
2017-06-26 16:15:31 -05:00
Scott Lahteine
fe7e890b09 Fix issues with ADC_KEYPAD
Fixes #7150
2017-06-26 16:08:31 -05:00
dot-bob
a1632cfa0a Added option 'H' to G29 P4.
- Added `H` to set a nozzle height adjustment to surface of the bed.
- Updated G29 P4 comments to reflect changes.
2017-06-25 17:14:08 -05:00
Scott Lahteine
e687782875 Merge pull request #7134 from thinkyhead/bf_skynet_a3_ready
Add Skynet/ANET A10 support
2017-06-25 14:35:22 -05:00
Scott Lahteine
1446b5f01d Allow more avr variants with build_marlin* 2017-06-25 14:16:28 -05:00
Scott Lahteine
efc6a9c1b8 Merge pull request #7136 from thinkyhead/bf_digipot_save
Edit digipot currents via LCD, save to EEPROM
2017-06-25 04:01:54 -05:00
dot-bob
b3c36c98fd Edit digipot currents via LCD, save to EEPROM 2017-06-25 01:02:36 -05:00
Scott Lahteine
3c7bfe798d Various cleanups ahead of digipot save 2017-06-24 23:56:24 -05:00
Bob-the-Kuhn
9651d01e1a Add Skynet/ANET A10 support 2017-06-24 19:07:03 -05:00
Scott Lahteine
eb314373bb Config spacing & consistency, group custom LCDs 2017-06-24 14:33:40 -05:00
Scott Lahteine
6c45fa7dcc Apply #elif in LCD conditionals 2017-06-24 13:56:33 -05:00
Scott Lahteine
ece89bcf7a Merge pull request #7119 from thinkyhead/bf_vref_MCP4018
Fix: set digipot mcp4018 Vrefmax to 1.666V
2017-06-24 13:27:17 -05:00
Scott Lahteine
afbc6e3e2f Update DELTA/SCARA config comments 2017-06-24 12:47:17 -05:00
Paweł Stawicki
1e47c17b46 Fix: set digipot mcp4018 Vrefmax to 1.666V 2017-06-24 12:35:34 -05:00
Scott Lahteine
ebe6719e12 Merge pull request #7128 from thinkyhead/bf_enhanced_arcs
Enhance G2/G3 with 'P' and G17/G18/G19 Plane Select
2017-06-23 15:12:15 -05:00
Scott Lahteine
80a232419d CNC workspace planes and 'P' argument for G2/G3 2017-06-23 14:53:03 -05:00
Scott Lahteine
5fb0d401eb Formatting tweaks 2017-06-23 14:53:02 -05:00
Scott Lahteine
ed04d0b6be Label DualXMode enums 2017-06-23 14:53:02 -05:00
Scott Lahteine
786cdea124 Ensure REPRAPWORLD_KEYPAD_MOVE_STEP is defined 2017-06-23 14:53:01 -05:00
Scott Lahteine
ee7163fd3a Fix pinsDebug compile errors 2017-06-23 14:53:01 -05:00
Scott Lahteine
a9f8e518bf Fix FILAMENT_WIDTH_SENSOR infinite loop issue
Addressing #6992 and #5851
2017-06-23 14:53:01 -05:00
Scott Lahteine
a18324bc8d Give a more detailed issue template 2017-06-22 18:17:02 -05:00
Scott Lahteine
254a11b083 Merge pull request #7120 from thinkyhead/bf_sainsmart_link
Add link to F. Malpartida LiquidCrystal library
2017-06-22 14:04:23 -05:00
Scott Lahteine
aeb6d465a4 Merge pull request #7118 from thinkyhead/bf_french_update
French update
2017-06-22 13:10:07 -05:00
Bob-the-Kuhn
325f09ea6c Add link to custom LiquidCrystal library by F. Malpartida 2017-06-22 13:07:08 -05:00
MagoKimbra
d26c8cc5c8 fix_planner_refresh_e_positioning (#7103)
* fix_planner_refresh_e_positioning

* Fix
2017-06-22 12:59:22 -05:00
Gege2B
c7f04fbcc7 French translation 2017-06-22 12:49:23 -05:00
Silvio Didonna
4171520729 added missing italian translation 2017-06-21 11:08:39 +02:00
Bob-the-Kuhn
41bfff14e2 Merge pull request #6991 from Bob-the-Kuhn/Mesh-with-babystepping
Mesh with BABYSTEP_ZPROBE_OFFSET: add sanity check
2017-06-20 16:36:22 -05:00
Scott Lahteine
424d0bae8b Merge pull request #7100 from thinkyhead/bf_HAL_prepare
Apply maths macros and type changes ahead of HAL
2017-06-20 01:15:23 -05:00
Scott Lahteine
5c59ee4e93 Use current (raw) Z if omitted from G29 WXY or G29 WIJ. 2017-06-20 00:10:52 -05:00
Scott Lahteine
37bc0fce62 Make G29 compatible with M206 Z and G92 Z
Use the raw position for mesh measurement. Otherwise the `M206` and
`M92` Z offsets will get canceled out by bed leveling. The downside is
`G29` will not compensate for a poorly set small `M206` fudge value.

To elaborate on this issue, imagine you are probing with a Z home
offset of -0.1, meaning when Z homes, -0.1 is the current position,
implying the ideal bed zero for the nozzle is 0.1mm higher than the Z
endstop. Ordinarily when printing, Z would raise 0.1mm higher.

What happens when we probe is that all points are measured with that
-0.1 included. So when bed leveling is enabled the `M206 Z` offset gets
exactly canceled out by the bed readings.
2017-06-20 00:09:59 -05:00
Scott Lahteine
d5368461f9 Merge pull request #7098 from thinkyhead/bf_ubl_steps
Step-by-Step Menu addition
2017-06-19 23:12:52 -05:00
Scott Lahteine
e907654d6a Do two or three fewer test builds 2017-06-19 23:08:45 -05:00
Scott Lahteine
6c45d0fd81 Apply maths macros and type changes ahead of HAL 2017-06-19 22:57:42 -05:00
Scott Lahteine
8a51e2960c Improve the experience of editing steps_per_mm 2017-06-19 22:17:15 -05:00
Scott Lahteine
725d9d9a56 Fix and improve LCD value editing display
- Fix: When "100.0" changes to "99.0" the LCD shows "199.0"
- Use 2 rows if needed on character LCD, (allowing longer labels…
Germany, et. al.)
- Known issue: A certain length label combined with a certain value
drawing function could, for example, display 99.0 on 1 line, but 100.0
on two lines. Workaround would be to pass a nominal value size argument.
2017-06-19 22:17:15 -05:00
Scott Lahteine
499bb85a95 Clean up, put ubl menu itemization closer at hand 2017-06-19 22:17:14 -05:00
Tannoo
90f5f82926 Step-by-Step Menu addition 2017-06-19 20:15:11 -05:00
Scott Lahteine
0c616700f3 Merge pull request #7097 from thinkyhead/bf_dac_percents_fix
Convert DAC percent to uint8_t
2017-06-19 17:58:55 -05:00
Florian Heilmann
6dcf42f1a7 Add Z Fade Height to M420 output if it is enabled (#7042)
* Add Z Fade Height to M420 Output

Echo the z-fade height when M420 is called, if it is enabled.

* Fix Whitespace

* Fix Compiler complaint

* Missing semi-colon
2017-06-19 17:53:07 -05:00
Bob-the-Kuhn
a1c65fd3d5 convert DAC percent to uint8_t
=====================

add test to Travis
2017-06-19 17:46:41 -05:00
Scott Lahteine
7b79f443ef Merge pull request #7096 from thinkyhead/redo_DSE
Support for two switching extruders
2017-06-19 17:32:24 -05:00
Scott Lahteine
907cafcbfd Support for two switching extruders 2017-06-19 17:20:59 -05:00
Scott Lahteine
17f69f8ca2 Merge pull request #7094 from thinkyhead/bf_fix_advance_rate
Fix #5699 - LIN_ADVANCE freeze when ADV_RATE returns 0
2017-06-19 16:38:41 -05:00
Ross Allan
cfcd069501 Fix #5699 - LIN_ADVANCE freeze when ADV_RATE returns 0 2017-06-19 14:02:17 -05:00
Scott Lahteine
b8b7ef1902 Merge pull request #7090 from thinkyhead/bf_italian_refix
Fix Italian language mapper
2017-06-19 09:27:13 -05:00
Scott Lahteine
42f7f9e013 Merge pull request #7060 from bgort/i2cpefix
I2C Position Encoders Example Configs
2017-06-19 01:08:42 -05:00
Scott Lahteine
0b49bddec2 Fix Italian language mapper 2017-06-19 01:01:40 -05:00
Scott Lahteine
7e028ec429 Merge pull request #7089 from thinkyhead/bf_italian_update
Added missing Italian translations
2017-06-19 00:16:14 -05:00
Silvio Didonna
2e26a7c752 Added missing Italian translations 2017-06-18 23:37:48 -05:00
Scott Lahteine
2e1b7d3a22 Merge pull request #7079 from thinkyhead/bf_m600_fixes
M600 fixes
2017-06-18 23:32:07 -05:00
Scott Lahteine
4c3dc8bf07 Remove set_current_to_destination from resume_print
Addressing #7057
2017-06-18 23:01:13 -05:00
Scott Lahteine
4857a3ba48 Formatting and spelling 2017-06-18 23:01:12 -05:00
Thomas Moore
3d24c329af M600 fixes 2017-06-18 23:00:56 -05:00
Scott Lahteine
311f6aff72 Merge pull request #7078 from thinkyhead/bf_cleanups_fixes
Move lcd_refresh_zprobe_zoffset definition
2017-06-18 17:24:57 -05:00
Bob-the-Kuhn
8fb30aaed6 warn user of an invalid combination 2017-06-17 15:04:47 -05:00
Bob-the-Kuhn
6cb9bb27fe Move lcd_refresh_zprobe_zoffset definition 2017-06-16 21:46:33 -05:00
Scott Lahteine
43a95ae5ad Merge pull request #7071 from thinkyhead/bf_cleanups_fixes
Fix status message, apply #7058
2017-06-16 17:29:28 -05:00
Scott Lahteine
dd1a84b23f Add Travis test for scrolling on DOGM 2017-06-16 14:48:01 -05:00
Scott Lahteine
d4270f15a9 Spacing tweak in setup() 2017-06-16 14:21:05 -05:00
Scott Lahteine
c61c0a9aeb Fix status message missing "blink" 2017-06-16 14:18:19 -05:00
Scott Lahteine
062131554f Followup to #7045 2017-06-16 14:18:19 -05:00
Jim Brown
3d043976f7 Add option to disallow filament change without homing first 2017-06-16 13:32:17 -05:00
Scott Lahteine
93da4e83f7 One more space on a short status message 2017-06-16 12:58:25 -05:00
Scott Lahteine
43c96eb31f Merge pull request #7070 from thinkyhead/bf_cleanups_fixes
Thursday cleanup / bugfixes
2017-06-15 15:43:46 -05:00
Scott Lahteine
7c95f762f2 Show LCD bed options even without thermal protection 2017-06-15 15:29:56 -05:00
Scott Lahteine
92eb55f246 Reject generous donation of trailing whitespace 2017-06-15 15:25:24 -05:00
Scott Lahteine
428be27893 Formatting adjustments 2017-06-15 15:25:24 -05:00
Scott Lahteine
8d5a37fb3d Support for a 5th stepper in stepper code 2017-06-15 15:25:23 -05:00
Scott Lahteine
7769a22064 Tweaks to temperature code 2017-06-15 15:25:23 -05:00
Scott Lahteine
d9da126776 Cleanups for UBL / ultralcd.cpp 2017-06-15 15:22:36 -05:00
Scott Lahteine
499d5c3b24 Fix scrolling lcd message for DOGM 2017-06-15 15:07:39 -05:00
Scott Lahteine
7164fd499e Tweak to G33 P error 2017-06-15 14:43:40 -05:00
Scott Lahteine
c10d763d98 Simpler prepare move conditions 2017-06-15 14:43:40 -05:00
Scott Lahteine
4ebff8eaa5 Drop fastio timer cruft 2017-06-15 14:43:40 -05:00
Scott Lahteine
09bc34f4dc Allow arbitrarily long retraction 2017-06-15 14:43:30 -05:00
Scott Lahteine
4414825e0d Merge pull request #7038 from thinkyhead/bf_PCA9632
PCA9632 PWM color LED support
2017-06-15 14:41:24 -05:00
Scott Lahteine
50c2702ba5 Merge pull request #7062 from Bob-the-Kuhn/AT90USB---UBL-compile-error
Fix two UBL compile errors (one is AT90USB only and one affects all)
2017-06-15 14:22:27 -05:00
Bob-the-Kuhn
9dda022705 fix compile errors
================================

Changed to conditional compile for AT90USB issue
2017-06-15 13:18:14 -05:00
Bob-the-Kuhn
b3338ccb01 Merge pull request #6954 from Bob-the-Kuhn/Software-SPI-for-all-CPUs
SD card soft SPI - allow all CPU families to use it
2017-06-15 01:03:39 -05:00
Brian
40bb0cbf7a example configurations, etc. 2017-06-14 18:04:28 -04:00
Jim Brown
26d20ebcfc Don't allow filament change without homing first (#7054) 2017-06-13 17:11:37 -05:00
Roxy-3D
824f71d503 LCD Panel Interactive Mesh Editing (#7045)
Original Mesh Bed Leveling replacement put at top of UBL Menu Options to
help facilitate the removal of the Original Mesh Bed Leveling.

Radar display (and control) of the UBL Interactive Mesh Editing.
2017-06-12 18:26:49 -05:00
Scott Lahteine
445227c807 Fix missing LCD_STR_REFRESH 2017-06-12 01:28:52 -05:00
Scott Lahteine
699aa35df6 Code cleanup for G33 2017-06-12 01:25:40 -05:00
Scott Lahteine
570722a0fe Combine Travis tests to shorten required time 2017-06-12 01:09:24 -05:00
dot-bob
0bc66bf22c PCA9632 PWM color LED support
Add support for the PCA9632 PWM color LED driver used on the Ultimaker 2 and Wanhao Duplicator 6.
2017-06-12 01:09:24 -05:00
Luc Van Daele
896dfa0577 G33 eccentric probe fixes (#6850)
* excentric probe config fix

* undo last commit

* eccentric probe fix

* oops

* !stow after each probe

* deploy/stow fix

* E parameter + bit of cleanup

* comment

* LCD menu fix
2017-06-12 01:07:19 -05:00
Thomas Moore
e47029199e Remove ADVANCED_PAUSE_FEATURE requirement for PROBING_HEATERS_OFF (#7000)
* Remove ADVANCED_PAUSE_FEATURE requirement for PROBING_HEATERS_OFF

* Add HEATER_IDLE_HANDLER conditional
2017-06-12 00:22:31 -05:00
Scott Lahteine
8326c1c279 Merge pull request #7005 from Diederikvanderpant/bugfix-1.1.x
added shift register pins for reprapworld keypad v1.1
2017-06-11 23:12:11 -05:00
Scott Lahteine
979a6a6459 Merge pull request #7037 from thinkyhead/bf_config_CL-260
CL-260 configs
2017-06-11 19:55:37 -05:00
Scott Lahteine
07f8da36d2 CL-260 configs 2017-06-11 19:40:13 -05:00
Scott Lahteine
dce665a083 Merge pull request #7025 from magnuspub/patch-1
Mod in language_it.h
2017-06-11 19:09:46 -05:00
Scott Lahteine
7b09ab6bda Merge pull request #7033 from Bob-the-Kuhn/pinsDebug-&-dac_mcp4728-fixes
Fix pinsDebug problem & add capability to display more than 70 pins
2017-06-11 19:09:09 -05:00
Scott Lahteine
5bdb4bbc5e Merge pull request #7030 from thinkyhead/bf_circular_scroll
Circular scrolling of the status message
2017-06-11 19:07:38 -05:00
Scott Lahteine
634b7fa7d4 Merge pull request #7031 from thinkyhead/bf_save_218_bytes
Reduce Marlin by ~218 bytes
2017-06-11 19:05:45 -05:00
Federico
772275ab0c Create language_it.h 2017-06-11 10:37:34 +02:00
Bob-the-Kuhn
11e28f389e fix pinsDebug.h error, add capability to display more than 70 pins. 2017-06-10 22:01:15 -05:00
Scott Lahteine
21217d53df Circular scrolling of the status message 2017-06-10 20:56:00 -05:00
Scott Lahteine
da8e946efb Reduce size of heater state print code 2017-06-10 20:26:17 -05:00
Scott Lahteine
dde8bb7c8b Fix extrude_min_temp compiler warning 2017-06-10 20:07:36 -05:00
Scott Lahteine
83263076dc Merge pull request #7014 from fiveangle/fix_get-set_DrvPct_declarations
fix get/setDrvPct declarations
2017-06-10 19:06:50 -05:00
Scott Lahteine
ec61b07836 Merge pull request #7027 from thinkyhead/bf_water_is_wet
Followup to German language update
2017-06-10 19:04:19 -05:00
Scott Lahteine
57a51fd5db Tweak some else clauses 2017-06-10 16:40:10 -05:00
Scott Lahteine
fc89de6d8b Followup to German language update 2017-06-10 16:27:39 -05:00
Scott Lahteine
6c9b5ab8e8 Merge pull request #6929 from p3p/pr_issue_template
Add template for github issues
2017-06-10 16:16:20 -05:00
Federico
92011e3d8c Create language_it.h 2017-06-10 21:50:14 +02:00
Dave Johnson
7864b133a8 Fix get/setDrvPct declarations 2017-06-09 20:21:28 -07:00
Scott Lahteine
0b6b7c9c7e Merge pull request #7013 from thinkyhead/bf_german_update
Update language_de.h
2017-06-09 21:41:19 -05:00
Scott Lahteine
f17a3c2474 Merge pull request #6889 from thinkyhead/bf_at90usb_mapping
Unify all AVR90USB pin mappings
2017-06-09 21:00:13 -05:00
Kai
5a72b6818e update language_de.h
Following #6990 some more translations and some grammar fixes
2017-06-09 19:45:09 -05:00
Scott Lahteine
4cc5444144 Merge pull request #7008 from Bob-the-Kuhn/Z_MIN_PROBE_ENDSTOP-and-Z_MAX_PIN
Can't use "#define Z_MIN_PROBE_PIN Z_MAX_PIN" in configuration.h
2017-06-09 19:42:56 -05:00
Scott Lahteine
51bc50214a Save 8 bytes of SRAM 2017-06-09 19:20:16 -05:00
Scott Lahteine
748bf32388 Unify AVR90USB: pinsDebug changes 2017-06-09 19:20:16 -05:00
Scott Lahteine
5426fc1735 Unify AVR90USB: Pins cleanup 2017-06-09 18:48:12 -05:00
Scott Lahteine
87d8223251 Unify AVR90USB: Pins remap to Arduino 2017-06-09 18:48:12 -05:00
Scott Lahteine
b378deaf89 Unify AVR90USB: fastio changes 2017-06-09 18:21:57 -05:00
Scott Lahteine
f4b76b1ee7 Merge pull request #7011 from thinkyhead/bf_serial_macros
Tweak serial macros
2017-06-09 17:58:20 -05:00
Scott Lahteine
e94f79ccea Patch some serial macros 2017-06-09 17:17:23 -05:00
Scott Lahteine
d91710e9aa Followup for UBL translated strings 2017-06-09 16:59:26 -05:00
Scott Lahteine
761df686bd Minor cleanup in gcode.h 2017-06-09 16:59:26 -05:00
Thomas Moore
897bc2ac1f Updates for ensure_safe_temperature (#6963)
* Updates for ensure_safe_temperature

* M600 fixes
2017-06-09 15:19:08 -05:00
Bob-the-Kuhn
1c107b3949 delete problem line 2017-06-09 11:53:36 -05:00
Diederik van der Pant
5b270417ed added shift register pins for reprapworld keypad v1.1
I recently upgraded my Marlin to V1.1.x and decided to publish my fix to make marlin compile properly when #define board megatronics 2 in combination with #define reprapworld keypad v1.1. It was previously described in the comments of a closed pull request. MarlinFirmware#472. All the buttons on the keypad are now operational.
2017-06-09 14:17:47 +02:00
bgort
2f55870edb [New Feature] I2C position encoder support (#6946)
* [New Feature] I2C position encoder support

I plan to continue improving/cleaning this up, as there areas that need work.

* let the cleanups begin.

* progress

* more progress

* comments, rename files, etc.

* clean

* Cleanups per thinkyhead

* a few more cleanups

* cleanups, bugfixes, etc.

* remove unnecessary passes_test(), additional cleanups/optimizations

* cleanups

* misc.

* Fix up I2CPEM.init() and a few other things.

* organize, fix, rename, etc.

* more optimization

* a few more tweaks
2017-06-09 08:06:23 -04:00
Bob-the-Kuhn
f7dacd1f50 Merge pull request #6996 from Bob-the-Kuhn/change-to-DWORD
Fix type for max_acceleration_mm_per_s2 in configuration_store.cpp
2017-06-08 16:32:40 -05:00
Bob-the-Kuhn
28d72f48f1 change to DWORD 2017-06-08 16:15:02 -05:00
Bob-the-Kuhn
76a610cf81 Merge pull request #6995 from Bob-the-Kuhn/add-static
Add "static"
2017-06-08 15:01:00 -05:00
Bob-the-Kuhn
8d1d9040b6 add static 2017-06-08 14:59:21 -05:00
Bob-the-Kuhn
a17ffe1ece Merge pull request #6985 from Kaibob2/patch-1
Fix for #6980 (case_light compile problem when EXTENDED_CAPABILITIES_REPORT is enabled)
2017-06-08 11:18:56 -05:00
Tannoo
731c8e6372 Translatable Strings for ubl_G29 (#6990) 2017-06-08 10:09:39 -05:00
Kai
abb6b8ad54 update language_de.h (#6986)
There was quite a lot to translate this time. I'm not absolutely confident with the whole UBL stuff and it's a PITA to translate. I don't use any kind of levelling myself as i just have a perfectly level cast aluminium plate as bed.
So maybe someone who really uses it might take a closer look at it after it's merged.
2017-06-08 10:04:52 -05:00
Kai
c2eff60d3f Fix for #6980
Line 7830 prevented successfull compilation when #define CASE_LIGHT_ENABLE is uncommented
2017-06-08 09:19:04 +02:00
Scott Lahteine
1419126721 Merge pull request #6965 from thinkyhead/bf_save_more_sram
Use createChar_P to save SRAM in bootscreen
2017-06-07 17:34:19 -05:00
Scott Lahteine
a453be7357 Merge pull request #6973 from bgort/autoreportT
Enable AUTO_REPORT_TEMPERATURES by default
2017-06-07 17:33:40 -05:00
Scott Lahteine
1d615e0a67 Merge pull request #6976 from Tannoo/Leveling_in_About_Printer
Leveling type in About Printer
2017-06-07 17:26:21 -05:00
Scott Lahteine
707707d71a Fix LCD status message padding 2017-06-07 16:07:38 -05:00
Scott Lahteine
e556ab1dff Find three-point leveling points on Delta 2017-06-07 16:07:38 -05:00
Scott Lahteine
a27b08e6af Various code style tweaks 2017-06-07 16:07:38 -05:00
Scott Lahteine
dac29e0f75 Cleaner failure of UBL without EEPROM 2017-06-07 16:07:38 -05:00
Scott Lahteine
9128d9ab45 Improve sanity checks with static_assert, organize 2017-06-07 16:07:38 -05:00
Scott Lahteine
6bb05c4543 Save 20b in smart_fill_mesh with PROGMEM 2017-06-07 16:07:38 -05:00
Scott Lahteine
b7dc4d9973 Save 92b PROGMEM, 14b SRAM with extruder auto fan 2017-06-07 16:07:38 -05:00
Scott Lahteine
c9e3caf928 Save lots of PROGMEM, ~20b SRAM with DIGIPOT_I2C 2017-06-07 16:07:38 -05:00
Scott Lahteine
4134a6b526 Save 88b PROGMEM, 48 bytes SRAM in settings.reset 2017-06-07 16:07:38 -05:00
Scott Lahteine
36cc03a9b4 Save 224b PROGMEM, 48b SRAM in get_homing_bump_feedrate 2017-06-07 16:07:38 -05:00
Scott Lahteine
2a41f0ff84 Save 28b PROGMEM in ultralcd.cpp (line_to_current) 2017-06-07 16:07:38 -05:00
Scott Lahteine
e6d10f6ddd Spend 48b PROGMEM to save 16b SRAM
...by moving `homing_feedrate_mm_s` to PROGMEM.
2017-06-07 16:07:38 -05:00
Scott Lahteine
97e13a30ba Save over 100 bytes SRAM in pin_is_protected 2017-06-07 16:07:38 -05:00
Scott Lahteine
45c74406cf Recover 32 bytes of SRAM in Marlin bootscreen code 2017-06-07 16:07:38 -05:00
Scott Lahteine
e1c5a43247 Cleanup stepper current control config options 2017-06-07 16:07:38 -05:00
Scott Lahteine
efc198f952 Spacing, const, comments 2017-06-07 16:07:38 -05:00
Scott Lahteine
7f0945d2b1 Merge pull request #6978 from thinkyhead/fix_z_endstop_adj
Fix z_endstop_adj initializer
2017-06-07 16:07:21 -05:00
Scott Lahteine
4406fba994 Fixes #6975 2017-06-07 11:14:30 -05:00
Scott Lahteine
19b62c14f0 Add a script so Travis can test for intentional failure 2017-06-07 10:35:54 -05:00
Scott Lahteine
d28f5d8a78 Fix: z_endstop_adj is never initialized 2017-06-07 10:29:56 -05:00
Scott Lahteine
5d5ff36446 Fix a compile error with _lcd_set_z_fade_height 2017-06-07 10:29:56 -05:00
Tannoo
b88957e0d4 Leveling type in About Printer
Show the Leveling system in use on the About Printer screen.
2017-06-07 06:28:33 -06:00
Brian
dd071a4a65 Enable AUTO_REPORT_TEMPERATURES by default 2017-06-07 02:52:35 -04:00
bgort
8db1197c9b Enable extended capabilities report by default (#6969)
Ref #5139
2017-06-07 02:36:34 -04:00
bgort
82e662fc69 Remove requirement for LCD when UBL is used. (#6971)
* Remove requirement for LCD when UBL is used.

* fix previous oversights

* further refinement - error messages for P2 & P4

* require R on G26 when not using LCD; default to all points
2017-06-07 02:24:36 -04:00
Tannoo
2c2b991b59 UBL Manual Build Menu Option (#6972)
One click option to manually build UBL mesh.
2017-06-06 22:14:18 -05:00
Roxy-3D
0dd0033b33 Save up to 94 bytes of RAM on 20x4 LCD Display machines (#6964)
* Save up to 94 bytes of RAM on 20x4 LCD Display machines

Moved the custom screen characters out of RAM into Program Memory.  With
SD-Card support and the Progress Bar enabled, this saves 94 bytes of RAM
memory.

This was tested using the example_configurations/FolgerTech-i3-2020
files.  So a couple small changes to those files snuck into this Pull
Request.

Probably...  We can find similar savings in the Graphics LCD code it we
comb through it.   And if so...  That is the place we really need to
save RAM memory!

* Tidy up white space and indentation
2017-06-05 17:02:00 -05:00
Bob-the-Kuhn
ba0bd33c38 Removed check for 2560 family 2017-06-04 22:16:27 -05:00
Scott Lahteine
04b07a6ecc Unused var in Stepper 2017-06-04 17:25:16 -05:00
Scott Lahteine
eb8af486d2 Ensure safe temperature for M600 2017-06-04 17:25:16 -05:00
Scott Lahteine
bfe7fbe5c0 Maintain message scroll rate 2017-06-04 17:25:15 -05:00
Scott Lahteine
6411d65c48 Fix Morgan SCARA S2 calculation 2017-06-04 12:24:09 -05:00
Scott Lahteine
46752588b9 Merge pull request #6948 from Bob-the-Kuhn/redundant_temperature
fix redefinition errors for redundant_temperature
2017-06-04 12:16:09 -05:00
Scott Lahteine
5938dae200 Merge pull request #6950 from MagoKimbra/fix_g29_3_point
Fix G29 with 3 point
2017-06-04 12:15:44 -05:00
Scott Lahteine
c5e0f08e35 Merge pull request #6951 from fixoid/patch-4
Initializing extruder/nozzle servo when turning on the printer
2017-06-04 12:13:05 -05:00
Scott Lahteine
1e2ccca063 Merge pull request #6952 from thinkyhead/bf_final_fixups_123
General cleanup before release
2017-06-04 11:51:07 -05:00
Scott Lahteine
e4937b0285 Cleanup of spacing and formatting 2017-06-04 11:31:43 -05:00
fixoid
1aab9906e6 Initializing extruder/nozzle servo when when turning on the printer 2017-06-04 16:57:24 +03:00
MagoKimbra
663ff7f92a Fix G29 with 3 point 2017-06-04 14:39:31 +02:00
oldmcg
9f295581f0 Ubl delta fixes and improvements (#6941)
* Change all direct changes of ubl.state.active to
  set_bed_leveling_enabled() which handles apply/unapply
  leveling to maintain current_position consistency.

Fix invalidation of UBL mesh to invalid unreachable
  mesh points as well (delta corners).

Fix UBL_DELTA unapply_leveling logic and when
it gets applied, including fade_height changes.

Add optional M114 D for detailed position information,
disabled from compilation by default (M114_DETAIL).

* UBL_DELTA raw and inline kinematics

* UBL planner fall through fix

* consistent variable names

* Cleanup orphaned code and whitespace changes.
Use _O2.

* compile warnings cleanup

* Remove redundant #ifdef condition
2017-06-03 17:11:43 -05:00
Bob-the-Kuhn
c34d7a29a6 fix redefinition errors for redundant_temperature
Removing redundant_temperature from public section and leaving it in the
private section
2017-06-03 16:40:14 -05:00
Bob-the-Kuhn
862def2ef4 Merge pull request #6947 from Bob-the-Kuhn/allow-GCODE_DEBUG-when-UBL-enabled
Allow DEBUG_GCODE_PARSER when UBL is enabled
2017-06-03 13:34:46 -05:00
Bob-the-Kuhn
6a5d3b580d fix "hex_address not defined" when UBL is enabled 2017-06-03 13:19:55 -05:00
Scott Lahteine
d336e413aa Merge pull request #6942 from thinkyhead/bf_cleanups_friday
General cleanup after recent commits
2017-06-03 00:48:57 -05:00
Scott Lahteine
789b2928a8 Tweak scrolling message code 2017-06-02 23:45:53 -05:00
Scott Lahteine
fc7d7f87b4 Init probe test pin with FastIO 2017-06-02 23:45:52 -05:00
Scott Lahteine
0282452cea Make Parser::seen volatile 2017-06-02 23:45:52 -05:00
Scott Lahteine
9a305a467b Patch LCD Contrast menu item 2017-06-02 23:45:52 -05:00
Scott Lahteine
90ccac4bcf Clean up after recent commits 2017-06-02 23:45:52 -05:00
Bob-the-Kuhn
fff50d3958 Merge pull request #6940 from Bob-the-Kuhn/Gcode---allow-XY
Gcode.cpp - spaces and parameters
2017-06-02 21:21:32 -05:00
Bob-the-Kuhn
2130f10de8 allow space between parameter and value 2017-06-02 19:57:22 -05:00
Bob-the-Kuhn
ebda4663c3 for discusion 2017-06-02 19:42:43 -05:00
Scott Lahteine
e2c3695e11 Merge pull request #6932 from thinkyhead/bf_zrib_2.0
Support for ZRIB v2.0 Control Board
2017-06-02 16:54:34 -05:00
FATALHERMIT
911079104e Support for ZRIB v2.0 Control Board 2017-06-02 12:05:46 -05:00
Scott Lahteine
65a0212866 Easier override of FILWIDTH_PIN 2017-06-02 12:05:46 -05:00
Scott Lahteine
147d9d76fc Merge pull request #6928 from Bob-the-Kuhn/Fix-case-light-logic-on-Azteeg-X3-boards
Fix case light logic on Azteeg_X3 boards.
2017-06-01 20:14:15 -05:00
Scott Lahteine
9118e135f9 Merge pull request #6931 from thinkyhead/bf_malyan_m150
Malyan m150 configurations
2017-06-01 19:52:38 -05:00
guntherv73
4288c4fb4f Configurations for Malyan M150 2017-06-01 19:26:29 -05:00
Scott Lahteine
1919cb0d1e Config cleanups 2017-06-01 19:26:16 -05:00
Scott Lahteine
e800743268 Merge pull request #6921 from tcm0116/pause_flash
Fix issues with advanced pause
2017-06-01 18:04:25 -05:00
Christopher Pepper
61db0fd102 Add issue template for github 2017-06-01 20:33:39 +01:00
Bob-the-Kuhn
9a9bbfc57c Fix case light logic on Azteeg_X3 boards. 2017-06-01 12:33:24 -05:00
Thomas Moore
a32f7b329c Fix heater status display for advanced pause 2017-06-01 12:29:47 -05:00
Scott Lahteine
ac33a378c0 Merge pull request #6922 from thinkyhead/bf_probe_options
Prevent illegal leveling combinations
2017-06-01 11:12:02 -05:00
Scott Lahteine
445865ea03 REPRAPWORLD_KEYPAD is NEWPANEL but not ULTIPANEL 2017-05-31 23:48:03 -05:00
Scott Lahteine
4296a8b74e For status scrolling, pad a short message 2017-05-31 23:48:03 -05:00
Scott Lahteine
4a96433b7e Simplify counting of printable characters 2017-05-31 23:45:41 -05:00
Scott Lahteine
8d69394ae1 Fix LCD printing of progmem strings 2017-05-31 23:36:57 -05:00
Scott Lahteine
c74d4dede6 Prevent illegal leveling combinations
Addressing issue #6901
2017-05-31 23:36:57 -05:00
Scott Lahteine
155aa62fb0 Merge pull request #6912 from thinkyhead/bf_better_pulse_delay
Account for dual XYZ in pulse delay cycles estimate
2017-05-31 22:21:47 -05:00
Scott Lahteine
a5fa586642 Preferred patch to gcode.h 2017-05-31 21:18:16 -05:00
Bob-the-Kuhn
4ecd41ef90 Merge pull request #6915 from Bob-the-Kuhn/gcode.h-2
gcode.h - another compile error
2017-05-31 14:03:33 -05:00
Bob-the-Kuhn
1b41e1f645 another compile error
only seen if

#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
      ...
    #if
ENABLED(ULTIPANEL) && DISABLED(DISABLE_M503)
2017-05-31 13:59:49 -05:00
Bob-the-Kuhn
65bd4c8c94 Merge pull request #6797 from Bob-the-Kuhn/M355-case-lightimprovements-(1.1.x)
M355 case light improvements (replaces PR #5685)
2017-05-31 13:33:59 -05:00
Bob-the-Kuhn
7ed0761e09 Merge pull request #6914 from Bob-the-Kuhn/Gcode.h-bug-fix
gcode.h - fix compile error
2017-05-31 13:29:19 -05:00
Bob-the-Kuhn
9657e7d3ee copied file changes from PR #5685
==============================

Configuration_adv.h changes

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

add "live" LCD update

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

P & S version

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

final (hopefully) tested version

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

update M115 capabilities print

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

Menu changes portion of the requested changes

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

changed USEABLE_HARDWARE_PWM from a function to a series of macros

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

changes per review
2017-05-31 13:22:38 -05:00
Bob-the-Kuhn
8206bb9bb9 fix compile error
invalid conversion from 'const char*' to 'char*' [-fpermissive]
2017-05-31 13:17:01 -05:00
Scott Lahteine
df91346188 Account for dual XYZ in pulse delay cycles estimate 2017-05-31 12:23:28 -05:00
Scott Lahteine
6354b40231 Merge pull request #6903 from thinkyhead/bf_fix_delta_m24_m125
Patch M24 / M125 for delta
2017-05-31 00:03:20 -05:00
Scott Lahteine
7236109f2a Patch M24 / M125 for delta 2017-05-30 23:07:29 -05:00
Scott Lahteine
be17033762 Fix case light menu toggle 2017-05-30 14:03:45 -05:00
Scott Lahteine
89b93058e3 Merge pull request #6887 from christianh17/PR-sanitycheck
enable DEACTIVATE_SERVOS_AFTER_MOVE with switching nozzle
2017-05-30 13:43:39 -05:00
Scott Lahteine
05b66234ae Merge pull request #6895 from thinkyhead/bf_user_commands
Custom user commands menu
2017-05-30 13:40:50 -05:00
Scott Lahteine
84a0a77c59 Merge pull request #6852 from tcm0116/mixing_extruder_lin_advance
Generate error if MIXING_EXTRUDER and LIN_ADVANCE are both enabled
2017-05-30 13:37:51 -05:00
Scott Lahteine
d33ae33103 Merge pull request #6897 from thinkyhead/bf_fix_lcd_scrolling
Fix LCD scrolling character counting
2017-05-30 03:45:59 -05:00
Scott Lahteine
266ae8912a Formatting in _draw_heater_status 2017-05-30 03:32:16 -05:00
Scott Lahteine
6b9ca16f36 Patch lcd_print edge limit code 2017-05-30 03:32:15 -05:00
Tannoo
74d6dee920 User Command (Script) Menu
The menu (commands / scripts) is configurable in `Configuration_adv.h`.

- Added conditionals.
- Changed script handling.
- Slimmed and working!
- Added Status message.
- Returning to lcd status screen now!
- Example Configs Updated.
- Cleanups by @thinkyhead
2017-05-30 02:33:57 -05:00
Scott Lahteine
d9c8072037 Edit PROPORTIONAL_FONT_RATIO comment 2017-05-30 01:29:39 -05:00
Scott Lahteine
bad432add7 Merge pull request #6894 from thinkyhead/bf_lcd_draw_order
Fix LCD to draw after value changes
2017-05-30 00:02:00 -05:00
Scott Lahteine
46b32e4548 Cleanup LCD interface, add lcd_reset_status 2017-05-29 22:16:13 -05:00
Scott Lahteine
ca99d67ede Fix UBL "Info screen" menu items 2017-05-29 19:55:26 -05:00
Scott Lahteine
2c7a39bc0e Fix LCD print aborted message 2017-05-29 19:52:01 -05:00
Scott Lahteine
0f1e8c195d Draw on LCD after value has changed 2017-05-29 19:42:30 -05:00
Scott Lahteine
5d6366d4e6 Merge pull request #6893 from thinkyhead/bf_lcd_leveling_fixes
Patch PROBE_MANUALLY + LCD_BED_LEVELING
2017-05-29 18:15:22 -05:00
Scott Lahteine
51587c4b43 Rename Feedrate to Velocity to match prior naming 2017-05-29 17:54:15 -05:00
Scott Lahteine
9677f3f2f5 Patch up LCD Bed Leveling menu 2017-05-29 17:51:11 -05:00
Scott Lahteine
fc2eaab7f3 Show home option in level bed menu 2017-05-29 17:51:10 -05:00
Scott Lahteine
c6a7adc293 Patch G29 A and Q arguments to bypass setup 2017-05-29 17:51:10 -05:00
Scott Lahteine
4cece2d72e Use NAN for G29 W omitted parameters 2017-05-29 17:51:10 -05:00
Scott Lahteine
2d71569138 Fix spacing in JSON output 2017-05-29 17:51:10 -05:00
Scott Lahteine
b2d3c8aedd Have G28 do a refresh of the display 2017-05-29 17:51:10 -05:00
Scott Lahteine
50ab9c2e04 General cleanup of spacing, comments 2017-05-29 15:34:14 -05:00
Scott Lahteine
f1e33afda4 Return to Bed Leveling menu when done 2017-05-29 15:31:02 -05:00
Scott Lahteine
78d8c598e1 Fix lcd_synchronize with message 2017-05-29 15:31:02 -05:00
Scott Lahteine
eb39d6e3e2 Don't draw progress bar until it has 1% 2017-05-29 15:31:01 -05:00
Scott Lahteine
194f8b2f55 Start at Z=0 in manual probing 2017-05-29 15:31:01 -05:00
Scott Lahteine
6f89db11f0 Allow lcd_setstatusPGM to reset the alert level 2017-05-29 15:31:00 -05:00
Scott Lahteine
25114414cd Merge pull request #6860 from thinkyhead/bf_case_light_toggle
Case light as a toggle menu item
2017-05-28 18:30:55 -05:00
Scott Lahteine
3fe333143c Case light as a toggle menu item 2017-05-28 14:32:07 -05:00
Scott Lahteine
d013bddfa8 Merge pull request #6876 from thinkyhead/bf_extend_leveling_menu
Extend the ABL/MBL Bed Leveling menu
2017-05-28 14:19:02 -05:00
Scott Lahteine
58556991da Merge pull request #6877 from thinkyhead/bf_scrolling_status
Scrolling status message (option)
2017-05-28 14:12:36 -05:00
Scott Lahteine
01e7e234c6 Add more options to the Bed Leveling menu 2017-05-28 14:04:28 -05:00
Scott Lahteine
0cbe448edf Split up Control > Motion submenu 2017-05-28 12:52:24 -05:00
Scott Lahteine
a3645ec921 Reference op with variable name 2017-05-28 11:33:22 -05:00
Scott Lahteine
71367fd518 Scrolling status message option 2017-05-28 11:26:28 -05:00
Scott Lahteine
b0eae68f57 Prevent bed temperature being set too high 2017-05-28 11:11:17 -05:00
Scott Lahteine
493f0b0c62 Fix some compiler warnings 2017-05-28 11:06:33 -05:00
christianh17
f379a326cc enable DEACTIVATE_SERVOS_AFTER_MOVE with switching nozzle
When using switching nozzle it should be possible to disable the servo after move. Do it only if you do not need the servo power to keep the position.
2017-05-28 15:33:28 +02:00
Scott Lahteine
33279a1e02 Code style tweak to gcode.h 2017-05-27 19:47:26 -05:00
Ernesto Martinez
ac959b12ee Updates to language_es.h based on latest updates. (#6871)
Spanish language updates
2017-05-27 19:08:39 -05:00
Scott Lahteine
55c700d537 Tweak to gcode.h 2017-05-26 22:11:31 -05:00
Bob-the-Kuhn
f0d545b950 Merge pull request #6866 from Bob-the-Kuhn/Parser-fix
Parser fix
2017-05-26 15:12:59 -05:00
Bob-the-Kuhn
868e7db4ae value check was looking at the code 2017-05-26 14:49:42 -05:00
Thomas Moore
fb5e0ffe16 Unify M600 and M125 pause features (#6407)
* Unify M600 and M125 pause features
* Cleanup per thinkyhead's comments
* Rename filament_change_menu_response to advanced_pause_menu_response
* Include HAS_BED_PROBE in QUIET_PROBING
* Update gMax example file
* is_idle() is out of scope without the braces
* Convert FT-i3-2020 to Advance Pause names...
* Allow pause even if not printing
2017-05-26 13:01:02 -05:00
Scott Lahteine
73ed0c63b4 Merge pull request #6858 from thinkyhead/bf_leveling_patch
Fixes for PROBE_MANUALLY and LCD_BED_LEVELING
2017-05-26 12:13:43 -05:00
Scott Lahteine
b3a97b5013 Patch up LCD level bed menus 2017-05-25 23:53:31 -05:00
Scott Lahteine
78af2b1444 Fix PROBE_MANUALLY via G-code 2017-05-25 23:53:31 -05:00
Scott Lahteine
082da23391 One fewer EOL in M503 output 2017-05-25 23:53:31 -05:00
Scott Lahteine
b1a4788593 Add .ino.cpp to .gitignore 2017-05-25 23:28:42 -05:00
Scott Lahteine
b15e531464 Fix screen change on character display 2017-05-25 15:29:14 -05:00
Thomas Moore
44e657766e Add incompatibility error to Sanity Check for MIXING_EXTRUDER and LIN_ADVANCE 2017-05-25 08:06:27 -05:00
Scott Lahteine
735405b2a4 Merge pull request #6848 from thinkyhead/bf_scara_M665
Add M665 for SCARA
2017-05-24 20:51:51 -05:00
Scott Lahteine
ffa901f373 Merge pull request #6839 from thinkyhead/bf_day_ending_in_y
UBL ultralcd.cpp patches
2017-05-24 17:55:44 -05:00
Scott Lahteine
361cbba113 Use M665 to set SCARA angle offsets 2017-05-24 17:49:24 -05:00
Scott Lahteine
5ed63a5724 Apply const in prepare_kinematic_move_to 2017-05-24 17:49:24 -05:00
Scott Lahteine
5cbe0244c5 Fixes for spindle/laser and SCARA probe bounds 2017-05-24 17:49:23 -05:00
Scott Lahteine
1f52c9f5df Neater Megatronics 3 pins 2017-05-24 17:49:23 -05:00
Scott Lahteine
af81cb4cbb Patch for M503 output 2017-05-24 17:49:09 -05:00
Scott Lahteine
0392329cb9 Merge pull request #6634 from thinkyhead/bf_fresh_gcode_parser
New GCode Parser
2017-05-24 16:16:50 -05:00
Scott Lahteine
1d167a6874 Some cleanup, fixes for ultralcd.cpp UBL code
- Free up 30 bytes of SRAM in UBL LCD code
- Fix BUILD_ABS_MESH temperature
- Fix UBL indentation in ultralcd.cpp
- UBL vars lowercase, "convert to positive" sensibly
2017-05-24 01:10:42 -05:00
Scott Lahteine
f4028fe088 New GCode Parser - Implementation 2017-05-23 14:15:10 -05:00
Scott Lahteine
002a06c507 New GCode Parser - Configuration 2017-05-23 14:15:07 -05:00
Scott Lahteine
2dfb7c212c Merge pull request #6836 from thinkyhead/bf_fix_ubl_motion
One more mesh_index_to_npos update
2017-05-23 13:21:36 -05:00
Scott Lahteine
ad915b667e One more mesh_index_to_npos update
Followup to #6827
2017-05-23 13:02:50 -05:00
Scott Lahteine
4ce228f2a0 Merge pull request #6833 from thinkyhead/bf_move_g7
G42: Fix and extend
2017-05-23 11:49:50 -05:00
Scott Lahteine
2881f0a48d Fix, extend G42 with P (probe) parameter
- Also fix handling of SCARA and misuse of `codenum`.
2017-05-23 04:55:42 -05:00
Scott Lahteine
d252d1b6a2 Merge pull request #6831 from thinkyhead/bf_move_g7
Move G7 to G42
2017-05-23 03:02:57 -05:00
Scott Lahteine
6d574883a0 Merge pull request #6830 from thinkyhead/bf_redraw_flags
Use redraw flag for both types of LCD
2017-05-23 03:02:13 -05:00
Brian
82ca6248e2 Move G7 to G42
See: #6777
2017-05-22 23:21:35 -05:00
Scott Lahteine
26ffa558a3 Use redraw flag for both types of LCD 2017-05-22 18:34:54 -05:00
Scott Lahteine
3ff7515527 Merge pull request #6817 from cbusillo/patch-1
missing enable for M605 for duplication mode
2017-05-22 18:07:11 -05:00
Scott Lahteine
62d8e35adc Merge pull request #6827 from thinkyhead/bf_day_ending_in_y
Make UBL a complete singleton
2017-05-22 17:51:03 -05:00
Scott Lahteine
34cfbc90cd Use new attribute macros in more places 2017-05-22 17:38:58 -05:00
Scott Lahteine
85b967657e Embed G26/G29 in ubl class, with enhancements 2017-05-22 17:38:58 -05:00
Scott Lahteine
c99bd69889 Apply const float & more 2017-05-22 17:38:36 -05:00
Scott Lahteine
ad5638f78c Cleanup some fastio code 2017-05-22 17:38:36 -05:00
Scott Lahteine
e271521c39 Single user_canceled function in G26 2017-05-22 17:38:36 -05:00
Scott Lahteine
c2ea22da49 Clean up whitespace 2017-05-22 17:38:36 -05:00
Scott Lahteine
ceb62fc7e1 Fixes #6828: M428 bug 2017-05-22 17:34:03 -05:00
oldmcg
48f7652143 UBL G29 -P3.1 smart fill (#6823)
* UBL G29 -P3.1 mesh fill with distance-weighted least squares fit.

* Back to original -O0 on G29 for now.
2017-05-22 12:33:50 -05:00
Scott Lahteine
850203fb3a Merge pull request #6816 from thinkyhead/bf_lcd_live_editing
Constrain LCD status message rendering
2017-05-22 11:15:35 -05:00
Roxy-3D
3129260c44 Misc. Clean Up (#6822)
* Misc. Clean Up

Mostly UBL related clean up.
- But fixed a bug in the thermistortables.
- Made G26 more responsive to user aborts.
- Added sanity checks for older name for UBL_MESH_VALIDATION.
- Made G29 P4 able to edit invalidated mesh points
- Restore a reasonable Fade Height for UBL when creating new state information
- Get UBL's Topology Map to look a little bit better
- Make sure the user doesn't see a blank screen when doing Mesh Editing.

* Huh???   GitHub Desktop screwed up!

* get the planner object in scope

* Fix out of scope z_fade_height

* Travis timed out...

I need a change so I can force a new commit and sync.
2017-05-21 22:09:51 -05:00
cbusillo
3b4116e73b missing enable for M605 for duplication mode
I believe gcode_M605 will not be called when using DUAL_NOZZLE_DUPLICATION_MODE without this change.
2017-05-21 13:54:20 -04:00
Scott Lahteine
5e8892d6b5 Show Restore Failsafe item with EEPROM off 2017-05-21 12:52:44 -05:00
Scott Lahteine
76af9ac7c5 tweaks 2017-05-21 12:51:58 -05:00
Scott Lahteine
ba5910ab6c Constrain LCD status message rendering 2017-05-21 12:35:16 -05:00
Scott Lahteine
a83f6db679 Merge pull request #6815 from MagoKimbra/fix_ultralcd_lcd_contrast
Fix set_lcd_contrast
2017-05-21 12:10:02 -05:00
MagoKimbra
2c309a8f7c Fix set_lcd_contrast 2017-05-21 19:01:44 +02:00
Scott Lahteine
22dbb2117c Merge pull request #6812 from thinkyhead/bf_day_ending_in_y
Cleanup code, organize & document fastio pin mappings
2017-05-21 11:39:04 -05:00
Roxy-3D
364f8fb613 Update Configuration.h files to better names (#6814)
Changed UBL_G26_MESH_EDITING to UBL_G26_MESH_VALIDATION
Added UBL_MESH_EDIT_MOVES_Z to prepare for that change (coming next)
2017-05-21 11:10:22 -05:00
Scott Lahteine
d7fda2fe49 Formatting, const in G33 2017-05-21 10:40:05 -05:00
Scott Lahteine
1519b0e7c1 Split up fastio.h, document pin mappings 2017-05-21 10:33:27 -05:00
Scott Lahteine
49599caade General cleanup to utf_mapper.h 2017-05-21 10:33:27 -05:00
Scott Lahteine
02f15f6775 UBL-related cleanup, spacing, standards
Reference: #6804
2017-05-21 10:33:26 -05:00
Scott Lahteine
52e20aeab3 Pins-related cleanup, formatting 2017-05-21 07:18:03 -05:00
Scott Lahteine
ea906e4da7 Merge pull request #6810 from thinkyhead/bf_lcd_live_editing
Add "live editing" option to LCD menus
2017-05-21 06:11:52 -05:00
Scott Lahteine
c2ca85aeb2 Merge pull request #6811 from thinkyhead/bf_temp_float_stuff
Restore current temp accessors to float
2017-05-21 06:10:31 -05:00
Scott Lahteine
11fc9564c9 Add live editing option to LCD menu 2017-05-21 05:29:46 -05:00
Scott Lahteine
8a0a5cfccc Temp-related cosmetic changes 2017-05-21 04:49:25 -05:00
Scott Lahteine
b29dbbd5e4 Use uint16_t for temps 2017-05-21 04:48:53 -05:00
Scott Lahteine
ebcd1aaf88 Access hotend/bed temperatures as float 2017-05-21 04:46:31 -05:00
Scott Lahteine
0e1f0efc4b Merge pull request #6809 from thinkyhead/bf_G33_evolves
G33 updates
2017-05-20 20:12:36 -05:00
Scott Lahteine
6ce2b1ff4a G33 evolutionary changes 2017-05-20 19:23:39 -05:00
Scott Lahteine
b3a38fd300 Clean up bugfix readme 2017-05-20 19:20:53 -05:00
Scott Lahteine
3c061a9f9a UBL tabs, whitespace, spelling, etc. 2017-05-19 14:16:50 -05:00
Scott Lahteine
dc2d215355 Merge pull request #6791 from thinkyhead/bf_ubl_pringle
Disable PROBE_MANUALLY for UBL
2017-05-19 07:50:58 -05:00
Scott Lahteine
75badae2f8 Disable PROBE_MANUALLY for UBL
Plus some other UBL tweaks.
2017-05-19 07:13:18 -05:00
Scott Lahteine
94a4af1d7f Merge pull request #6773 from thinkyhead/bf_lcd_patch_e5
Patch LCD code for 5th extruder
2017-05-18 15:26:55 -05:00
Scott Lahteine
5970fe72d1 Merge pull request #6782 from bgort/azteegtweak
Tweak Azteeg X3 PRO _pins.h so Viki2 will work for those without a case light
2017-05-18 15:26:16 -05:00
Brian
01f452c37c Tweak Azteeg X3 PRO _pins.h so Viki2 will work for those without a case light.
- add comment explaining that the Panucatt Viki2 wiring diagram uses pin 44
2017-05-18 13:00:13 -04:00
bgort
47245675fc Merge pull request #6777 from bgort/g7
Add `G7` gcode command to move between UBL mesh points
2017-05-18 06:44:13 -04:00
Brian
e09b4ce4a5 Add checking 2017-05-17 19:46:16 -04:00
Brian
13599a73c7 Add G7 gcode command to move between UBL mesh points
- can be augmented in the future to enable for other leveling systems

Quite simple, but did not want to modify `G1` as the additional checking would slow it down.

Tested & working.
2017-05-17 19:05:36 -04:00
bgort
e16743da45 Merge pull request #6775 from bgort/m421fix
Fix recent regressions, &c.
2017-05-17 17:42:35 -04:00
Brian
43c24f0027 Fix recent regressions, &c.
- fix broken `M421` due to less-than-careful optimization
- add HOME_AFTER_DEACTIVATE define to advanced config so not everyone has to rehome after steppers are deactivated
- misc. cleanups (remove unused label, unused variables)
2017-05-17 17:21:46 -04:00
Scott Lahteine
3843a5151a Patch LCD code for 5th extruder, EEPROM reset 2017-05-17 15:33:51 -05:00
Scott Lahteine
6c064bb7d6 Some probe_pt error-handling 2017-05-17 15:33:51 -05:00
bgort
aad1acc418 Merge pull request #6772 from bgort/meshstor
Fix broken EEPROM save/load
2017-05-17 12:42:14 -04:00
Brian
3370329751 Fix broken EEPROM save/load 2017-05-17 12:41:27 -04:00
Scott Lahteine
f0fe26c411 Ensure Arduino.h and configs are included for serial.cpp 2017-05-17 05:07:35 -05:00
Scott Lahteine
ffb5353294 Merge pull request #6738 from thinkyhead/bf_config_crc_rebase
Implement CRC16, develop mesh allocation table
2017-05-17 04:44:00 -05:00
Scott Lahteine
e806e6419a Merge pull request #6768 from thinkyhead/rc_spindle_m3_m5
Spindle / Laser support
2017-05-17 04:39:32 -05:00
Scott Lahteine
d6f49c6626 Merge pull request #6752 from jdelahayes/bugfix-1.1.x
Update french language
2017-05-17 04:32:28 -05:00
Scott Lahteine
55a87da036 SPINDLE/LASER implementation 2017-05-17 04:26:15 -05:00
Scott Lahteine
ffe0e2d19a SPINDLE/LASER pins changes 2017-05-17 04:23:06 -05:00
Scott Lahteine
99c4900a98 SPINDLE/LASER config changes 2017-05-17 04:23:06 -05:00
Scott Lahteine
a3abfeac47 Mark strings needing translation 2017-05-17 03:49:33 -05:00
Scott Lahteine
7f4e4b1212 UBL name/state methods 2017-05-17 03:49:32 -05:00
Brian
7852369987 Implement CRC16, develop mesh allocation table
- Add crc16 utility function
 - Implement CRC16 for config store, remove old checksum, increment layout version
 - Move UBL mesh store/load to MarlinSettings; increment UBL_VERSION
 - Begin to lay out MAT structure, prototype functions, etc.
 - Rename ubl.state.eeprom_storage_slot to .storage_slot
 - Misc. optimization
 - Cleanup/standardize/improve some messages

This is a work in progress!
2017-05-17 03:49:19 -05:00
Scott Lahteine
00d358d92d Fix a PROBE_MANUALLY bug in ultralcd.cpp 2017-05-17 03:49:19 -05:00
Scott Lahteine
13a06711ad Add a Travis test for UBL + DELTA 2017-05-17 03:49:19 -05:00
Scott Lahteine
4dc49f8424 Merge pull request #6762 from thinkyhead/bf_noz_vs_ext_servo
Separate SWITCHING_NOZZLE and SWITCHING_EXTRUDER
2017-05-16 19:53:07 -05:00
fixoid
c2321b1cdd Separate SWITCHING_NOZZLE and SWITCHING_EXTRUDER 2017-05-16 19:25:17 -05:00
Scott Lahteine
455a24f6ff Merge pull request #6764 from thinkyhead/bf_cleanups_tuesday
Prevent home_all_axes picking up XYZ parameters from command
2017-05-16 19:13:15 -05:00
Scott Lahteine
238fb53617 Patch home_all_axes to ignore G28 XYZ parameters 2017-05-16 16:18:38 -05:00
Scott Lahteine
6b6630e11b Clean up trailing whitespace and tabs 2017-05-16 16:06:18 -05:00
Roxy-3D
d30e478f97 Fix incorrectly optimized find_closest_mesh_point_of_type() function (#6761) 2017-05-16 15:24:24 -05:00
oldmcg
5a9e52a3e0 Use COPY_XYZE macro to copy exactly 4 elements (#6758)
Fix undefined DELTA_PROBEABLE_RADIUS for UBL_DELTA
2017-05-16 11:47:51 -05:00
Roxy-3D
8606644343 M48 Fix for Delta Configuration Files & UBL G29 only homes when necessary (#6757)
* Fix M48 for Delta's  There was a scope issue: DELTA_PROBEABLE_RADIUS wasn't getting defined.

* Check if the specified G29 command requires homing
2017-05-16 11:23:50 -05:00
Tannoo
0cd398c25d UBL Menu Updates (#6751)
Things should be pretty stable for a while.   
But it wouldn't surprise me if the Delta people have a need for a few special commands.
2017-05-16 08:45:31 -05:00
Johann Delahayes
a5737cba7c Update french language 2017-05-16 12:27:42 +02:00
Scott Lahteine
0fef9a2983 Remove "ubl." prefix from calls within ubl method 2017-05-16 01:19:45 -05:00
Scott Lahteine
14a4257c7b UBL tabs, whitespace, spelling, etc. 2017-05-16 01:19:45 -05:00
Scott Lahteine
56e2e331ed UBL G29: replace 'O' with 'T'
Since we already used 'T' for `G29` Topology Report in the past, and since 'T' is available…
2017-05-16 01:18:41 -05:00
Scott Lahteine
091f94a6bf Fix up M421 and some comments 2017-05-16 01:14:03 -05:00
Scott Lahteine
4ec4ecff1a Reduce find_closest_mesh_point_of_type a little 2017-05-16 01:14:03 -05:00
Scott Lahteine
f1a1c6873e Patch lcd_implementation_status_screen compiler warning 2017-05-16 00:59:50 -05:00
moebyusDev
2266c0780d fixed spanish lang
It was missing MSG_FILAMENT_CHANGE_HEAT_2 and MSG_FILAMENT_CHANGE_HEATING_2
2017-05-16 00:35:36 -05:00
oldmcg
b213a45efb UBL_DELTA post merge cleanup (#6705)
* UBL_DELTA post merge cleanup:
   fix fade_height, lost during some previous merge
   fix float cx,cy which are not const
   move repeated z_cxcy calc line inside loop
   style fixes and comment fixes/alignment

* Update ubl_motion.cpp

remove unnecessary parentheses

* Update Conditionals_post.h

Change name of define to more accurate meaning:
UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN
which is not and should not be the default for cartesians with UBL.
2017-05-16 00:30:29 -05:00
Roxy-3D
6f86c46fa6 Fix typo that caused scope issues for DELTA (#6750) 2017-05-15 23:13:45 -05:00
Roxy-3D
1fbcbc05f6 UBL no longer flout's the sacred GCode standard (#6745)
Also clean up ubl_motion.cpp debug info and fix declaration of cx & cy
2017-05-15 16:25:01 -05:00
Scott Lahteine
c262ea92e0 Merge pull request #6733 from abusca/Euskera
Updated Basque translation
2017-05-15 02:30:11 -05:00
Scott Lahteine
b17bcd56da Merge pull request #6736 from thinkyhead/bf_axis_unhomed
More constraint on axis_unhomed_error
2017-05-14 17:20:04 -05:00
Scott Lahteine
267f77b18b More constraint on axis_unhomed_error 2017-05-14 16:03:02 -05:00
Aaron Busca
645096b87a Updated Basque translation
Updated Basque translation with new strings.
2017-05-14 18:29:50 +02:00
Roxy-3D
40d95a4e23 Update the gMax files to display better with Proportional Fonts (#6727)
Update the gMax files to display better with Proportional Fonts
2017-05-13 16:33:04 -05:00
Roxy-3D
c06af63f87 G26's default behaviour ought to be the entire mesh (#6726)
Adding the capability to specify ahead of time how much of the validation pattern to print made it so by default G26 only did one circle and no connecting lines.

It is more natural for the unsophisticated user to just do the entire mesh (bed).   We default the repetition count to GRID_MAX_POINTS+1 to insure we get every last one of them!
2017-05-13 15:53:44 -05:00
Roxy-3D
15040821e0 Setup FolgerTech-i3-2020 files better for the user (#6724)
UltiPanel was enabled, but technically, it is a REPRAP_DISCOUNT_SMART_CONTROLLER
Either configuration works on the machine.  But we want it 'Right'.

Setup the Proportional Font spacing so columns line up nicer on PronterFace and Repetier Host.
2017-05-13 15:14:03 -05:00
Scott Lahteine
2da4398fb5 Merge pull request #6716 from thinkyhead/bf_ubl_prepare_move
Fix prepare_move... for UBL
2017-05-13 06:22:03 -05:00
Scott Lahteine
67c9b1e332 Update M665 comment, fix M665 code_value code. 2017-05-13 05:11:29 -05:00
Scott Lahteine
37399e3cb5 Fix prepare_move_to_destination_cartesian for UBL 2017-05-13 04:13:19 -05:00
Scott Lahteine
a7fb55ea6d Use GRID_MAX_POINTS. Some formatting 2017-05-12 06:57:19 -05:00
Scott Lahteine
e51b5774db Merge pull request #6699 from mtowara/patch-1
Bugfix PRINTER_EVENT_LEDS
2017-05-12 05:58:25 -05:00
Scott Lahteine
056350d9bf Merge pull request #6656 from FHeilmann/fix_fwretract_pos_z_move
Fix FWRetract with positive z-moves during retracted state
2017-05-12 05:56:08 -05:00
Scott Lahteine
0d48fd4b6b Merge pull request #6697 from thinkyhead/bf_wednesday_cleanup
Wednesday-Thursday cleaning up after
2017-05-12 05:33:21 -05:00
Scott Lahteine
0e582bcfb7 Fix #6691 - redundant line in M665 2017-05-12 05:17:38 -05:00
Markus Towara
68ae7c8d7a Bugfix PRINTER_EVENT_LEDS
Extra closing curly bracket terminates while loop early if PRINTER_EVENT_LEDS defined
2017-05-12 12:13:23 +02:00
Scott Lahteine
ba29da56e0 Add disclaimer for verboten parameters 2017-05-12 02:34:53 -05:00
Scott Lahteine
0696dda470 Cleanups to UBL_DELTA 2017-05-12 02:34:53 -05:00
Scott Lahteine
cbfca29522 M421 tweaks, just to use const 2017-05-12 01:32:34 -05:00
Scott Lahteine
233f824dd6 Define GRID_MAX_POINTS 2017-05-12 01:32:34 -05:00
Scott Lahteine
b17e2d3dcd Apply const in Marlin_main.cpp 2017-05-12 01:32:33 -05:00
Scott Lahteine
92fbea2906 Add some GCodes to the header of Marlin_main.cpp 2017-05-12 01:32:33 -05:00
Scott Lahteine
94e90ca26c Tweak M80/M81 descriptions 2017-05-12 01:32:33 -05:00
Scott Lahteine
301958b3e0 Simplify mfdoc, mfpub 2017-05-12 01:32:33 -05:00
Scott Lahteine
ee50dfaaf3 Adjust G26 arguments 2017-05-12 01:32:33 -05:00
Scott Lahteine
b0ba5cae73 Fix a spelling boo 2017-05-12 01:32:33 -05:00
oldmcg
91841d75c9 UBL_DELTA (#6695)
UBL on Delta's....     Should be close!    Should not affect any Cartesian printer.
2017-05-11 22:33:47 -05:00
bgort
445003dbb8 Merge pull request #6694 from bgort/g29p2b
UBL:  Minor improvement to G29 P2
2017-05-11 20:44:43 -04:00
bgort
f01a14e7d0 Merge pull request #6689 from bgort/m421mod
M421:  Add 'adjust closest point' capability
2017-05-11 19:08:42 -04:00
Brian
5a5dba6fc8 UBL: Minor improvement to G29 P2
- allow H code value to override probing height
- minor cleanups
2017-05-11 18:54:34 -04:00
Brian
ae676490c9 M421: Add 'adjust closest point' capability
- Split M421 into separate versions for bilinear and ubl
- Fix minor issue in G26
2017-05-11 12:10:38 -04:00
Scott Lahteine
2819228d4f Merge pull request #6681 from thinkyhead/bf_better_mfpub
Better mfpub
2017-05-10 23:05:47 -05:00
Scott Lahteine
9a688d1456 Merge pull request #6682 from thinkyhead/bf_M80_s_arg
"M80 S" to report the state of the PSU pin
2017-05-10 20:29:01 -05:00
Roxy-3D
b63e82f309 M421 Mesh Point Offset and misc. UBL clean up (#6685)
* M421 Mesh Point Offset and misc. UBL clean up

Allow M421 to accept an offset as well as absolute value for a specified
mesh point.
And misc. UBL clean up to reduce redundent code.

* Better error checking for M421

* Fix M421 Y index bug

I just noticed....  We've had a Y index bug for who knows how long?
2017-05-10 18:54:10 -05:00
Pablo Ventura
539e0c2f31 "M80 S" to report the state of the PSU pin 2017-05-10 17:58:58 -05:00
Scott Lahteine
60a4ca1182 Better mfpub 2017-05-10 17:45:58 -05:00
bgort
df42428281 Merge pull request #6665 from bgort/font
Add proportional font adjustment ratio
2017-05-10 17:30:51 -04:00
Brian
2604742191 Add proportional font adjustment ratio
- update example configs
2017-05-10 17:19:03 -04:00
bgort
b3407a371b Merge pull request #6676 from bgort/g26zhop
G26: Add 0.5mm Z-bump between circles to minimize pattern scraping
2017-05-10 17:12:05 -04:00
bgort
c33d99c5b2 Merge pull request #6680 from bgort/g26repeat
G26:  Add 'Repeat' Option
2017-05-10 17:11:34 -04:00
Bob-the-Kuhn
7325035aac Merge pull request #6637 from Tannoo/UBL_Menu_System_1.1
UBL Menu System 1.1
2017-05-10 15:54:48 -05:00
Brian
f7a201b0d0 G26: Add 'Repeat' Option
- Allows for specifying number of points to print/validate, using 'R' code like with G29 P4 Rx
- Moved the code for Random to 'M' so we could be consistent with G29 P4
- G26 instructions indenting/cleanup
2017-05-10 16:52:08 -04:00
Brian
9c5957fc77 G26: Add 0.5mm Z-bump between circles to minimize pattern scraping 2017-05-10 16:11:59 -04:00
bgort
bbb2b86c34 Merge pull request #6672 from bgort/ublmotion
UBL Cleanup/Bugfix
2017-05-10 14:23:07 -04:00
Brian
4da14b14f4 UBL Cleanup/Bugfix
- Fix bug in ubl_line_to_destination
- Improve/fix output of some ubl.h functions
2017-05-10 13:56:17 -04:00
Tannoo
66db6c3acc UBL Menu System 1.1
/**
     * UBL System submenu
     *
     *  Prepare
     * - Unified Bed Leveling
     *   - Activate UBL
     *   - Deactivate UBL
     *   - Mesh Storage
     *       Memory Slot:
     *       Load Bed Mesh
     *       Save Bed Mesh
     *   - Output Map
     *       Map Type:
     *       Output Bed Mesh Host / Output Bed Mesh CSV
     *   - UBL Tools
     *     - Build Mesh
     *         Build PLA Mesh
     *         Build ABS Mesh
     *       - Build Custom Mesh
     *           Hotend Temp:
     *           Bed Temp:
     *           Build Custom Mesh
     *         Info Screen
     *       - Build Cold Mesh
     *       - Fill-in Mesh
     *           Fill-in Mesh
     *           Smart Fill-in
     *           Manual Fill-in
     *           Info Screen
     *         Continue Bed Mesh
     *         Invalidate All
     *         Invalidate Closest
     *     - Validate Mesh
     *         PLA Mesh Validation
     *         ABS Mesh Validation
     *       - Custom Mesh Validation
     *           Hotend Temp:
     *           Bed Temp:
     *           Validate Mesh
     *         Info Screen
     *     - Edit Mesh
     *         Fine Tune All
     *         Fine Tune Closest
     *       - Adjust Mesh Height
     *           Height Amount:
     *           Adjust Mesh Height
     *         Info Screen
     *     - Mesh Leveling
     *         3-Point Mesh Leveling
     *       - Grid Mesh Leveling
     *           Side points:
     *           Level Mesh
     *         Info Screen
     *   - Output UBL Info
     */
2017-05-10 12:14:43 -05:00
bgort
efd93169e5 Merge pull request #6668 from bgort/pio3
PIO Cleanup
2017-05-10 07:25:19 -04:00
Brian
f1cccd65c2 platformio.ini env_default=xxxxx has to match one of the labels in the env:xxxxx, otherwise nothing happens when you pio run 2017-05-10 07:11:13 -04:00
bgort
192db2ab1b Merge pull request #6666 from bgort/M100fix
Fix compiler complaint related to M100
2017-05-10 07:03:59 -04:00
Brian
3b0127cf8e Fix compiler complaint related to M100 2017-05-09 21:45:44 -04:00
Scott Lahteine
59ab971f81 Merge pull request #6658 from thinkyhead/bf_cleanup_tuesday
Patch spacing, const, .gitignore
2017-05-09 16:22:48 -05:00
Scott Lahteine
11104f177b Apply const in BABYSTEPPING 2017-05-09 12:37:23 -05:00
Scott Lahteine
081bf1f879 Patch #else / #endif comments 2017-05-09 12:37:23 -05:00
Scott Lahteine
9a364990d9 Update .gitignore 2017-05-09 12:37:22 -05:00
Scott Lahteine
e1e043d0d0 Merge pull request #6657 from thinkyhead/bf_cleanup_tuesday
Fix M100 compiler warnings, general patches
2017-05-09 12:05:01 -05:00
Scott Lahteine
a9487c9443 Reduce redundancy in BLTOUCH conditionals 2017-05-09 11:52:24 -05:00
Scott Lahteine
8d961b51cc Eliminate M100 compiler warnings? 2017-05-09 11:32:15 -05:00
Scott Lahteine
fe1fce5f56 DevIoT patch 2 2017-05-09 11:28:39 -05:00
bgort
efb9ce24d9 Merge pull request #6645 from tcm0116/bltouch_config
Automatically define Z_MIN_PROBE_ENDSTOP_INVERTING for BLTouch
2017-05-09 09:49:16 -04:00
bgort
e2f07917ab Merge pull request #6644 from tcm0116/bltouch_menu
Move BLTouch LCD menu from Main to Main/Control
2017-05-09 09:49:02 -04:00
Florian Heilmann
fe96376a73 Fix FWRetract with positive z-moves during retracted state 2017-05-09 13:54:57 +02:00
Scott Lahteine
47cae2929f Patch platformio.ini to fix build error in DevIoT
For compatibility with DevIoT, until that can be solved.
2017-05-08 20:27:14 -05:00
Scott Lahteine
5402eaf9bd Merge pull request #6647 from thinkyhead/bf_pwm_cleanup
Rename software PWM variables for clarity
2017-05-08 18:53:23 -05:00
Scott Lahteine
911a87e006 Disable SCARA feedrate scaling by default 2017-05-08 14:41:03 -05:00
Scott Lahteine
f04d1096d4 Link to users in README.md 2017-05-08 14:23:01 -05:00
Scott Lahteine
71396f77d3 Cleanups following recent commits 2017-05-08 14:23:01 -05:00
Scott Lahteine
dca48f0e63 Move platformio.ini back to Marlin folder - it works there 2017-05-08 14:23:01 -05:00
Scott Lahteine
a6dafb058e Small reduction in error code size 2017-05-08 13:58:09 -05:00
Scott Lahteine
a1e04942a2 Cleanup to software PWM variables 2017-05-08 13:51:45 -05:00
Thomas Moore
a20d0794e6 Automatically define Z_MIN_PROBE_ENDSTOP_INVERTING for BLTouch 2017-05-08 16:28:44 +00:00
Thomas Moore
3279337f47 Move BLTouch LCD menu from Main to Main/Control 2017-05-08 15:21:01 +00:00
bgort
83b6bc8e05 Merge pull request #6638 from bgort/silentprobing2
Cleanup previous implementation of new quiet probing
2017-05-08 10:21:36 -04:00
Brian
6cb0fa4128 Cleanup previous implementation of new quiet probing
Saves a few lines of code.
2017-05-08 08:13:46 -04:00
bgort
4b7f8ad9c6 Merge pull request #6610 from bgort/pio-improvements2
PlatformIO-related changes
2017-05-08 07:52:42 -04:00
Scott Lahteine
232e8682d1 Merge pull request #6633 from thinkyhead/bf_temp_units
Minor patches and cleanup
2017-05-07 21:56:52 -05:00
Scott Lahteine
56ca47ab9d Patch configuration temp units 2017-05-07 21:32:01 -05:00
Scott Lahteine
421dd62800 Adjust spacing of "spaces" 2017-05-07 21:28:54 -05:00
Scott Lahteine
26dba44cd3 Patch redundant lcd settings 2017-05-07 21:28:54 -05:00
Scott Lahteine
34b5041576 Spacing adjustment, ubl_G29 2017-05-07 21:28:54 -05:00
Scott Lahteine
6c2e6ea38e Patch mfqp for use directly with MarlinDocumentation 2017-05-07 21:28:54 -05:00
Scott Lahteine
1c4ed8b106 Note 5 extruders in config comments 2017-05-07 21:28:54 -05:00
Scott Lahteine
6e4a5cc8c6 Patch missing const in temp_abs 2017-05-07 21:13:44 -05:00
bgort
d35e2fda10 Merge pull request #6622 from bgort/silentprobing
Improve BLTOUCH_HEATERS_OFF functionality
2017-05-07 21:33:44 -04:00
Scott Lahteine
6ed52fb765 Adjust spacing in LSF 2017-05-07 19:11:52 -05:00
Roxy-3D
110afff415 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 19:02:24 -05:00
Roxy-3D
d92fa40c62 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 18:23:48 -05:00
Brian
faa270071d 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 16:22:08 -04:00
bgort
787fdc95bb Merge pull request #6623 from lrpirlet/AllowUBLG29ToWork
G29 P1 stops reporting Invalid location with this patch
2017-05-07 09:42:42 -04:00
lrpirlet
d66e9efac5 G29 P1 stops reporting Invalid location with this patch 2017-05-07 15:07:26 +02:00
Scott Lahteine
8908b15471 Merge pull request #6614 from thinkyhead/bf_temp_units
Support temperature units in M503
2017-05-06 20:41:04 -05:00
Scott Lahteine
ce507deb9f Support temperature units in M503 2017-05-06 20:24:51 -05:00
bgort
a59066bca9 Various improvements - mostly UBL-related (#6607)
UBL Clean up.
2017-05-06 18:59:16 -05:00
Brian
0446dd3ad8 PlatformIO-related changes
- move platformio.ini out of source directory to be more consistent with 'normal' PlatformIO usage
  - facilitates IDE integration
- add related .gitignores
2017-05-06 06:22:10 -04:00
Scott Lahteine
bef9791ea3 Fix mfrb and mfpub 2017-05-05 14:32:16 -05:00
Scott Lahteine
66bedc1a24 Merge pull request #6600 from thinkyhead/bugfix_first_fixes
Update git helper scripts, config comments
2017-05-05 13:48:16 -05:00
Scott Lahteine
77769e284f Edit configuration comments 2017-05-05 13:32:31 -05:00
Scott Lahteine
d14b068147 Tweak git helper scripts 2017-05-05 13:32:31 -05:00
Scott Lahteine
6876e79d42 Tweak command index increment 2017-05-05 13:32:31 -05:00
Scott Lahteine
7fcb5c1424 Minor fix in K8200 readme 2017-05-05 11:25:11 -05:00
Scott Lahteine
0cc4b08b93 Merge pull request #6587 from zlowred/bugfix-1.1.x
Fixed USE_CONTROLLER_FAN #define usage
2017-05-05 01:02:09 -05:00
Max Matveev
267f3a03d9 Fixed USE_CONTROLLER_FAN #define usage 2017-05-04 23:38:29 +02:00
bgort
ae7c602031 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-04 16:09:45 -05:00
Scott Lahteine
3cd9af2409 bugfix-1.1.x ReadMe, Version, helper scripts 2017-05-04 07:17:10 -05:00
Scott Lahteine
c095ee9ce9 Readme Version 1.1.0 2017-05-04 07:17:10 -05:00
Scott Lahteine
28e597f945 Merge pull request #6570 from FHeilmann/patch-2
Fix broken fwretract recovery extruder feedrate
2017-05-04 07:15:19 -05:00
Florian Heilmann
15268770f5 Fix broken fwretract recovery extruder feedrate
When both lowering and recovery are performed using the same "prepare_move_to_destination()" the extruder recovery feedrate ends up being ignored and, instead, is only capped by either the maximum e-speed or the time it takes to perform the z-lowering. 
Performing the two moves separately from each other ensures a correct recovery feedrate.
2017-05-04 11:34:28 +02:00
Scott Lahteine
58210c3a19 Merge pull request #6568 from thinkyhead/rc_bilinear_extension
Add EXTRAPOLATE_BEYOND_GRID option to bilinear leveling
2017-05-04 00:46:05 -05:00
Scott Lahteine
da08e11acd Add EXTRAPOLATE_BEYOND_GRID option to bilinear leveling 2017-05-04 00:19:07 -05:00
Scott Lahteine
6834e36871 Merge pull request #6567 from thinkyhead/rc_sdcard_stop
Shutdown heaters, autotemp on SD Cancel
2017-05-03 23:54:29 -05:00
Scott Lahteine
399efd66ed Click to resume 2017-05-03 22:26:06 -05:00
Scott Lahteine
1196e3ca59 SDCard print completion can use "M0" 2017-05-03 22:24:03 -05:00
Scott Lahteine
6854f08d22 Shut down autotemp in disable_all_heaters 2017-05-03 20:54:26 -05:00
Thomas Moore
acec237092 Shutdown heaters and fan after canceling a print from the SD card 2017-05-03 20:43:09 -05:00
Scott Lahteine
11b6a3cbb6 Fix regression in least_squares_fit.cpp 2017-05-03 19:21:44 -05:00
Scott Lahteine
e1b85ff67b Merge pull request #6559 from thinkyhead/rc_more_optimal
Compact smart_fill_mesh slightly
2017-05-03 19:07:36 -05:00
Scott Lahteine
9890141f7b M100 tweak 2017-05-03 17:28:09 -05:00
Scott Lahteine
2658cc707a Treat temperature as integer, when possible 2017-05-03 17:27:25 -05:00
Scott Lahteine
1b2c7ec20a Make G26 compatible with inches and thermal unit modes 2017-05-03 17:12:48 -05:00
Scott Lahteine
241bdffe65 Dress up Bilinear Leveling code 2017-05-03 17:12:35 -05:00
Scott Lahteine
67ecf06cc4 Patch issue in gcode_M900
Noted in #6550
2017-05-03 15:26:00 -05:00
Scott Lahteine
de5e485ed7 Explicit upward angle solution 2017-05-03 01:19:44 -05:00
Scott Lahteine
ecdf68735f Compact smart_fill_mesh slightly 2017-05-03 01:06:58 -05:00
Scott Lahteine
628391304f Merge pull request #6552 from thinkyhead/rc_more_ubl_cleanup
Further cleanup of UBL
2017-05-02 22:46:04 -05:00
Scott Lahteine
902fe76db9 Merge pull request #6556 from thinkyhead/rc_use_controller_fan
Implement USE_CONTROLLER_FAN as a feature
2017-05-02 22:43:26 -05:00
Scott Lahteine
7ba7474a73 Drop extra parens from address-of operator 2017-05-02 22:22:23 -05:00
Scott Lahteine
0bf5add075 Use UBL_MESH_(MIN|MAX)_[XY] for G29 move limits 2017-05-02 22:22:23 -05:00
Scott Lahteine
b8ba3b7647 Use 'sq' macro where possible 2017-05-02 22:22:23 -05:00
Scott Lahteine
66eba3346b Remove G29 lcd control debugging 2017-05-02 22:22:23 -05:00
Scott Lahteine
3517154135 Reduce code size, fix bug in smart_fill_mesh 2017-05-02 22:22:23 -05:00
Scott Lahteine
c4e34adcf1 Apply formatting, coding standards to UBL 2017-05-02 22:22:23 -05:00
Scott Lahteine
f4239e62b1 Merge pull request #6557 from thinkyhead/rc_hotend_status_item
Keep refreshing LCD if hotend status is on-screen
2017-05-02 22:04:21 -05:00
Scott Lahteine
fc857c5b78 Merge pull request #6549 from thinkyhead/rc_bltouch_refix
Fix BLTOUCH_HEATERS_OFF bug
2017-05-02 21:53:09 -05:00
Thomas Moore
b39f634252 Continuously update LCD when hotend status is displayed in Filament Change screens 2017-05-02 21:49:40 -05:00
Scott Lahteine
2c13922c46 Implement USE_CONTROLLER_FAN as a feature 2017-05-02 20:18:52 -05:00
Scott Lahteine
492bc536bf Modify debug methods to take PSTR 2017-05-02 17:53:40 -05:00
Bob-the-Kuhn
e5a27d9f36 G29 P2 & P4 bug fixes & improvements 2017-05-02 17:53:40 -05:00
Scott Lahteine
b93be716cf Remove trailing whitespace 2017-05-02 17:53:40 -05:00
Scott Lahteine
76eca9732d Fix mis-named language string define in Dutch 2017-05-02 16:08:09 -05:00
Scott Lahteine
806f670092 Merge pull request #6511 from Bob-the-Kuhn/UBL--G26-minor-improvements
UBL: G26 minor improvements
2017-05-02 16:06:22 -05:00
Scott Lahteine
0803c9d997 Merge pull request #6533 from thinkyhead/rc_autocal_patches
General cleanup of G33
2017-05-02 16:01:02 -05:00
Scott Lahteine
46a5cab6fb Merge pull request #6548 from thinkyhead/rc_fix_dual_z_endstops
Fix Dual-Z endstop conditional test
2017-05-02 16:00:49 -05:00
Brian
ff5fed137f Fix BLTOUCH_HEATERS_OFF bug 2017-05-02 15:53:52 -05:00
Scott Lahteine
ca1dd739a3 Organize ubl.h defines by the files they serve 2017-05-02 15:47:06 -05:00
Scott Lahteine
0449f69179 Cleanup patch to recent merge 2017-05-02 15:47:06 -05:00
LVD-AC
da2abad636 Various cleanups of G33
- update comment section
- redefined P5 grid
- minor clean to probe radius routine
- updated EEPROM version to V37 according remark in #6517
2017-05-02 15:47:06 -05:00
Bob-the-Kuhn
7ce613db0a Fix Conditionals test for endstop plug used by Z2 or probe. 2017-05-02 15:41:47 -05:00
Scott Lahteine
ef750ae86b Towards supporting Z2 in Endstops::report_state 2017-05-02 15:39:32 -05:00
Scott Lahteine
c03c623951 Sanity-check Z2 endstop assigned to a nonexistent pin. 2017-05-02 15:39:00 -05:00
Scott Lahteine
70f31b6c76 Throw an error if no E stepper is free for X2, Y2, Z2 2017-05-02 15:13:47 -05:00
Scott Lahteine
ac69eca586 Merge pull request #6538 from bgort/ubl_gridlbls
Fix, cleanup, prettify `G29 O` output
2017-05-02 14:09:18 -05:00
Scott Lahteine
99b11db1a1 Merge pull request #6537 from thinkyhead/rc_cleanup_sunday
Various leveling-related patches
2017-05-02 00:59:59 -05:00
Roxy-3D
41e63bbb7c Fix Horizontal and Vertical UBL optimization bug. (#6540)
* Fix Horizontal and Vertical optimization bug.

And drastically reduce the debug code foot print....

* Yeah Baby!

The debug print is going A - OK !
2017-05-01 23:52:33 -05:00
Scott Lahteine
e79b335367 Patches for leveling reactivation in G28 / M48 2017-05-01 17:38:57 -05:00
Brian
92e22c3bf2 Fix, cleanup, prettify G29 O output 2017-05-01 18:19:57 -04:00
Scott Lahteine
7d5cd7e0d7 Tweak set_bed_leveling_enabled 2017-05-01 16:46:52 -05:00
Scott Lahteine
ed81e9b3d3 Adjust leveling conditionals 2017-05-01 16:46:48 -05:00
Scott Lahteine
a64e5659ce Clean up G26 external references, private vars 2017-05-01 15:17:52 -05:00
Scott Lahteine
2887c20788 Add a function to home all axes (i.e., gcode_G28) 2017-05-01 15:03:37 -05:00
Scott Lahteine
8f895d5e01 Merge pull request #6530 from thinkyhead/rc_cleanups_2
Fixes for DUAL_NOZZLE_DUPLICATION_MODE
2017-05-01 12:34:11 -05:00
Scott Lahteine
8002672938 Fixes for DUAL_NOZZLE_DUPLICATION_MODE 2017-05-01 12:20:25 -05:00
Scott Lahteine
f69acde966 Merge pull request #6528 from MarlinFirmware/revert-6416-negative-mesh-fix
Revert "Fix for Meshpositions if printer has negative endstop positions"
2017-05-01 11:51:13 -05:00
Scott Lahteine
8bd63aafb9 Merge pull request #6527 from thinkyhead/rc_cleanups_2
Patch DELTA_HEIGHT, BLTOUCH init
2017-05-01 11:28:43 -05:00
Scott Lahteine
4803a4322e Revert "Fix for Meshpositions if printer has negative endstop positions" 2017-05-01 11:25:07 -05:00
Scott Lahteine
4f74c416a4 Patch for BLTOUCH_HEATERS_OFF 2017-05-01 11:13:40 -05:00
Scott Lahteine
1823a6ea29 Patch for missing DELTA_HEIGHT 2017-05-01 11:05:35 -05:00
Scott Lahteine
984c210dec Merge pull request #6519 from thinkyhead/rc_cleanups_2
Various fixes for compiler warnings
2017-05-01 02:46:34 -05:00
Scott Lahteine
d814e468d2 Fix set_heaters_for_bltouch and usage
- Only call `set_heaters_for_bltouch` when actually deploying/stowing
- Clear `next_emi_protection` when re-enabling heaters
2017-05-01 02:27:52 -05:00
Brian
4e1448e75a Various fixes for compiler warnings
add BLTouch-related messages in english and (rusty) french;
add missing endstops.h in ultralcd.cpp;
fix misc. compiler warnings;
fix lsf_reset - ZERO macro can't handle a pointer as it would only memset the size of the pointer, not the size of the entire struct
2017-05-01 02:12:40 -05:00
Scott Lahteine
fc9919b749 Merge pull request #6515 from thinkyhead/rc_cleanup_sunday
Some minor cleanups to code formatting
2017-04-30 22:58:16 -05:00
Scott Lahteine
c12bc51a59 cardreader.cpp spacing tweak 2017-04-30 22:27:47 -05:00
Scott Lahteine
46b714a52f Cleanup spacing in pinsDebug.h 2017-04-30 22:27:26 -05:00
Scott Lahteine
88141ca717 Remove things that aren't pins from pinsDebug_list.h 2017-04-30 22:24:51 -05:00
Scott Lahteine
ff35b11d08 Resolve compiler complaint about memset volatile * 2017-04-30 22:24:03 -05:00
Scott Lahteine
ff95a9850a Merge pull request #6516 from thinkyhead/rc_meaningful_branch_name
Need to define this for Rigidboard V2
2017-04-30 22:17:41 -05:00
Scott Lahteine
0b421e97c9 Rename some (unused) OMCA pins 2017-04-30 22:16:44 -05:00
Scott Lahteine
c2c9f01c8e Patch newly-introduced bug in IS_Z2_OR_PROBE 2017-04-30 20:17:10 -05:00
Scott Lahteine
819df5e06d Cleanups to pins debugging 2017-04-30 20:17:10 -05:00
Scott Lahteine
42824b0e1f Use new serial spacing function to save PROGMEM 2017-04-30 20:14:42 -05:00
Scott Lahteine
cd72901fb7 Cleanups to UBL code 2017-04-30 20:14:42 -05:00
Bob-the-Kuhn
ce87c7803e implement G26 changes per review 2017-04-30 19:05:25 -05:00
jaysonkelly
769817ce5e Need to define this for Rigidboard V2
Motor current defaults need to be defined for Rigidboard
2017-04-30 19:04:27 -05:00
Scott Lahteine
39c6c5621b Merge pull request #6416 from SkyNet3D/negative-mesh-fix
Fix for Meshpositions if printer has negative endstop positions
2017-04-30 17:38:41 -05:00
Scott Lahteine
671a44b8aa Merge pull request #6410 from teemuatlut/LVD-Delta
Delta auto-calibration updates
2017-04-30 16:39:51 -05:00
Scott Lahteine
5d5c9a040a Merge pull request #6509 from thinkyhead/rc_config_patches
Configuration cleanup
2017-04-30 16:10:27 -05:00
Scott Lahteine
d480b6f75a Enable E1 stepper for DUAL_NOZZLE_DUPLICATION_MODE 2017-04-30 16:01:01 -05:00
Bob-the-Kuhn
dcde202157 Add startup notice & update host temperatures while waiting
Right now G26 doesn't send a notice to the host that it's running.  It's
not until the heaters are at temperature that you know for sure if it's
running or not.

Added host temperature prints so that someone watching the host
interface will see the temperatures change during the warm up period.
Updates are sent every 5 seconds.
2017-04-30 15:51:58 -05:00
Scott Lahteine
54751e8557 Put DISTINCT_E_FACTORS adjacent to the affected settings 2017-04-30 15:30:31 -05:00
Scott Lahteine
0dbe4b3e54 Edit configurations to reduce verbosity, arrange logically 2017-04-30 15:30:31 -05:00
Scott Lahteine
0750933bc6 Merge pull request #6490 from Bob-the-Kuhn/Missing-X-stop
Endstop not enabled if pin is zero
2017-04-30 15:09:36 -05:00
bgort
5ace3699b1 Output (commented) coordinates on G29 S-1; helps identify the x/y points that correspond with i/j coordinates, which eases manual tweaking of z values (#6507) 2017-04-30 14:59:34 -05:00
Scott Lahteine
d7d4378481 Remove inaccurate version description 2017-04-30 14:57:19 -05:00
Scott Lahteine
f169c04604 Merge pull request #6491 from thinkyhead/rc_cleanup_wednesday
Various cleanups for recent merges
2017-04-30 14:56:48 -05:00
Scott Lahteine
6d63255ddc Merge pull request #6508 from bgort/pio_improvements
PlatformIO-related improvement
2017-04-30 14:53:22 -05:00
LVD-AC
cafc48dff8 little oops 2017-04-30 22:17:49 +03:00
Brian
627730948d Add U8glib as a dependency to platformio.ini for those who use PlatformIO; this makes compiling even easier as u8glib will be downloaded and included automatically.
Also added the new .pio-related directory to .gitignore, and a few ignores for those who use cmake.
2017-04-30 15:13:51 -04:00
bgort
5974d8e168 change G26 default nozzle size to 0.4, consistent with instructions (#6506) 2017-04-30 13:23:46 -05:00
LVD-AC
471a321624 leaner code for probe routine 2017-04-30 19:15:16 +03:00
bgort
3c0d5ba0a1 allow idle() to be called - fixes sometimes crash/hang in G29 I; (#6505) 2017-04-30 10:22:31 -05:00
Roxy-3D
2509587b5a Correct over optimization of pre-initialized variables (#6500)
* Correct over optimization of pre-initialized variables

NEAR_ZERO() works most of the time...  But it leaves corner cases
uncovered.  We need to explicitly check if these variables are +/-
infinity.

* Correct over optimization of pre-initialized variables
2017-04-29 22:01:29 -05:00
LVD-AC
585c00a728 Proposed changes
This is what I did yesterday:

- basicly gave the tests more comprehensive names; put all the
declarations at the top; got rid of the magic negative C-value (renamed
to P + A, O, T)

- "cos(RADIANS(180 + 30 * axis)) * (1 + circles * 0.1 * ((zig_zag) ? 1 :
-1)) * delta_calibration_radius" compiles wrong is zig_zag statement is
without brackets

- DELTA_TOWER_ANGLE_TRIM reset to 3 values (the calcs use the 3th value
to normalize will not compile otherwise)

-Wrote 3 dummies to keep EEPROM lenght the same

-Reset the configs to the 'original' with autocal + menu disabled (but
can be enabled of course)
2017-04-29 18:53:14 +03:00
Scott Lahteine
29fa241617 Initial patches to G33 2017-04-29 15:29:49 +03:00
Scott Lahteine
12ce051b55 Add a function to output spaces to serial 2017-04-29 15:29:49 +03:00
Scott Lahteine
42f4c53254 Starting on G33 rewrite 2017-04-29 15:29:49 +03:00
Scott Lahteine
baf3b91460 DELTA_TOWER_ANGLE_TRIM only needs AB 2017-04-29 15:29:49 +03:00
Scott Lahteine
6424068412 Merge pull request #6495 from emartinez167/Spanish-language-changes
Last three Spanish language strings
2017-04-29 05:43:04 -05:00
emartinez167
27cd165adf Last three Spanish language strings
Updates as per @thinkyhead request.
2017-04-29 11:33:30 +08:00
Scott Lahteine
2cc9774f34 Apply bltouch_menu
As proffered in #6252
2017-04-28 18:43:03 -05:00
Scott Lahteine
1a111180de Clean up set_heaters_for_bltouch 2017-04-28 18:32:39 -05:00
Scott Lahteine
7db805930a Cleanup configurations 2017-04-28 18:32:39 -05:00
Scott Lahteine
8bf3a3fcdb Remove inaccurate comments from ubl.h 2017-04-28 18:32:38 -05:00
Scott Lahteine
47557d5a19 Fix up formatting in ubl.h 2017-04-28 18:32:38 -05:00
Scott Lahteine
0a8e09c723 Clean up excess whitespace, comment formatting 2017-04-28 18:32:38 -05:00
Scott Lahteine
a35c681453 Clean up least_squares_fit 2017-04-28 17:33:28 -05:00
Bob-the-Kuhn
40089249c3 add PIN_EXISTS to HAS_xyz_MIN macro 2017-04-28 16:47:59 -05:00
Scott Lahteine
8020069371 Apply coding standards for indentation 2017-04-28 15:43:06 -05:00
Scott Lahteine
dabca83742 Merge pull request #6437 from Kaibob2/patch-1
Update language_de.h
2017-04-28 14:47:47 -05:00
Kai
3d0a4c4ea9 Update language_de.h 2017-04-28 21:09:10 +02:00
Silvio
6bf1d50188 Added missing translations (#6458) 2017-04-28 13:49:16 -05:00
Mehmet Sutas
404f767d44 Update language_tr.h (#6463) 2017-04-28 13:48:31 -05:00
Petr Zahradnik
5e701524f8 Update language_cz.h for new translations (#6465)
* Update language_cz.h for new translations

* Correction translate

* Revert correction back to hotend
2017-04-28 13:47:43 -05:00
gege2b
0a92ce7a98 Completed french translation (#6475) 2017-04-28 13:46:09 -05:00
Ernesto Martinez
ff4fb42e7d Add new strings as per recent changes in RCBugFix (#6482)
Adding missing strings to Spanish language, as per changes recently
done to the RCBugFix branch.
2017-04-28 13:45:22 -05:00
paulusjacobus
67d1fc5556 Update language_nl.h (#6478)
updated the RCbugfix release with additional Dutch translations
2017-04-28 13:42:39 -05:00
benlye
8c6b4537a6 Fix issue in itostr4sign with numbers <100 (#6487)
The first character in the string wasn't blanked if the number went from >= 100 to <100, resulting in artefacts in the displayed string.
2017-04-28 13:35:11 -05:00
LVD-AC
4ea8d0f89b Solved "The Travis CI build failed " 2017-04-28 19:55:21 +03:00
LVD-AC
ed6b361e27 cleanup ready to squash 2017-04-28 18:09:18 +03:00
LVD-AC
7a6a1ef583 M666 normalize positive values to <=0
M666

+ tower radians absolute value
2017-04-28 18:05:24 +03:00
Roxy-3D
4075b95519 Allow BL-Touch users to control heaters during probe event (#6485)
The Configuration.h file entries for BL-Touch have been updated to:
```cpp
//#define BLTOUCH
//#define BLTOUCH_DELAY 375      // (ms) Enable and increase if needed
//#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are
turned off during probe event
```
2017-04-28 09:19:55 -05:00
Roxy-3D
6e8ecb908a Shut down heaters during BL-Touch probe event
The electro-magnetic interference from the bed and nozzle are affecting
the BL-Touch repeatability for some users.   This problem can be helped
by shutting down the heaters during the actual probe event and then
quickly turning them back on.

Because this code is messing with the heaters, it is written in a
paranoid manner.  It only turns the heaters back on if everything is
EXACTLY as it expects things to be.  The BL-Touch probe must have been
put into a deployed state less than 20 seconds prior, or the stow()
function will NOT turn the heaters on.

This code has been tested and works for both G28 and probing functions.
2017-04-27 18:52:58 -05:00
LVD-AC
d8102aeca8 Cn negative : no tower angle calibration
Giving a negative number of probe points disables the tower angle
correction calibration ('4point' instead of '7point' solution)

EEPROM version updated
2017-04-27 21:13:07 +03:00
Roxy-3D
3601f08e87 Better tuned FolgerTech i3-2020 example file 2017-04-27 11:16:38 -05:00
Roxy-3D
a20b7d9581 Better tuned Example file for FolgerTech i3-2020
Also setting up Z-Probe on the machine.
2017-04-27 11:16:38 -05:00
Kai
bf2fe46062 Update language_de.h 2017-04-27 10:13:02 +02:00
Kai
11d34be060 Update language_de.h 2017-04-27 10:06:26 +02:00
Scott Lahteine
817ecb9ff4 Merge pull request #6453 from thinkyhead/rc_cleanup_wednesday
Minor cleanups, work-in-progress
2017-04-26 19:41:52 -05:00
Roxy-3D
22f6e277af Get example files fully into compliance
Change to support new name GRID_MAX_POINTS_XY
Start UBL at version 1.0 in the CUSTOM_MACHINE_NAME
2017-04-26 16:22:17 -05:00
LVD-AC
a9bc1d30cc z_offset change
Avoids to have to recalibrate the delta_height after a z_offset change
2017-04-26 21:57:11 +03:00
Roxy-3D
ec26e23e7e Add my two 'Nice' machines as example configurations
These are my two 'Nice' machines.  Both are good example machines.  The
FolgerTech i3-2020 is probably the best value kit on the market right
now.  And it has developed a 'Cult Following' of hobbiests.  I'll always
have an up to date Configuration.h file set for it, so it may as well be
an example configuration.

And the gCreate gMax 1.5+ is the best printer I've ever seen that runs
Marlin.  For sure, I'll always have up to the minute Configuration.h
files for this printer also.   I've moved over to using the gMax as my
primary development machine for Marlin.   So...  Besides being a good
machine, it is a nice convienience for me to have this Configuration.h
file as an 'Example'.
2017-04-26 12:46:12 -05:00
Scott Lahteine
adb8e68592 Fix stuck "Print Aborted" LCD message
Fixes #6393
2017-04-26 06:24:23 -05:00
Scott Lahteine
096b927102 Minor optimization of FILAMENT_WIDTH_SENSOR 2017-04-26 06:24:23 -05:00
Scott Lahteine
5bdb0b567d Cosmetic patches 2017-04-26 06:24:23 -05:00
Kai
38ae7f4238 Added more translation strings
There are some quite tricky ones which are hardly translateable.
Maybe @Sebastianv650 can review this
2017-04-26 11:58:11 +02:00
Scott Lahteine
4d96d3eab1 Bootscreen delay after clear, then set chars
Fixes #6426
2017-04-25 23:37:28 -05:00
Scott Lahteine
5512130d6c Only set Compare Mode for channel A
Fixes #6445
2017-04-25 23:14:16 -05:00
Roxy-3D
d467e97679 Smart-Fill and Mesh-Tilting (both 3-point and grid) working!
Also...   The memory corruption issue may be fixed.   The GCC compiler
was inlining static functions and this caused the G29() stack frame to
become much larger than the AVR could handle.
2017-04-25 21:03:41 -05:00
Scott Lahteine
a699967ec8 Merge pull request #6443 from thinkyhead/rc_interrupt_fastio
Patch fastio.h with Timer 2 interrupt support
2017-04-24 20:09:41 -05:00
Scott Lahteine
2823bf0874 Update fastio.h with special handling for Timer 2 2017-04-24 16:58:22 -05:00
Scott Lahteine
fd535e111a Fix up XYZ_CONSTS_FROM_CONFIG macro 2017-04-24 14:05:11 -05:00
Kai
03c2f756b9 Update language_de.h 2017-04-24 13:32:16 +02:00
LVD-AC
dcf30a69d6 Allowing #define DELTA_TOWER_ANGLE_TRIM[C_AXIS]
More consistent with M665 where C-value is allowed as well, then
normalized
2017-04-23 14:51:24 +03:00
Brian
f41fb2b635 Numerous UBL-related changes:
* relocated ubl state to config. store:
 * removed a number of ubl state variables and padding which were largely unused - saved 58 bytes of both SRAM and EEPROM;
 * modified ubl sanity_check - no longer checks removed state variables that were otherwise unused, where checking didn't seem to accomplish anything, ultimately;
 * removed pre_initialized state, saving 64 bytes of SRAM;
 * removed automatic saving of UBL state after UBL activation/deactivation;
* consolidated multiple GRID_MAX_POINTS_X/Y to 'Global Leveling' section of EEPROM;
* minor update to G29 Sx notes/instructions;
* renamed mesh load and save parameter to 'slot' from 'm' for clarity;
2017-04-22 18:44:39 -05:00
Brian
f1a4758cef use progmem instead of sram for mesh_index_to_x/ypos array;
fix maximum mesh_index_ array size at 16 (15+1);
2017-04-22 18:34:49 -05:00
Scott Lahteine
d5ec34e7ed Merge pull request #6431 from thinkyhead/rc_bilinear_super_optimize
Minor cleanup, optimize number-to-string
2017-04-22 17:05:24 -05:00
Scott Lahteine
87d240042a Optimize number-to-string functions, no-fan display 2017-04-22 16:23:15 -05:00
Scott Lahteine
959566cf0a Update note about M163 / M164 2017-04-22 16:23:15 -05:00
Scott Lahteine
830851df13 Spend some SRAM to optimize bilinear leveling 2017-04-22 16:19:31 -05:00
Scott Lahteine
091179d960 bed_level_grid => z_values (also *_virt array) 2017-04-22 16:19:31 -05:00
Scott Lahteine
23cdbbb2d3 Add a method to refresh bilinear bed level after a change 2017-04-22 16:19:30 -05:00
Scott Lahteine
ccda63c473 Drop the accessor form for LCD value editing 2017-04-22 16:19:30 -05:00
Scott Lahteine
10da175be5 Fix a pair of compiler complaints 2017-04-22 16:19:30 -05:00
Scott Lahteine
ff0018e287 Format hex values as uppercase 2017-04-21 21:42:41 -05:00
android444
77aa16005d Polish font
Add polish font for GLCD displays only.
HD44780 work properly without polish character.
Update language_pl.h.
2017-04-21 21:42:41 -05:00
teemuatlut
244f67590e Delta probe height bug solved 2017-04-22 02:23:56 +03:00
Hans Raaf
406a83ff2d Fix for Meshpositions if printer has negative endstop positions 2017-04-22 00:16:16 +02:00
benlye
3ed737425d Fix typo in new SET_COM macro 2017-04-21 15:08:18 -05:00
Brian
88649b06a6 use planner.z_fade_height, etc. instead of private, ubl-specific g29 fade height 2017-04-21 09:09:09 -05:00
LVD-AC
004928148c Tower angles
Adding '7-point' tower angle correction calibration
2017-04-21 12:48:45 +03:00
LVD-AC
76ec7a0f80 Adding upto 7*7 probe grids
- adding Cn 5, 6 and 7
2017-04-21 11:58:39 +03:00
LVD-AC
d4f593d200 Delete 'expert level'
and getting rid off verbose level 3 and configuration_adv settings
2017-04-21 11:58:39 +03:00
LVD-AC
13c8493878 M665 rework and related issues (all delta's)
- Making M665 compatible with repetier (see
http://reprap.org/wiki/G_code#M665:_Set_delta_configuration)

- M665 B also sets the radius for manual calibration menu

- Converting tower ajustment definitions to arrays - tower angle
corrections compatible with Esher 3D wizzard

- Only tower angles need to be adjustable with M665 and stored to EEPROM
- tower radius and diag rod can be adjusted in the FW only with #define
2017-04-21 11:58:39 +03:00
Scott Lahteine
e66d9f1313 Merge pull request #6406 from thinkyhead/test_remote
Refresh Marlin git helper scripts
2017-04-20 23:45:24 -05:00
Scott Lahteine
dd436ceeb7 Add 'mfdoc' and 'mfpub' scripts to help with documentation 2017-04-20 21:37:26 -05:00
Scott Lahteine
78308b1c0b New git helper scripts 'mfadd' and 'mfqp'
- `mfadd` adds and fetches a user’s fork of Marlin
- `mfqp` invokes `git commit -m`, `mfrb`, `git push -f`
2017-04-20 21:37:25 -05:00
Scott Lahteine
7b4c245de3 Improve existing git helper scripts 2017-04-20 21:37:25 -05:00
Scott Lahteine
06f4776be4 mfprune: fetch remotes, offer checkout option 2017-04-20 21:37:25 -05:00
Scott Lahteine
c73b62447c Merge pull request #6403 from thinkyhead/rc_flsun_clean
FLSUN and trailing whitespace cleanup
2017-04-20 20:48:41 -05:00
Scott Lahteine
e0e069c6d8 Clean up trailing whitespace 2017-04-20 17:52:07 -05:00
Scott Lahteine
9b94210394 Bring FLSUN config more up to date 2017-04-20 17:52:06 -05:00
Scott Lahteine
b0aa256bc0 Updates for all configs 2017-04-20 17:52:05 -05:00
Scott Lahteine
b6ed69571a Merge pull request #6400 from thinkyhead/rc_interrupt_macros
Add and apply interrupt helper macros
2017-04-20 17:17:21 -05:00
Scott Lahteine
ee46ce1743 Add and apply interrupt helper macros 2017-04-20 16:04:29 -05:00
Scott Lahteine
6131c62499 General cleanup 2017-04-20 16:04:29 -05:00
benlye
2c86dfd3b5 Fix compiler type conversion errors after LCD changes 2017-04-20 16:04:29 -05:00
Scott Lahteine
55f9e76610 Merge pull request #6367 from thinkyhead/rc_cleanup_followup
Cleanup after some direct commits
2017-04-20 15:13:24 -05:00
Scott Lahteine
d38a792a91 Merge pull request #6382 from MagoKimbra/fix_configuration_store
Fix double definition in configuration_store
2017-04-20 15:06:58 -05:00
Scott Lahteine
b98bc034ae Replace c_assert hack with static_assert 2017-04-19 13:07:35 -05:00
Scott Lahteine
5eb2b1a790 Clear up G29 compiler warnings 2017-04-19 13:07:35 -05:00
Scott Lahteine
4ce2a63db0 Apply const, spacing to Marlin_main.cpp 2017-04-19 13:07:34 -05:00
Scott Lahteine
e97f1284c1 Cleanup of pins testing code 2017-04-19 13:07:34 -05:00
Scott Lahteine
e9b53ae00c Cleanup after some direct commits
https://github.com/MarlinFirmware/Marlin/commit/5e9726530ff21d3bc62beaa6
ac1b9437c276130a
2017-04-19 13:07:34 -05:00
Scott Lahteine
e05d050a1e Add hex routine to print an address 2017-04-19 13:07:34 -05:00
Scott Lahteine
4542282f5e Fix broken TOGGLE macro in fastio.h 2017-04-19 12:38:13 -05:00
MagoKimbra
ed52275a14 Fix double definition in configuration_store 2017-04-18 17:57:40 +02:00
Scott Lahteine
de569e3d4e Merge pull request #6327 from Bob-the-Kuhn/M43-toggle-&-Z-probe-fixes
M43 Toggle & Z servo test - fix bug & add another check
2017-04-18 03:21:57 -05:00
Scott Lahteine
f33a650ecc Merge pull request #6368 from thinkyhead/rc_linear_advance_eeprom
Add Linear Advance values to EEPROM and LCD
2017-04-18 02:54:12 -05:00
Scott Lahteine
a00ae4790a Replace M905 with unique code M900 2017-04-17 16:39:37 -05:00
Scott Lahteine
1286d9603d Clean up and organize ultralcd.cpp 2017-04-17 16:39:36 -05:00
Scott Lahteine
3cdf78a79f MSG_VOLUMETRIC => MSG_FILAMENT 2017-04-17 16:39:36 -05:00
Thomas Moore
f8e77d6545 Add Linear Advance values to EEPROM and enable configuration of K via LCD 2017-04-17 16:39:36 -05:00
Scott Lahteine
eb2d073dae Add M905 R for setting the E/D ratio directly 2017-04-17 16:39:36 -05:00
Scott Lahteine
69dfa54a84 Use code_value_linear_units for known-linear axes 2017-04-17 16:39:36 -05:00
Scott Lahteine
b956f2642b Show M503 report with current linear units 2017-04-17 16:39:36 -05:00
Scott Lahteine
ba4a005ceb Merge pull request #6373 from mtowara/mt_makefile_fix
Fix Makefile build
2017-04-17 16:16:37 -05:00
towara
150b15c311 fix compiler errors generated by more stringent flags in Makefile:
- use volatile for registers
- avoid implicit casts
2017-04-17 11:59:47 +02:00
towara
f6095c9325 fix missing serial.cpp in Makefile 2017-04-17 11:59:03 +02:00
Scott Lahteine
871f92378c Tweak headings in EEPROM structure 2017-04-16 18:42:33 -05:00
Scott Lahteine
bf2548be4a Merge pull request #6362 from tcm0116/babystepping
Only queue babysteps if axis is in a known position
2017-04-16 17:46:06 -05:00
Scott Lahteine
bddd75aa5c Merge pull request #6363 from dot-bob/display_reset
Identifed a display initialization issue.
2017-04-16 17:44:44 -05:00
dot-bob
9c410ddf68 Fixed an issue where a display with a hardware reset pin (LCD_RESET) may not get initialized properly. 2017-04-15 22:45:15 -06:00
Thomas Moore
72a7fac461 Only queue babysteps if axis is in a known position 2017-04-15 23:19:43 -05:00
Roxy-3D
5e9726530f Setup to find data corruption and general clean up
This data corruption problem is very difficult.  Just changing the code
a little bit changes whether the problem even happens and what is
affected.  I need these changes in the main branch so I can operate with
the extra debug code always available and turned on.

Everything is setup such that if M100 is turned off or DEBUG(ECHO) is
turned off, the code is not affected.   M100 has been made a little bit
more inteligent so it can display the serial command buffers in a more
meaningful way (because the data corruption seems to often times end up
in that area).
2017-04-15 19:26:43 -05:00
Scott Lahteine
e519e95953 Merge pull request #6358 from thinkyhead/rc_doubleclick_fix
Show Cancel/Continue screen for ABL "Level Bed"
2017-04-15 17:25:37 -05:00
Scott Lahteine
a81606c680 Show Cancel/Continue screen for ABL "Level Bed" 2017-04-15 16:51:03 -05:00
Scott Lahteine
51021bc7b8 Merge pull request #6353 from thinkyhead/rc_endstop_coolness
Clean up endstop triggering code
2017-04-15 16:49:54 -05:00
Scott Lahteine
857dec0990 Merge pull request #6342 from benlye/benlye-fix-softspi
Fix softspi variant conditional for 1284p
2017-04-15 16:33:50 -05:00
Scott Lahteine
4e04383d18 Merge pull request #6354 from thinkyhead/rc_doubleclick_fix
Fix undefined symbol if DOUBLECLICK_FOR_Z_BABYSTEPPING and HAS_BED_PROBE defined
2017-04-15 16:06:29 -05:00
Thomas Moore
8dd0492e68 Show lcd_babystep_zoffset screen if DOUBLECLICK_FOR_Z_BABYSTEPPING is enabled and HAS_BED_PROBE is defined 2017-04-15 14:44:50 -05:00
benlye
0a2f60fab4 Make spi.h inclusion conditional
spi.h is only needed if HEATER_0_USES_MAX6675 is defined, so making its inclusion conditional on HEATER_0_USES_MAX6675 being defined.
2017-04-15 16:22:42 +01:00
Bob-the-Kuhn
60471b7592 minor improvements
Configuration_store.cpp - changed a couple of print statements so the
values were printed.  The old method resulted in the formula being
printed.

ubl_G29
1) added support for R option to P4.  Now probes all points unless R is
present and the number is greater than 0.

2) P2 - moved map print statement so it showed the point that was
currently being probed,  The old location did this only for the first
point.

3) P4 - Moved the map print for the same reason.

ultralcd.cpp - changed "Mesh Editor :" to "Mesh Editor" because the LCD
draw routine puts a ":" in automatically so you end up with an extra ":"
using the old message.
2017-04-15 09:31:55 -05:00
Scott Lahteine
25a61e9061 Improve motion-based endstop triggering code 2017-04-15 06:16:50 -05:00
Scott Lahteine
5a97a7be97 Merge pull request #6352 from thinkyhead/rc_patch_menu_bug
Fix compiler warning about z-offset callback
2017-04-15 03:35:16 -05:00
Scott Lahteine
a2356c2825 Fix compiler warning about z-offset callback 2017-04-15 02:50:27 -05:00
Scott Lahteine
3a40e637cd Merge pull request #6350 from thinkyhead/rc_more_dualx_logging
Add more Dual X logging
2017-04-15 02:02:54 -05:00
Scott Lahteine
037c964d26 Reverse bools on prepare_move sub-functions 2017-04-15 01:08:19 -05:00
Scott Lahteine
d9c4333806 Extra logging of Dual X modes 2017-04-15 01:08:19 -05:00
Scott Lahteine
8cccf69ef7 Merge pull request #6348 from thinkyhead/rc_tmc2130_clean_clean
TMC2130 update. Fixes, tune-ups, new features
2017-04-14 23:40:56 -05:00
Scott Lahteine
4067d15c92 Cleanup, extend TMC2130 implementation 2017-04-14 23:00:00 -05:00
Scott Lahteine
d60c02c5b1 Cleanup, extend TMC2130 configuration 2017-04-14 22:43:56 -05:00
Scott Lahteine
0e97b3d6d0 Fix some configuration spacing 2017-04-14 22:36:10 -05:00
Scott Lahteine
cf6f483378 Merge pull request #6187 from thinkyhead/rc_flsun_delta_autocal
Delta: DELTA_HEIGHT, G33 Auto-Calibrate, drop M206/M428, add M665 H
2017-04-14 22:32:12 -05:00
Scott Lahteine
24882adfbf Allow NO_WORKSPACE_OFFSETS with DELTA_AUTO_CALIBRATION
- On `DELTA` the `M665 H` option supplants `M206`
- On `DELTA` `NO_WORKSPACE_OFFSETS` only reverts `G92` behavior
- Spawn 4 conditionals based on `NO_WORKSPACE_OFFSETS`
- Optimize coordinate space conversion for `DELTA` workspace
- To keep EEPROM version, retain `home_offset[XYZ]`, just ignore XY
2017-04-14 21:56:49 -05:00
Bob-the-Kuhn
1acb84ba02 fix 1 bug, add error messages
===============================================

make changes requested by reviewers

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

add M43 test to Travis, fix EOL, remove trailing spaces
2017-04-14 20:57:45 -05:00
Scott Lahteine
40dfafbe89 Add Travis CI test for FLSUN config 2017-04-14 19:46:31 -05:00
LVD-AC
8821963873 Implement delta auto-calibration and delta_height 2017-04-14 19:46:31 -05:00
Scott Lahteine
b305699046 Merge pull request #6341 from benlye/benlye-lcd_babystep_zoffset
Fix lcd_babystep_zoffset()
2017-04-14 19:11:46 -05:00
LVD-AC
03bda24d19 Add delta auto-calibration and configuration for Flsun AC 2017-04-14 19:08:14 -05:00
Scott Lahteine
396bd7b377 Update "firstpush" to open branch commits on Github 2017-04-14 19:06:31 -05:00
Scott Lahteine
1bd25fd2b3 Clean up config spacing, section headings, etc. 2017-04-14 19:06:31 -05:00
Scott Lahteine
153b0ae967 Tweak Delta Printer configuration note 2017-04-14 19:06:06 -05:00
Scott Lahteine
81ffd98dd9 Allow faux leveling 2017-04-14 19:06:06 -05:00
Scott Lahteine
2355d87e11 Merge pull request #6346 from thinkyhead/rc_broken_abl_test
Add support for SOLENOID_PROBE
2017-04-14 18:36:32 -05:00
Scott Lahteine
f4685c28b7 Reorder Conditionals_post.h and add comments 2017-04-14 18:18:21 -05:00
Scott Lahteine
5135be14ea Include Travis CI tests for 5 extruders / e-steppers 2017-04-14 18:18:20 -05:00
Scott Lahteine
0ac2b5c045 Additional 5 extruders support (solenoids, microstepping) 2017-04-14 18:18:20 -05:00
Scott Lahteine
fd2a0784ba Add support for SOLENOID_PROBE 2017-04-14 17:24:36 -05:00
Scott Lahteine
5803ba43a9 Expose EXT_SOLENOID as an advanced option 2017-04-14 17:24:36 -05:00
Scott Lahteine
ea734f910b Use direct pin manipulation whenever possible 2017-04-14 16:55:35 -05:00
Scott Lahteine
19d0c6a0c0 Patch to init W with RGBW_LED 2017-04-14 16:55:23 -05:00
Scott Lahteine
3e079660b0 Never define SLED_PIN 2017-04-14 16:36:32 -05:00
Scott Lahteine
76765a8279 Merge pull request #6337 from thinkyhead/rc_core_endstop_fix
CORExx endstop detection fixes
2017-04-14 14:24:58 -05:00
benlye
1a447d0047 Fix variant conditional for 1284p 2017-04-14 18:46:09 +01:00
benlye
1f9ee42750 Fix lcd_babystep_zoffset()
Resolve 'steps_to_mm was not declared in this scope' compilation error after recent changes to merge babystepping with M851
2017-04-14 18:38:35 +01:00
Bob-the-Kuhn
445d39e95a CORExx endstop detection fixes
1. The CORExx printers were checking more endstop axis than needed.

2. Removed all the CORE_xx_NOT logic.  The motor_direction(xx) routine
always returns the correct data so it is not needed.  It was actually
cause the wrong direction to be checked in some cases.

3. Made the logic/defines for X, Y & Z axis all the same.  The old logic
checked inappropriate configurations for Y and didn't check all the
correct configurations on Z.

4. Added a check for zero steps before the X, Y & Z axis.  Previously
would check the they axis even if there were no movement.
2017-04-13 21:43:37 -05:00
Roxy-3D
28fec61f92 M100 Fixes and Features
All the memory accesses need to be unsigned char in  order to avoid
false errors being detected.   Two new features are available for
developers to call into the M100 functionality to look for data
corruption.
2017-04-13 18:20:53 -05:00
Scott Lahteine
2f2835e622 Merge pull request #6332 from thinkyhead/rc_babystep_zprobe
Make BABYSTEP_ZPROBE_OFFSET an optional feature
2017-04-13 16:50:08 -05:00
Scott Lahteine
52c3ace102 Add BABYSTEP_ZPROBE_OFFSET as an optional feature 2017-04-13 16:29:43 -05:00
Scott Lahteine
cd4e6abec8 Group BABYSTEPPING options together 2017-04-13 16:26:45 -05:00
Scott Lahteine
972c9655e9 Merge pull request #6245 from thinkyhead/rc_babystep_zprobe
BABYSTEPPING updates Z probe offset
2017-04-13 16:06:07 -05:00
Scott Lahteine
60ac41a32c Add code to handle changes to zprobe_zoffset 2017-04-13 15:46:35 -05:00
Scott Lahteine
8fa4209916 Movement/adjustment should be reverse of probe offset change 2017-04-13 15:46:05 -05:00
Thomas Moore
361655828f Use babystepping to adjust bed probe z-offset 2017-04-13 15:46:05 -05:00
Scott Lahteine
36e5c7c389 Merge pull request #6330 from thinkyhead/rc_improvements
Sanity check per-axis options' array sizes
2017-04-13 13:08:44 -05:00
Scott Lahteine
02fca543bb Merge pull request #6272 from thinkyhead/rc_adc_variable_rate
Make ADC sensor reading frequency adjustable
2017-04-13 12:49:31 -05:00
Scott Lahteine
34308368c0 Sanity check per-axis settings for size 2017-04-13 11:35:20 -05:00
Scott Lahteine
ac96ae89f9 Apply const in Stepper::isr 2017-04-13 06:20:36 -05:00
Scott Lahteine
2fa1e882d0 Merge pull request #6325 from thinkyhead/rc_M20_with_size
Simplified M20 with size
2017-04-13 05:06:52 -05:00
Bob-the-Kuhn
1b12fea0fa simplified M20 with size 2017-04-13 04:56:58 -05:00
Scott Lahteine
4022b971db Merge pull request #6315 from thinkyhead/rc_unify_M421
Unify M421
2017-04-12 19:43:28 -05:00
Scott Lahteine
b236562354 Merge pull request #6306 from thinkyhead/cleanup_after_6302
Adjustments to M100
2017-04-12 19:12:27 -05:00
Scott Lahteine
5e4f4d387f Swap MBL z_values dimensions to [X][Y] 2017-04-12 17:24:05 -05:00
Scott Lahteine
f81b518a03 Add Travis tests for optional M100 features 2017-04-12 17:07:22 -05:00
Scott Lahteine
063f641651 Unify M421 2017-04-11 15:46:13 -05:00
Scott Lahteine
6d5400dc31 Merge pull request #6240 from thinkyhead/rebuild_rgb_led
Extend RGB LED with Printer Events
2017-04-11 15:16:57 -05:00
Scott Lahteine
dac21ec680 Add support for an RGBW LED 2017-04-11 12:58:55 -05:00
Scott Lahteine
e7746ffee4 Extend RGB LED support, adding Printer Events 2017-04-11 12:15:41 -05:00
Scott Lahteine
c7063eb55c theTarget => target_temp 2017-04-11 12:15:41 -05:00
Scott Lahteine
36bda2bade Add HAS_RESUME_CONTINUE shorthand macro 2017-04-11 12:15:40 -05:00
Scott Lahteine
53e6c33c37 2 is DXC_DUPLICATION_MODE 2017-04-11 12:15:40 -05:00
Scott Lahteine
a2cb0a3d54 Use multiply for delta probe constraint 2017-04-11 12:15:40 -05:00
Scott Lahteine
6487c96a4a Merge pull request #6313 from Kaibob2/patch-10
Allow 10mm Movements for Z-Axis
2017-04-11 12:04:10 -05:00
Scott Lahteine
944218f7da Merge pull request #6309 from thinkyhead/rc_fix_minimum_pulse
Fix MINIMUM_STEPPER_PULSE calculations
2017-04-11 11:54:26 -05:00
Kai
001bc14255 Allow 10mm Movements for Z-Axis
I use the movement options via LCD quite often. Especially to get the nozzle out of the way. I see no reason, why the 10mm option is disabled for the Z-Axis, this is why i always delete this line when i compile a new version.
If this is unwanted, please just close this PR
2017-04-11 18:39:26 +02:00
Scott Lahteine
6a9b008044 Fix MINIMUM_STEPPER_PULSE maths 2017-04-11 11:11:17 -05:00
Scott Lahteine
68773f4486 Simplify stepper macros by renaming enable/disable macros 2017-04-11 11:10:26 -05:00
Scott Lahteine
e02a5a6371 Add macros for delays by machine cycle 2017-04-11 09:18:32 -05:00
Scott Lahteine
4ea447959e Merge pull request #6311 from thinkyhead/rc_bare_M109_M190
Have M109 / M190 do nothing with no parameters
2017-04-11 06:10:31 -05:00
Scott Lahteine
ecc537015a Have M109 / M190 do nothing with no parameters 2017-04-11 05:06:25 -05:00
Scott Lahteine
03aa9a390e Apply coding standards to M100, break up into functions 2017-04-10 21:09:43 -05:00
Scott Lahteine
48c16fc6ef Merge pull request #6307 from thinkyhead/rc_less_no_reentrance
Only lcd_synchronize needs no_reentry
2017-04-10 20:58:32 -05:00
Scott Lahteine
4fcfe926d6 Only lcd_synchronize needs no_reentry 2017-04-10 20:13:23 -05:00
Scott Lahteine
67fb7f82ac Merge pull request #6283 from thinkyhead/rc_eeprom_z_fade
Save / restore z_fade_height in EEPROM
2017-04-10 20:05:20 -05:00
Scott Lahteine
eff5af569b Merge pull request #6300 from MagoKimbra/rc_fix_mesh_report
Fix mbl_mesh_report
2017-04-10 19:37:19 -05:00
Scott Lahteine
4a18968c10 Merge pull request #6297 from Kaibob2/patch-9
Fix EPROM -> EEPROM
2017-04-10 19:35:30 -05:00
Roxy-3D
ba85faabc0 Fix M100 Free Memory Checker
M100 had numerious changes and quit working.   Part of the problem is
the overloading of the SERIAL_PROTOCOL functions.   Also, some of the
address arithmatic was changed to use char *ptr and passing ptr into the
SERIAL_PROTOCOL functions caused them to try to print a string instead
of a number.     M100 is working again.   Let's keep it that way!

M100 has been expanded to now have a function  int
free_memory_is_corrupted()  that can be called from other code to see if
the free space is still contiguous.  It may make sense to add a flag to
control its verbose nature but right now, the extra chit chat is very
helpful to know int free_memory_is_corrupted()  is doing the right thing
and what it found at various points when it was called.     A 'Show &
Tell' is coming up with int free_memory_is_corrupted().
2017-04-10 15:33:55 -05:00
Kai
3b82db5fe9 Missing semicolon in ultralcd.cpp
When PARK_HEAD_ON_PAUSE is defined Marlin won't compile because of two missing semicolon.
2017-04-10 14:45:51 -05:00
MagoKimbra
7d2e637867 Fix mbl_mesh_report 2017-04-10 20:50:19 +02:00
Kai
afeb0452ef Fix EPROM -> EEPROM
These fixes are neede because before it showed the englisch text even if language = de was selected
2017-04-10 18:37:00 +02:00
Scott Lahteine
7f950a80c0 Make ADC sensor reading frequency adjustable 2017-04-09 22:18:21 -05:00
Scott Lahteine
dad907b923 Merge pull request #6293 from thinkyhead/rc_move_toshiba
Put TOSHIBA with other stepper driver options
2017-04-09 22:08:36 -05:00
Scott Lahteine
786af73e24 Convert config code to a static class 2017-04-09 22:06:41 -05:00
james94jeans2
5b9476fe78 Added z_fade_height to EEPROM-Settings
Firmware was forgetting the z_fade_height in Planner, set by M420 Z<f>,
after each reset or loading settings from EEPROM. Added the float
z_fade_height to EEPROM-Storage, now remembers the value.
2017-04-09 21:16:58 -05:00
Scott Lahteine
9343f6a95f Put TOSHIBA with other stepper driver options 2017-04-09 20:52:49 -05:00
Scott Lahteine
7a704af5e6 Merge pull request #6284 from thinkyhead/rc_wt150_rebase
wt150 (Mightyboard Rev E) & RRD Full Graphic Smart Controller
2017-04-09 20:27:44 -05:00
Scott Lahteine
2bde7940e0 Merge pull request #6289 from zlowred/RCBugFix
Fixed comparison of float values to NaN
2017-04-09 19:39:04 -05:00
Max Matveev
2031fb913b Fixed comparison of float values to NaN 2017-04-09 20:28:46 +02:00
Scott Lahteine
e48a52a530 Patch a display issue with LCD_DECIMAL_SMALL_XY
The `ftostr4sign` function got munged by the `WITHIN` patch
2017-04-09 10:25:35 -05:00
Scott Lahteine
1a3cd6a090 Merge pull request #6213 from thinkyhead/rc_gitattributes
Init bed_level_virt_interpolate on EEPROM load
2017-04-09 08:13:11 -05:00
Scott Lahteine
314a02e2d5 Toggle with XOR 2017-04-09 07:58:47 -05:00
Scott Lahteine
cfad4736cd Merge pull request #6285 from thinkyhead/rc_cheaptronic_v2
Cheaptronic V2
2017-04-09 07:09:23 -05:00
Scott Lahteine
8bc0d90b00 Init bed_level_virt_interpolate on EEPROM load 2017-04-09 07:04:20 -05:00
MD
20dd5376b8 Cheaptronic V2
Add support for new electronics
www.reprapobchod.cz
2017-04-09 06:57:43 -05:00
Scott Lahteine
4cdda5615b Bring other configs up to date with wt150 changes 2017-04-09 06:45:42 -05:00
Paweł Stawicki
9b0885f4f6 Allow boards without a thermistor 2017-04-09 06:45:41 -05:00
Paweł Stawicki
64cfcebe66 Update SlowSoftI2CMaster link. MightyBoard digipots I2C bus has no resistors. 2017-04-09 06:45:03 -05:00
Paweł Stawicki
0eb16d9ff7 Add example config for the wt150 printer with RepRapDiscount Full Graphic Smart Controller 2017-04-09 06:44:54 -05:00
Paweł Stawicki
652bedfa18 Add RepRapDiscount Full Graphic Smart Controller support to MIGHTYBOARD REVE 2017-04-09 06:44:53 -05:00
Paweł Stawicki
44cdebb8f1 Add software spi support for max6675 2017-04-09 06:44:53 -05:00
Paweł Stawicki
191fec009f Add digipot i2c control for MCP4018 2017-04-09 06:44:53 -05:00
Scott Lahteine
e5b16081cb Update TinyBoy2 configurations 2017-04-09 06:44:53 -05:00
Scott Lahteine
1855534f20 Config files cleanup 2017-04-09 06:44:52 -05:00
Scott Lahteine
2f5e934a19 Merge pull request #6282 from thinkyhead/rc_cleanup_and_5_extruders
Additional missed patches
2017-04-09 04:35:08 -05:00
Scott Lahteine
c26a315d0b Additional missed patches 2017-04-09 04:24:23 -05:00
Scott Lahteine
635f182478 Merge pull request #6281 from thinkyhead/rc_cleanup_and_5_extruders
More patches for 5 extruders
2017-04-09 04:07:22 -05:00
Scott Lahteine
39617e10b8 Patch configs comment formatting 2017-04-09 03:49:16 -05:00
Scott Lahteine
c54f6cf23d Updates to support 5 extruders 2017-04-09 03:49:16 -05:00
Scott Lahteine
2b88ccd0aa Apply UBL mesh bounds to remaining configs 2017-04-09 03:49:15 -05:00
Scott Lahteine
60be3d264b Macros to print floats, hiding imprecision 2017-04-09 03:48:40 -05:00
Scott Lahteine
b356d73239 Merge pull request #6278 from thinkyhead/pr_delta_angles
Followup to additional delta trim options
2017-04-08 22:25:57 -05:00
Jimmy Envall
f78d44e91a Added support for delta tower angle corrections. 2017-04-08 21:13:44 -05:00
Scott Lahteine
d3b4d84586 Merge pull request #6277 from thinkyhead/pr_roxy3d_rcbugfix
Unify UBL Command Parsing
2017-04-08 20:17:46 -05:00
Scott Lahteine
98c9de11e1 Merge pull request #6266 from thinkyhead/rc_cleanup_after
Cleanup after recent merges
2017-04-08 20:08:15 -05:00
Scott Lahteine
d4ce839351 Cleanup following Pins Debug update 2017-04-08 18:59:57 -05:00
Scott Lahteine
c7a8f7970b Formatting / cleanup 2017-04-08 18:59:57 -05:00
Scott Lahteine
29d4ec8257 Support 5 extruder auto fans 2017-04-08 18:59:57 -05:00
Scott Lahteine
824f3c1c0d Fix up configuration comments 2017-04-08 18:59:56 -05:00
Scott Lahteine
995ed90248 Clean up Filament Width Sensor comments 2017-04-08 18:59:56 -05:00
Scott Lahteine
5a7b810fdd General comment cleanup 2017-04-08 18:58:33 -05:00
Scott Lahteine
0027c22839 Drop extraneous calls to lcd_update 2017-04-08 18:58:33 -05:00
Scott Lahteine
d6db7a9b03 patch "step_remaining" 2017-04-08 18:13:20 -05:00
Scott Lahteine
cbc2331187 Use LCD_MESSAGEPGM over lcd_setstatuspgm 2017-04-08 18:04:39 -05:00
Scott Lahteine
3729510b1e Set and check main parameter values, report all errors 2017-04-08 17:15:55 -05:00
Roxy-3D
34d3ed9ab1 These items were removed from the UBL Command Parsing
Having these items randomly (and errorniously) disappear cost me several
hours of work yesterday.
2017-04-08 15:30:20 -05:00
Scott Lahteine
15edb41cee Patches to UBL 2017-04-08 14:59:14 -05:00
Roxy-3D
14cf527bb8 Getting setup for debugging 2017-04-08 14:59:14 -05:00
Scott Lahteine
f8408036f2 Merge pull request #6264 from thinkyhead/rc_five_extruders
Support up to 5 extruders in Marlin
2017-04-07 12:48:56 -05:00
Bob-the-Kuhn
5212cb8304 Merge pull request #6271 from Bob-the-Kuhn/MCP4728-consistency-2
MCP4728 consistency ... Finish name change
2017-04-07 11:31:19 -05:00
Bob-the-Kuhn
f7fc49c3a3 Finish name change
DAC_STEPPER_DFLT wasn't changed to DAC_MOTOR_CURRENT_DEFAULT in all
places on PR #6124
2017-04-07 11:05:24 -05:00
Scott Lahteine
832064e4f2 Implementation changes to support 5 extruders 2017-04-07 10:46:37 -05:00
Scott Lahteine
04050237f0 Header and pins changes to support 5 extruders 2017-04-07 10:46:36 -05:00
Scott Lahteine
2a84122edd Configuration changes to support 5 extruders 2017-04-07 10:46:35 -05:00
Scott Lahteine
edf18977c1 Patch pins files hotends/e-steppers sanity check 2017-04-07 10:46:33 -05:00
Scott Lahteine
dc84678fc1 Fix HOTEND_STATUS_ITEM for graphical display 2017-04-06 23:07:30 -05:00
Scott Lahteine
a0de5d94e2 Merge pull request #6258 from benlye/benlye-bilinearfix2
Better fix for bilinear Z offset and G29 Z (update to #6251)
2017-04-06 20:51:57 -05:00
Scott Lahteine
b23aef5b8d Merge pull request #6190 from Bob-the-Kuhn/Stop-and-Kill-prints---round-2
Message for every KILL and STOP (also need delays)
2017-04-06 20:40:12 -05:00
Roxy-3D
945303c0d5 eleminate bootscreen.h 2017-04-06 19:55:41 -05:00
Roxy-3D
ef3da3971e Update ubl.h 2017-04-06 19:55:41 -05:00
Roxy-3D
8644dc170b get synchronized to current file names 2017-04-06 19:55:41 -05:00
Roxy-3D
1451b7eacf UBL's Grid Based Leveling code
Pretty much...  The code is in place.  Still more work to do.    But it
has a lot of hooks and variables in other code, so commit and merge
before I pick up a million 'Conflicts'.
2017-04-06 19:55:41 -05:00
Bob-the-Kuhn
549055f20c Merge pull request #6124 from Bob-the-Kuhn/MCP4728-consistency
MCP4728 consistency & fix ultralcd.cpp (PRINTRBOARD Rev F and RIGIDBOARD V2)
2017-04-06 16:35:50 -05:00
Bob-the-Kuhn
a77875c9d2 Merge pull request #6114 from Bob-the-Kuhn/try2-add-BLTouch-retry
Another BLTouch retry place (replaces PR #6108)
2017-04-06 16:25:55 -05:00
Bob-the-Kuhn
3b9ff2cb12 Merge pull request #5676 from Bob-the-Kuhn/configuration.h
Configuration.h - reword Z PROBE section
2017-04-06 16:18:34 -05:00
Bob-the-Kuhn
6643d553f6 # This is a combination of 2 commits.
# This is the 1st commit message:

MCP4728 consistency & fix ultralcd.cpp

The MCP4728 DAC controls the stepper motor current strenth on the
PRINTRBOARD Rev F and RIGIDBOARD V2 boards.

PR #5792 on 9 FEB 2017 implemented default drive percentages but only on
the RIGIDBOARD V2.

This change moves the default settings to Configuration_adv.h.

Also, ultralcd.cpp won't compile because of a type def conflict.
Changed it to match the one in stepper_dac.cpp

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

reword stepper curent section for clarity

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

change name & improve comments

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

changed name from A4JP to SCOOVO_X9H per PR #6139

# This is the commit message #2:

fix typo
2017-04-06 16:16:27 -05:00
Bob-the-Kuhn
a44b3432c1 add BLTouch retry to a second place & add/update delays
=================================================

implement requested changes

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

remove delays (they're in another PR) & move return
2017-04-06 16:13:07 -05:00
Bob-the-Kuhn
a5abc61fb9 Merge pull request #6219 from Bob-the-Kuhn/Servo-probe-and-toggle-pins
M43 - add Toggle utility and Z servo utility (replaces PR #5864)
2017-04-06 16:10:50 -05:00
Bob-the-Kuhn
f87012a063 Merge pull request #5762 from Bob-the-Kuhn/Z_DUAL_ENDSTOP-make-offset-a-configuration-item
Z_DUAL_ENDSTOPS -  make offset a configuration item
2017-04-06 16:09:15 -05:00
Bob-the-Kuhn
3b8926bd09 improved wording, consolidation of info, BLTouch warning
==============================================

clarified BLTouch calculation & changed comment delimitters/flags

I found it hard to pickout the various sections in this area so I
changed most comments from // style to /** ... */

Made the BLTouch calculation simpler and clarified the units of measure
for the result.

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

add changes to example configurations

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

add TinyBoy2 to this PR & add BLTouch Delay
2017-04-06 16:06:01 -05:00
Scott Lahteine
55d296aaf0 pinsDebug with more features, uses less RAM
I've just uploaded a major change to pinsDebug.
The big change was creating an array in FLASH that contained every
active pin definition. That reduced the RAM memory usage considerably
but increased the FLASH usage.
Creating the array requires going through the pin list twice. Rather
than having two copies of it in the code I moved the list out to another
file (pinsDebug_list.h) and then just did two #includes.
From the user’s view they’ll see the following changes:
1. Now reports all the names assigned to a pin
2. The port is now reported in addition to the pin number.
3. When PWM0A & PWM1C share a pin, both PWMs are reported
4. More PWM/Timer info is reported
One new item that may cause some concern is the usage of the LINE
predefined preprocessor macro. It may not be available if the Arduino
IDE goes to a different compiler.

Includes support for 1284 & 1286 families.

Memory usage changes when enabling PINS_DEBUGGING:
ATmega2560
FLASH
.           without   52576
.           with new  64592
.           with old  62826
.           new-out   12016
.           old-out   10250
.           new-old   1766
.
RAM
.           without   2807
.           with new  2875
.           with old  3545
.           new-out   68
.           old-out   738
.           new-old   -670

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

minor changes - mostly formatting

1) added newline to end of teensyduino file

2) changed flag name from TEENSYDUINO to TEENSYDUINO_IDE.  Got warnings
about redefining TEENSYDUINO

3) removed some trailing spaces

reduce PROGMEM size & update pin list

Reduced PROGMEM usage by
1) converting often used macro to a function
2) moved as much as possible into the function

This required creating two arrays of address pointers for the PWM
registers.

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

update with new M3, M4, M5 pin names

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

report I/O status for unused/unknown pins
2017-04-06 16:06:01 -05:00
Scott Lahteine
e116723b8b Adjust indentation in ubl.h 2017-04-06 16:06:00 -05:00
Scott Lahteine
1b3a26f2f5 Rename all UBL files with a ubl_ prefix 2017-04-06 16:06:00 -05:00
Scott Lahteine
d13991ae18 Use same config name for all mesh dimensions 2017-04-06 16:05:59 -05:00
Bob-the-Kuhn
f9686a108c add Z servo test and toggle pins to M43 2017-04-06 15:59:38 -05:00
Scott Lahteine
62cbaa302e Z_DUAL_ENDSTOP - make offset a configuration item
The offset for Z_DUAL_ENDSTOP (z_endstop_adj) is already in Marlin.
This PR just makes it a configuration item.

z_endstop_adj is initialized in two places so both had to be modified.
2017-04-06 15:57:10 -05:00
Bob-the-Kuhn
3b6333c613 Merge pull request #5668 from Bob-the-Kuhn/pinsDebug-PROGMEM
pinsDebug with more features, uses less RAM
2017-04-06 15:51:45 -05:00
Scott Lahteine
c9e35004e7 pinsDebug with more features, uses less RAM
I've just uploaded a major change to pinsDebug.
The big change was creating an array in FLASH that contained every
active pin definition. That reduced the RAM memory usage considerably
but increased the FLASH usage.
Creating the array requires going through the pin list twice. Rather
than having two copies of it in the code I moved the list out to another
file (pinsDebug_list.h) and then just did two #includes.
From the user’s view they’ll see the following changes:
1. Now reports all the names assigned to a pin
2. The port is now reported in addition to the pin number.
3. When PWM0A & PWM1C share a pin, both PWMs are reported
4. More PWM/Timer info is reported
One new item that may cause some concern is the usage of the LINE
predefined preprocessor macro. It may not be available if the Arduino
IDE goes to a different compiler.

Includes support for 1284 & 1286 families.

Memory usage changes when enabling PINS_DEBUGGING:
ATmega2560
FLASH
.           without   52576
.           with new  64592
.           with old  62826
.           new-out   12016
.           old-out   10250
.           new-old   1766
.
RAM
.           without   2807
.           with new  2875
.           with old  3545
.           new-out   68
.           old-out   738
.           new-old   -670

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

minor changes - mostly formatting

1) added newline to end of teensyduino file

2) changed flag name from TEENSYDUINO to TEENSYDUINO_IDE.  Got warnings
about redefining TEENSYDUINO

3) removed some trailing spaces

reduce PROGMEM size & update pin list

Reduced PROGMEM usage by
1) converting often used macro to a function
2) moved as much as possible into the function

This required creating two arrays of address pointers for the PWM
registers.

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

update with new M3, M4, M5 pin names

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

report I/O status for unused/unknown pins
2017-04-06 14:46:28 -05:00
Scott Lahteine
7dfe2cc132 Merge pull request #6254 from thinkyhead/rc_ubl_rename
Group all UBL files via a common prefix
2017-04-06 05:46:18 -05:00
Scott Lahteine
4abd53f65a Adjust indentation in ubl.h 2017-04-06 05:36:16 -05:00
Scott Lahteine
f5c5c1f771 Rename all UBL files with a ubl_ prefix 2017-04-06 05:33:27 -05:00
Scott Lahteine
11430b6d33 Merge pull request #6256 from thinkyhead/rc_unify_grid_size
Use same config name for all mesh dimensions
2017-04-06 05:30:28 -05:00
benlye
f1d50ac1dc Fixing bilinear Z offset and G29 Z
The fix in #6251 for bilinear Z offset was flawed and broke the Z parameter of G29 for bilinear levelling.  This is reverted and a different fix is used for the double-addition of the Z-probe offset to the bilinear correction grid.
2017-04-06 07:41:46 +01:00
Scott Lahteine
eb1e6aa29b Use same config name for all mesh dimensions 2017-04-06 00:42:52 -05:00
Scott Lahteine
034e912c85 Merge pull request #6248 from thinkyhead/rc_marlin_scad_mesh
Add hidden option to output Bilinear grids in JSON
2017-04-06 00:36:45 -05:00
Scott Lahteine
c961dd084d Add hidden option to output Bilinear grids in JSON 2017-04-05 23:43:17 -05:00
Scott Lahteine
bc09e862a9 Re-enable .cpp as LF in .gitattributes 2017-04-05 22:30:30 -05:00
Scott Lahteine
df7b4252fd Reduce M420 code for UBL slightly 2017-04-05 22:30:29 -05:00
Scott Lahteine
8866158d03 Add LEVELING_DATA as a capability 2017-04-05 22:30:28 -05:00
benlye
0a2b4f3486 Fix bilinear levelling z offset
Since run_probe was altered to return the probe Z position rather than the nozzle Z position bilinear levelling has been broken because the Z-offset has been applied twice - once in the run_probe function, and then again in the G29 code for bilinear levelling.
2017-04-05 22:01:40 -05:00
Scott Lahteine
44a849bdce Fix broken M206/M428/G92 offsets 2017-04-05 22:01:37 -05:00
Roxy-3D
52978e5ba5 Fix spelling mistake when UBL's mesh is Inactive 2017-04-02 20:07:09 -05:00
Roxy-3D
0423e93c42 Fix M421 AUTO_BED_LEVELING_BILINEAR and AUTO_BED_LEVELING_UBL
M421 was not connected up for AUTO_BED_LEVELING_BILINEAR.
M421 needed to migrate mesh data to new UBL EEPROM layout.
2017-04-02 16:46:37 -05:00
Scott Lahteine
3412950abc Merge pull request #6209 from thinkyhead/rc_psu_zero
Power Supply 0 as "General"
2017-04-02 16:44:42 -05:00
Roxy-3D
3e9e94801f Fix problem described in issue # 6175
As it turns out...   an unsigned int can not go to less than 0,  so the
loop never terminates.
2017-04-02 13:00:27 -05:00
Scott Lahteine
a37a605fee Merge pull request #6217 from thinkyhead/rc_fix_invisibles_to_most
Patch .gitattributes till UBL line endings are fixed
2017-04-02 12:52:26 -05:00
Scott Lahteine
01a293b6e3 Patch .gitattributes till UBL line endings are fixed 2017-04-02 12:50:02 -05:00
Scott Lahteine
289e3d6844 Merge pull request #6215 from thinkyhead/rc_bed_false_alarm
Fix thermal runaway when nonexistent bed temp is set
2017-04-02 11:59:58 -05:00
Scott Lahteine
1c69a155cf Merge pull request #6214 from thinkyhead/rc_bltouch_delay_opt
Configurable delay for BLTouch servo emulation
2017-04-02 11:59:34 -05:00
Scott Lahteine
948728e63b Fix line-endings in UBL_G29 2017-04-02 11:48:26 -05:00
Scott Lahteine
699310d1d2 Fix: Thermal runaway if nonexistent bed's temp is set 2017-04-02 11:48:10 -05:00
Scott Lahteine
c56eec29f0 Configurable delay for BLTouch servo emulation 2017-04-02 11:14:53 -05:00
Scott Lahteine
deaad78df9 Merge pull request #5678 from Bob-the-Kuhn/G38-optional-double-tap
G38 bug fix, made double touch optional & reverted to Z_MIN_PROBE
2017-04-02 10:32:04 -05:00
Scott Lahteine
b3e9977f97 Merge pull request #6212 from thinkyhead/rc_gitattributes
Fix LCD preheat menus
2017-04-02 09:54:13 -05:00
Scott Lahteine
5bce731962 Fix LCD preheat menus 2017-04-02 09:32:22 -05:00
Scott Lahteine
9faa8c4704 Merge pull request #6210 from thinkyhead/rc_gitattributes
Add .gitattributes to normalize line endings
2017-04-02 08:56:51 -05:00
Scott Lahteine
4c72167af3 Prevent a warning on echo_command 2017-04-02 08:36:58 -05:00
Scott Lahteine
9b5fd9522e Fix formatting, order for a UBL change 2017-04-02 07:15:40 -05:00
Scott Lahteine
f0ef8a1cbd Add .gitattributes to normalize line endings 2017-04-02 06:47:52 -05:00
Tannoo
54173c80ad Power Supply 0 as "General" 2017-04-02 06:21:34 -05:00
Scott Lahteine
883c6762c4 Merge pull request #6208 from thinkyhead/rc_parity_with_32bit
Patch MarlinSerial to match up with 32-bit version
2017-04-02 05:13:03 -05:00
Scott Lahteine
a2775d0c70 can wstring be removed? 2017-04-02 04:43:33 -05:00
Scott Lahteine
de4e19f17e Patch MarlinSerial to match up with 32-bit version 2017-04-02 04:39:18 -05:00
Scott Lahteine
34b23ff312 Merge pull request #6202 from thinkyhead/rc_fix_broken_ubl
Patching up UBL, vetting recent commits
2017-04-02 03:51:38 -05:00
Scott Lahteine
2cbc7b4b73 Relocate serial macros and functions 2017-04-02 01:05:25 -05:00
Scott Lahteine
eaa66f3c46 Indent MarlinSerial code 2017-04-02 01:05:25 -05:00
Scott Lahteine
7a7a80e6c5 status_printf => lcd_status_printf_P 2017-04-02 01:05:25 -05:00
Scott Lahteine
0e6ec34228 Use PSTR versions of lcd_status... to save SRAM 2017-04-02 00:45:39 -05:00
Scott Lahteine
34e2420b9b Apply const args, clean up find_closest_circle_to_print 2017-04-01 23:15:41 -05:00
Scott Lahteine
e19fbd27ce Minor spelling patch 2017-04-01 23:08:00 -05:00
Scott Lahteine
790a3e9a8c Remove extraneous check of UBL_G26_MESH_EDITING 2017-04-01 23:03:40 -05:00
Scott Lahteine
7310110ec0 Fix logic of UBL::fade_scaling_factor_for_z 2017-04-01 22:52:48 -05:00
Scott Lahteine
a7aa70e79a Merge pull request #6201 from thinkyhead/rc_fix_broken_ubl
Fix broken auto#.g, some other regressions
2017-04-01 22:14:04 -05:00
Scott Lahteine
1a775cecac Revert behavior of enqueue_and_echo_commands_P 2017-04-01 21:53:46 -05:00
Scott Lahteine
79d42d87c1 Syntax cleanup 2017-04-01 21:53:46 -05:00
Scott Lahteine
b47fd31c37 Revert some changes to UBL 2017-04-01 21:53:45 -05:00
Bob-the-Kuhn
185337e787 add delays to allow stop & kill messages to get out 2017-04-01 00:23:14 -05:00
Scott Lahteine
63abb65146 Update description of PINS_DEBUGGING 2017-03-31 18:57:48 -05:00
Scott Lahteine
f75aa4d5be Merge pull request #6050 from thinkyhead/rc_probe_manually
Add PROBE_MANUALLY — ABL without a probe
2017-03-31 12:27:33 -05:00
Scott Lahteine
73e193da1d Implement LCD_BED_LEVELING for PROBE_MANUALLY 2017-03-31 11:50:18 -05:00
Scott Lahteine
fcadc7bb1a Implement the "manual" option for ABL 2017-03-31 11:50:18 -05:00
Scott Lahteine
9e22184936 Add a "manual" option for ABL 2017-03-31 11:50:18 -05:00
Scott Lahteine
541165e878 Merge pull request #6181 from thinkyhead/rc_ubl_further_fixes
Further adjustments to UBL code
2017-03-31 11:35:02 -05:00
Scott Lahteine
b19a15fa7f Within applied to UBL 2017-03-31 11:12:57 -05:00
Scott Lahteine
342ee458ae Additional UBL fixes, optimizations 2017-03-31 11:12:57 -05:00
Scott Lahteine
a5e085cbea Have run_probe() return probe Z, not nozzle Z 2017-03-31 09:27:49 -05:00
Scott Lahteine
4487d22d56 Apply FIXFLOAT macro 2017-03-31 09:27:48 -05:00
Scott Lahteine
6cac0f43eb MBL fiddle 2017-03-31 09:27:48 -05:00
Scott Lahteine
25a6bfa7ed Add and apply WITHIN macro 2017-03-31 09:27:48 -05:00
Scott Lahteine
81136c1e82 Merge pull request #6177 from thinkyhead/rc_tinyboy
Support for TinyBoy 2 3D printer (and its OLED display)
2017-03-31 04:31:47 -05:00
Scott Lahteine
93aad54dc1 Clean up code, remove _now command function 2017-03-31 04:17:31 -05:00
Stefan Brüns
6ba6c92a81 Add example configuration for TinyBoy L10/L16
The TB2 is a Indiegogo funded 3d printer. It uses a MKS SMELZI V1.0
main board (based on MELZI, i.e. Sanguinololu). I comes as a complete kit,
including display and panel.
Two variants exists, L10 and L16, with a height of 100 and 160 mm.
The heating function of the provided bed can enabled by soldering a
thermistor and some wires to it.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-31 04:05:35 -05:00
Stefan Brüns
0fe57ad4f5 Add Support TinyBoy2 OLED/Encoder panel
The OLED is driven by an SSD1306, connected to the board via
I2C, the rotary encoder is connected to 3 GPIO pins.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-31 04:05:34 -05:00
Scott Lahteine
baadb11536 Merge pull request #6174 from thinkyhead/rc_ubl_continued
UBL additional cleanup
2017-03-31 03:39:50 -05:00
Scott Lahteine
65ca6472ba Make G26 compatible with G92 and M206 2017-03-31 02:20:20 -05:00
Scott Lahteine
4902fd4e95 More data in UBL class, make it a static class
- Make all `unified_bed_leveling` data/methods static
- Move some UBL-related variables into the class
- Replace `map_[xy]_index_to_bed_location` with `mesh_index_to_[xy]pos`
2017-03-31 02:20:20 -05:00
Scott Lahteine
edbc024d76 Disable UBL_G26_MESH_EDITING by default 2017-03-31 02:20:20 -05:00
Scott Lahteine
9e4bd6b3b5 Further repairs to UBL, comments, spacing 2017-03-31 02:20:20 -05:00
Bob-the-Kuhn
f3618c3337 Reduce UBL RAM usage by making G26/G29 optional 2017-03-31 02:20:19 -05:00
Scott Lahteine
e746d68a12 Merge pull request #6176 from thinkyhead/rc_mbl_abl_optimize
Make MBL a static class, use lookup for index-to-point conversion
2017-03-31 02:12:49 -05:00
Scott Lahteine
c9eb1d6ab7 Make MBL a static class, use lookup for index-to-point conversion 2017-03-31 01:28:07 -05:00
Scott Lahteine
de9d2cddc3 Merge pull request #6152 from thinkyhead/rc_cleanup_6150_etc
UBL cleanup, optimization
2017-03-30 17:40:29 -05:00
Scott Lahteine
9217e4b8ec Various UBL cleanups and bug fixes 2017-03-30 17:09:49 -05:00
Scott Lahteine
9924199802 Merge pull request #5908 from thinkyhead/rc_fix_slowdown
General minor cleanup
2017-03-29 21:43:33 -05:00
Scott Lahteine
0e71e7b2fb Cleanup to planner.cpp 2017-03-29 06:48:07 -05:00
Scott Lahteine
f105cad43c Marlin: Slight cleanup to Marlin_main.cpp 2017-03-29 06:40:29 -05:00
Scott Lahteine
499f9e04e1 Marlin: Temperature soft-PWM cleanup 2017-03-29 06:37:27 -05:00
Scott Lahteine
7ddd94dc61 Merge pull request #5994 from StefanBruens/fix_Makefile_errors
Fix makefile errors, cleanup
2017-03-29 06:32:08 -05:00
Scott Lahteine
af09095f03 Merge pull request #6154 from thinkyhead/rc_fil_sensor_vs_sd
Show Filament Width on LCD when SD is disabled
2017-03-29 05:24:48 -05:00
Remo Kallio
d38b1bc4b1 Show filament width sensor values in LCD constantly if SD card support is not enabled. 2017-03-29 04:03:08 -05:00
Scott Lahteine
e3459ec178 Merge pull request #5989 from MagoKimbra/rc_fix_delta_angles
Fix delta_angles
2017-03-29 03:35:18 -05:00
Scott Lahteine
592300922c Merge pull request #6149 from thinkyhead/rc_scara_feedrate
Convert feedrate on SCARA from mm/s to deg/s
2017-03-29 03:31:44 -05:00
Scott Lahteine
f49aec057f Tweak "can not" => "can't" in RUMBA pins 2017-03-29 01:04:50 -05:00
Scott Lahteine
0a23a1bb3b Dynamic feedrate on SCARA, converting target mm/s to deg/s 2017-03-28 17:21:07 -05:00
Roxy-3D
d8724bb546 Get G29's P1 (Automated Probing) working again.
Incorrect optimizations of data types and ternary operators caused some
issues.
2017-03-28 17:11:02 -05:00
Scott Lahteine
8d53298a6d Merge pull request #6139 from thinkyhead/rc_a4jp_scoovo
Board A4JP should be SCOOVO_X9H
2017-03-28 14:06:39 -05:00
Scott Lahteine
c7f6ee9c93 Board A4JP should be SCOOVO_X9H 2017-03-27 22:22:13 -05:00
Scott Lahteine
8c07ac7f7c Merge pull request #6133 from thinkyhead/rc_use_safe_delay
Use safe_delay to ensure watchdog reset
2017-03-27 00:18:02 -05:00
Scott Lahteine
a9fc30ae2e Use safe_delay to ensure watchdog reset 2017-03-26 23:49:56 -05:00
Roxy-3D
171904b6c7 Make G29 What command print reliably and fix G29 P1 bug Waldo found 2017-03-26 17:05:58 -05:00
Roxy-3D
9d3ac66f73 Map clean up of UBL
UBL's maps are cleaner.   And with a 1 value, G29 O 1  will generate a
map suitable to be Cut & Pasted into Excel so a Suface Map can be
generated.
2017-03-25 18:55:05 -05:00
Roxy-3D
9a1949a91e Cleaned up G26 ready to replace existing one at MarlinFirmware/Marlin 2017-03-25 10:15:40 -05:00
Roxy-3D
aec85ad45a Start of process to get UBL running again.
The wait_for_user change totally broke UBL.   But there is stuff wrong
now in the thermal code and/or LCD Panel code.
2017-03-24 18:38:27 -05:00
Scott Lahteine
b47eaf14ae Merge pull request #6109 from thinkyhead/rc_soft_pwm_dither
PWM dithering followup
2017-03-24 18:21:07 -05:00
Scott Lahteine
34d1c41b5f Merge pull request #6111 from benlye/benlye-patch-echo_command
Fix type conversion issue with echo_command
2017-03-24 17:57:28 -05:00
Scott Lahteine
7d65911c00 Merge pull request #6110 from thinkyhead/rc_bilinear_and_m851
Adjust bilinear grid in M851
2017-03-24 17:51:25 -05:00
benlye
6a601aca35 Fix type conversion issue with echo_command
With the the current definition of echo_command I cannot compile RCBugFix (Arduino IDE 1.8.1) with the error "invalid conversion from 'const char*' to 'char*'".  This change resolves that.
2017-03-24 17:23:02 +00:00
Scott Lahteine
009a6ddd39 Adjust bilinear grid in M851 2017-03-24 06:28:59 -05:00
Scott Lahteine
eab7854a73 Merge pull request #6074 from thinkyhead/rc_immediate_shove
Immediate commands take precedence
2017-03-24 05:52:27 -05:00
Stefan Brüns
5699e2b881 Add SOFT_PWM_DITHER to other configurations 2017-03-24 05:02:24 -05:00
Scott Lahteine
5a2abeca78 Merge pull request #6100 from thinkyhead/rc_soft_pwm_dither
Enhancement of PWM, with dithering
2017-03-24 04:57:40 -05:00
Scott Lahteine
043be2856b Use "& 0x3F" instead of "% 64" 2017-03-24 04:13:50 -05:00
Stefan Brüns
6a040a6967 SOFT_PWM: Do not switch off heaters twice on pwm_count wraparound
After wraparound, pwm_count <= pwm_mask holds, thus soft_pwm_X <= pwm_count
guarantees soft_pwm_X < pwm_mask is true, and the heater will be switched
off in the first branch.
Do not evaluate the pwm conditions a second time, this reduces the
instruction count (4 instructions per PWM) and text size (6 byte).

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:50 -05:00
Stefan Brüns
0a74774af1 soft_pwm: avoid useless refetches of pwm_count
The compiler is not able to reuse the value of pwm_count, but reloads it
on every evaluation, if is stored in a static variable, as it cannot prove
it will be unchanged. A variable with local scope may not be modified from
the outside, so its value can be reused.
Doing so reduces text size and instruction count.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:50 -05:00
Stefan Brüns
35a55d5757 SOFT_PWM: Implement dithering if SOFT_PWM_SCALE is 1 or more
If dithering is enabled, the remainder of the soft_pwm_X duty value at
turnoff time is added to the next cycle. If e.g. the duty is set to 9 and
SCALE is set to 2, the PWM will be active for 8 counts for 3 cycles and
12 counts on each fourth cycle, i.e. the average is 9 cycles.

This compensates the resolution loss at higher scales and allows running
fans with SOFT_PWM with significantly reduced noise.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:36 -05:00
Stefan Brüns
2aed66a955 temperature: Fix SOFT_PWM off by one
A 128 step PWM has 127 intervals (0/127 ... 127/127 duty). Currently, a
PWM setting of 1/127 is active for 2/128, i.e. double the expected time,
or, in general n+1/128 instead of n/127.
Fixes issue#6003.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:36 -05:00
Scott Lahteine
4433b63d7a Merge pull request #6099 from thinkyhead/rc_cleanup_ubl_1
Patch till UBL is integrated with planner-based leveling
2017-03-24 02:07:55 -05:00
Scott Lahteine
b5711a99a2 Patches to bring UBL closer to compliance 2017-03-24 01:37:52 -05:00
Scott Lahteine
d076c1b604 Apply some general cleanup to code 2017-03-24 01:37:51 -05:00
Scott Lahteine
d1e6b0e21a Reduce STEP_PULSE_CYCLES code slightly 2017-03-24 00:50:05 -05:00
Scott Lahteine
783338a0b8 Add UBL_MESH_EDIT_ENABLED to configs 2017-03-24 00:44:55 -05:00
Scott Lahteine
8d54ffbf05 Adjust vector_3 code with const, some optimization 2017-03-23 19:41:42 -05:00
Roxy-3D
8ee2612ebb The hex nibble routine can print again!
The code to print a hex nibble got broke.   SERIAL_ECHO( (char) ) isn't
suitable for its use.
2017-03-23 16:08:37 -05:00
Roxy-3D
b8e4a6970b Get UBL up and running again
All the changes to get the code into compliance with Marlin coding
standards made UBL sick.   This pretty much gets UBL back up and
running.
2017-03-23 16:08:37 -05:00
Roxy-3D
5de1da2b3c Make UBL honor the #define ENABLE_LEVELING_FADE_HEIGHT option 2017-03-23 16:08:37 -05:00
Scott Lahteine
8f9face956 Merge pull request #6088 from rafaljot/patch-3
Update Marlin_main.cpp
2017-03-23 01:51:51 -05:00
Scott Lahteine
782634b6c9 Merge pull request #6081 from Sebastianv650/MIN_STEPPER_PULSE_for_Babystepping
Add MINIMUM_STEPPER_PULSE ability to babystepping
2017-03-22 21:57:36 -05:00
Scott Lahteine
d29ab8f2a6 Merge pull request #6075 from thinkyhead/rc_cleanup_ubl_1
Additional cleanup of UBL code
2017-03-22 21:45:59 -05:00
Scott Lahteine
af2ea23e9c EXTRUDER_RUNOUT_PREVENT uses buffer_line_kinematic 2017-03-22 20:51:12 -05:00
Scott Lahteine
cd882b88db #if defined => #ifdef / PIN_EXISTS 2017-03-22 20:51:11 -05:00
Scott Lahteine
e244399766 Additional cleanup of UBL code 2017-03-22 20:51:10 -05:00
Bob-the-Kuhn
0934563b97 G38 optional double touch
Made the double touch portion a conditional compile based on the
PROBE_DOUBLE_TOUCH flag.

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

Bugfix

The current G38 only stopped a move if it involved the Z axis.

Moved all the G38 code to it's own section and put it where it would
always be executed no matter what axis was moving or if the endstop was
enabled.

Also added a comment to configuration_adv to alert the user the double
tap had to be turned on.

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

Change G38 back to using Z_MIN_PROBE

There's no Z_MIN endstop if Z_DUAL_ENDSTOPS is enabled and you have them
set to the top of the gantry.

G38 started out as using the Z_MIN_PROBE pin.  I don't remember why we
changed it to the Z_MIN endstop.
2017-03-22 15:08:49 -05:00
Scott Lahteine
cc3204509c UBL patch from Bob-the-Kuhn 2017-03-22 07:54:20 -05:00
Scott Lahteine
100c9bc52d Merge pull request #6079 from thinkyhead/rc_audio_feedback
Standard audio feedback. Use for settings store/load/reset
2017-03-22 07:35:57 -05:00
Scott Lahteine
b904b5ae8d Audible feedback for settings store/load/reset 2017-03-22 02:15:21 -05:00
Sebastianv650
bf57eb2447 Protect Babystepping against other ISRs
Especialy against stepper ISR.
This is even more important when a minimum pulse width is set,
increasing the runtime of a babystep.
2017-03-21 18:05:44 +01:00
Sebastianv650
80830919dc Add MINIMUM_STEPPER_PULSE ability to babystepping 2017-03-21 17:50:38 +01:00
rafaljot
6da949bbf0 Update Marlin_main.cpp
Sometimes after killing heaters are still on.
2017-03-21 15:06:01 +01:00
Roxy-3D
72f7b14e66 Make G29's Interactive Mesh Editor Work 2017-03-20 12:52:51 -05:00
Roxy-3D
3fd74b121f Get G29's Interactive Mesh Editor running
G29 P4 R O  should work now.
2017-03-20 12:52:51 -05:00
Roxy-3D
1d58558bec Spelling fix 2017-03-20 12:52:51 -05:00
Scott Lahteine
2573f4dd05 Merge pull request #6052 from thinkyhead/rc_lift_on_pause
Add PARK_HEAD_ON_PAUSE feature / M125
2017-03-20 03:36:31 -05:00
Scott Lahteine
48c6284c91 Immediate commands take precedence 2017-03-19 21:50:48 -05:00
Scott Lahteine
786fe2ba2a Include PARK_HEAD_ON_PAUSE in Travis testing 2017-03-19 18:34:58 -05:00
Roxy-3D
b3c4f71c6f Merge pull request #6071 from Roxy-3D/RCBugFix
Allow FWRETRACT with UBL Enabled
2017-03-19 16:54:57 -05:00
Roxy-3D
76c270fdf2 Allow FWRETRACT with UBL Enabled
The retraction flag in UBL's G26 was conflicting with the FWRETRACT option.

All fixed!
2017-03-19 15:43:12 -06:00
Roxy-3D
06c31daa53 Merge pull request #6070 from Roxy-3D/RCBugFix
Allow G29 P1 R to generate the mesh
2017-03-19 16:34:48 -05:00
Roxy-3D
c377c59d47 Allow G29 P1 R to generate the mesh
Fix the logic change that happened when UBL got merged.
2017-03-19 15:13:33 -06:00
Scott Lahteine
ff0dd162b7 PARK_HEAD_ON_PAUSE implementation 2017-03-19 07:27:35 -05:00
Scott Lahteine
26473cab6d Add PARK_HEAD_ON_PAUSE feature 2017-03-19 05:06:55 -05:00
Scott Lahteine
4cf51157b3 Use XYZE rather than NUM_AXIS 2017-03-19 01:14:39 -05:00
Scott Lahteine
4c7f14752a Add disable_e_steppers function 2017-03-19 01:14:39 -05:00
Scott Lahteine
8eb29f91e6 Patch filament change options and beep code 2017-03-19 01:14:39 -05:00
Scott Lahteine
56c9dfc83b Merge pull request #6066 from thinkyhead/rc_felix_fix
Update Felix config for UBL
2017-03-19 01:11:02 -05:00
Scott Lahteine
9b2b53f63a Merge pull request #6042 from thinkyhead/rc_fix_toolchange_z
Move Z last in tool-change for SWITCHING_EXTRUDER
2017-03-19 00:34:41 -05:00
Scott Lahteine
f98fb6b38e Update Felix config for UBL 2017-03-19 00:28:48 -05:00
Scott Lahteine
7cabe81373 Merge pull request #6057 from thinkyhead/rc_followup_6054
Followup 6054 with some cleanup
2017-03-18 13:49:20 -05:00
Scott Lahteine
4bca27ab89 Fix Kelvin conversion
Thanks to @ospalh -- #6056
2017-03-18 13:23:08 -05:00
Scott Lahteine
143ab8f329 Remove Roxy's personal configurations 2017-03-18 12:35:02 -05:00
Scott Lahteine
2512871a36 Patch configs UBL followup 2017-03-18 12:32:03 -05:00
Scott Lahteine
27b5666e15 Move Allen Key probe definition to the top 2017-03-18 12:27:37 -05:00
Scott Lahteine
77cf648ed3 Move menu selection past static items in 1 screen 2017-03-18 12:26:21 -05:00
Scott Lahteine
2c630a1b5c Merge pull request #6054 from thinkyhead/rc_ubl_renewal
UBL for RCBugFix — cleanup, rebase, patch
2017-03-18 12:07:57 -05:00
Scott Lahteine
0492a3a8f1 Merge pull request #6027 from Bob-the-Kuhn/add_kill_info
Message for every KILL and STOP
2017-03-18 11:49:35 -05:00
Scott Lahteine
fba22652fc Add UBL testing to Travis 2017-03-18 11:35:21 -05:00
Scott Lahteine
6618346148 Patches to work around "register spill" compiler bug 2017-03-18 11:35:21 -05:00
Scott Lahteine
be7dd90382 Add Thermistor 75: MGB18 silicon pad 2017-03-18 11:35:20 -05:00
Scott Lahteine
f890ceba9e Add 'tags' to .gitignore 2017-03-18 11:35:20 -05:00
Scott Lahteine
b0a9c82c31 Fix single-char echo and pinMode usage 2017-03-18 11:35:20 -05:00
Scott Lahteine
fb60aa3736 UBL implementation 2017-03-18 11:35:20 -05:00
Scott Lahteine
238b8fd2a3 UBL core and support files 2017-03-18 11:35:19 -05:00
Scott Lahteine
cf94688925 Univeral Bed Leveling - configuration 2017-03-18 11:35:19 -05:00
Scott Lahteine
03aa424ccb Merge pull request #6053 from thinkyhead/rc_clean
Remove extraneous whitespace
2017-03-18 03:26:45 -05:00
Scott Lahteine
af644871bf Merge pull request #6045 from thinkyhead/rc_remove_raw_kinematics
Remove delta optimization concepts… for now
2017-03-18 03:26:24 -05:00
Scott Lahteine
77491dd924 Remove extraneous whitespace 2017-03-18 03:17:39 -05:00
Scott Lahteine
ed4f9d7e1c Merge pull request #6046 from robbycandra/RCBugFix-ignore_visual_studio_files
Ignore Visual Studio Files
2017-03-17 22:25:01 -05:00
Scott Lahteine
d15f25539b Merge pull request #6031 from thinkyhead/rc_mbl_z_unhack
MBL: Disable sw endstops instead of altering Z
2017-03-17 17:20:35 -05:00
Robby Candra
0dada36e5a Ignore Visual Studio Files 2017-03-17 22:13:46 +07:00
Scott Lahteine
b865b21d32 Can't use Z fade height with DELTA 2017-03-17 08:34:47 -05:00
Scott Lahteine
1e57b0c269 Remove delta interpolation concept 2017-03-17 06:32:11 -05:00
Scott Lahteine
e46898f8e5 Remove kinematic optimizations 2017-03-17 06:30:22 -05:00
Scott Lahteine
11f1fdfab4 _lcd_level_bed_position => manual_probe_index 2017-03-17 06:05:17 -05:00
Scott Lahteine
0e410c9dfd Software endstop options as simple switches 2017-03-17 06:05:17 -05:00
Scott Lahteine
d01b915085 Implement soft_endstops_enabled for clamping 2017-03-17 06:05:17 -05:00
Scott Lahteine
e4649c9044 Add HAS_SOFTWARE_ENDSTOPS macro 2017-03-17 06:05:17 -05:00
Scott Lahteine
3e927ff204 Replace MBL Z hacking 2017-03-17 06:05:17 -05:00
Scott Lahteine
4e53124681 Merge pull request #6039 from Bob-the-Kuhn/M114-sync-with-stepper
M114 - wait for move completion before reporting position
2017-03-17 05:22:46 -05:00
Scott Lahteine
734f9ea133 Merge pull request #6040 from thinkyhead/rc_sanity_use_assert
Simplify some sanity checks with static_assert
2017-03-17 05:22:17 -05:00
Scott Lahteine
f02af83d42 Remove some extraneous spaces 2017-03-16 23:59:11 -05:00
Scott Lahteine
672e45652e Improved solution to tool-change bug 2017-03-16 23:59:10 -05:00
Scott Lahteine
23f1cfb46f Fix stuck CHDK pin as suggested in #6041 2017-03-16 21:49:39 -05:00
Scott Lahteine
0b22069e82 Merge pull request #6021 from Bob-the-Kuhn/BUG-FIX--Switching-extruder-tool-change-Z-height
Bug Fix: Switching extruder tool change leaves Z in wrong position
2017-03-16 21:15:20 -05:00
Scott Lahteine
e7e4500629 Simplify some sanity checks with static_assert 2017-03-16 16:31:34 -05:00
Bob-the-Kuhn
34ff0c3439 M114 - wait for move completion before reporting position 2017-03-16 15:10:45 -05:00
Bob-the-Kuhn
b31604a492 Message for every KILL and STOP
No more mystery halts & resets

Moved messages to language.h

Added current command to inactive timeout message
2017-03-15 21:05:11 -05:00
Roxy-3D
48925b7298 Merge pull request #6032 from Kaibob2/patch-7
Update language_de.h
2017-03-15 10:31:09 -05:00
Kai
13b44d019b Update language_de.h
Addition of missing strings to match language_en.h
2017-03-15 16:06:52 +01:00
Bob-the-Kuhn
685ed5393a Bug Fix: Switching extruder tool change leaves Z in wrong position
The tool_change function saves the current_position to the destination
array soon after starting.  Later in the switching extruder section, the
destination array is modified when moving the Z axis up & down.  A later
section of tool_change moves the head back to the “original location”
using the destination array.  This later section assumes that the
destination array hasn’t been modified.

The fix is to save the destination Z position and then restore it after
the Z movements have completed.

Going back to using the current_position array for the switching
extruder Z axis moves (and  leaving the destination array untouched)
doesn’t fix the problem.

This bug was introduced by the “Make tool_change kinematic compatible”
commit # 847429eff4 which was merged on 10
Oct 2016 as part of PR 4982.

This bug was discovered in Issue 5966.
2017-03-14 02:36:24 -05:00
Scott Lahteine
51353f8fea Merge pull request #6000 from trivalik/NoWorkspaceWarning
prevent warning with define of NO_WORKSPACE_OFFSETS
2017-03-12 00:00:51 -06:00
Scott Lahteine
54dada56a7 Merge pull request #6010 from MagoKimbra/rc_fix_bug_set_position_mm
Fix BUG set_position_mm
2017-03-12 00:00:16 -06:00
MagoKimbra
a4a9bd8bc9 Fix BUG set_position_mm
Set postion must have axis and not E_AXIS + active_extruder.
2017-03-11 14:13:39 +01:00
Trivalik
71ac6f9d42 prevent warning with define of NO_WORKSPACE_OFFSETS 2017-03-09 23:49:57 +01:00
Stefan Brüns
9ba6c051a1 Makefile: add nozzle.cpp too CXXSRC list
The file is required by the optional NOZZLE_PARK_FEATURE.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-09 03:08:49 +01:00
Stefan Brüns
9cc8d495b8 Makefile: remove no longer existing search paths
ArduinoAddons has been removed from Marlin, remove any references to it.
Replace HARDWARE_SRC and HARDWARE_DIR with its expanded equivalents.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-09 01:46:47 +01:00
Stefan Brüns
bf563e62c1 Makefile: add printcounter.cpp too CXXSRC list
The file is required by the optional PRINTCOUNTER feature.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-09 01:45:54 +01:00
Stefan Brüns
ddecc1441d Makefile: Fix linker error
Instantiation of the static singleton instance thermalManager in general
requires locking, but we know its safe to do without.

Add -fno-threadsafe-statics to avoid using locking primitives, which
result in linking errors:
	undefined reference to `__cxa_guard_acquire'
	undefined reference to `__cxa_guard_release'

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-09 01:45:38 +01:00
MagoKimbra
37a26dfc09 Fix delta_angles 2017-03-08 09:23:30 +01:00
Scott Lahteine
6caf0830ae Merge pull request #5985 from thinkyhead/rc_better_endstops_init
Use SET_INPUT_PULLUP where appropriate
2017-03-08 00:08:30 -06:00
Scott Lahteine
2defb1d748 Use SET_INPUT_PULLUP where appropriate 2017-03-07 23:43:33 -06:00
Scott Lahteine
deb9d0dabd Merge pull request #5984 from thinkyhead/rc_delta_angles
Add delta_tower_angle_trim
2017-03-07 19:41:24 -06:00
Scott Lahteine
58b3e98878 Use arrays for delta tower parameters 2017-03-07 19:00:22 -06:00
Scott Lahteine
47242a40bb Apply updated changes for delta_tower_angle_trim 2017-03-07 18:15:11 -06:00
Jimmy Envall
00b6b3da79 Added support for delta tower angle corrections. 2017-03-07 16:35:58 -06:00
Scott Lahteine
7c9e2e2a1a Merge pull request #5981 from thinkyhead/rc_tmc2130_redo
TMC2130 Library: @teemuatlut replaces @makertum
2017-03-07 16:23:52 -06:00
Scott Lahteine
5a456c832a Apply TMC2130 to example configurations 2017-03-07 04:22:06 -06:00
Scott Lahteine
45f949d833 TMC2130 Library: @teemuatlut replaces @makertum 2017-03-07 04:22:06 -06:00
Scott Lahteine
33f8a8a344 Merge pull request #5973 from thinkyhead/rc_circle_pattern
Add circle pattern to nozzle clean
2017-03-06 04:47:01 -06:00
Scott Lahteine
94b3e0a483 Merge pull request #5959 from benlye/benlye-fixm48
Remove extra carriage return in M48 V1 output
2017-03-06 04:24:28 -06:00
Scott Lahteine
a9a1971295 Merge pull request #5972 from thinkyhead/rc_cooldown_before
Fix preheat menu formatting
2017-03-06 03:21:29 -06:00
Scott Lahteine
6aa81255a9 Patch and clean up "flsun" kossel. Followup to #5911. 2017-03-06 03:15:00 -06:00
Scott Lahteine
b2270b3f3e Apply prior nozzle clean update 2017-03-06 03:14:59 -06:00
Marek Pikuła
7698c5617a Added circle nozzle cleaning parameters to example configurations 2017-03-06 03:04:58 -06:00
Marek Pikuła
6836b94eea Added circle pattern for nozzle cleaning feature 2017-03-06 03:03:00 -06:00
Scott Lahteine
3b75518ef6 Merge pull request #5911 from aphex3k/flsun_kossel_mini
Configuration.h and Configuration_adv.h for the kossel mini by flsun
2017-03-06 02:26:01 -06:00
Scott Lahteine
3830778852 Apply NO_WORKSPACE_OFFSETS to lcd menu 2017-03-06 02:21:42 -06:00
Scott Lahteine
7e3aab889d Fix preheat menu formatting 2017-03-06 02:07:07 -06:00
Scott Lahteine
fea0d3f20f Endstop and temp-isr general cleanup 2017-03-06 02:07:07 -06:00
Scott Lahteine
aef08e8780 Compact some macro substitutions 2017-03-06 02:07:07 -06:00
Scott Lahteine
2f620f86d9 Merge pull request #5970 from thinkyhead/rc_cooldown_before
Preheat Hotend Only menu items
2017-03-06 01:56:05 -06:00
Scott Lahteine
02de8e6f18 Merge pull request #5957 from MagoKimbra/rc_stepper_indirection_fix
Stepper indirection fix tmc driver
2017-03-06 01:16:40 -06:00
Scott Lahteine
6c5312559c Menu item to preheat only the hotend 2017-03-06 01:14:54 -06:00
Scott Lahteine
9d0142e8ae Move Change Filament above Cooldown 2017-03-06 01:13:12 -06:00
Scott Lahteine
0c55095c5e Move Cooldown above Preheat 2017-03-06 01:13:12 -06:00
Scott Lahteine
c15c65f18a Merge pull request #5971 from thinkyhead/rc_fix_e_factors
Patch DISTINCT_E_FACTORS bug
2017-03-06 01:11:17 -06:00
Scott Lahteine
bfb0007573 Patch DISTINCT_E_FACTORS bug 2017-03-05 23:19:31 -06:00
Scott Lahteine
be98016674 Merge pull request #5963 from thinkyhead/rc_no_offsets_optim
New option: NO_WORKSPACE_OFFSETS
2017-03-05 21:46:49 -06:00
Scott Lahteine
8e89a802f7 Document PROTOCOL_VERSION 2017-03-05 04:43:46 -06:00
Scott Lahteine
87b03b16bd Use a macro for array copies 2017-03-05 04:43:46 -06:00
Scott Lahteine
e141f3a03f Optimize coordinate transformation
Pre-compute the combined position shift and home offset to save a
single float fetch-and-add per conversion. Great for delta/scara and
bed leveling.
2017-03-05 04:43:16 -06:00
Scott Lahteine
5f7e85398b Implement NO_WORKSPACE_OFFSETS 2017-03-05 04:43:15 -06:00
Scott Lahteine
05abe853f9 New option: NO_WORKSPACE_OFFSETS 2017-03-05 04:43:15 -06:00
Scott Lahteine
20addc6e32 Merge pull request #5955 from thinkyhead/rc_eeprom_fail_better
Display a message for EEPROM version mismatch
2017-03-04 17:15:07 -06:00
benlye
dead89062a Update Marlin_main.cpp
Remove unnecessary line break from M48 V1 output.
2017-03-04 17:58:10 +00:00
MagoKimbra
ae277aebc6 Stepper indirection fix tmc driver 2017-03-04 12:17:39 +01:00
Scott Lahteine
8f4e4b1995 Display a message for EEPROM version mismatch 2017-03-04 01:20:36 -06:00
Scott Lahteine
177ad245f6 Merge pull request #5953 from thinkyhead/fix_fc_e_index
Fix submenu hotend status display
2017-03-04 00:12:29 -06:00
Scott Lahteine
cea3ea772c Fix submenu hotend status display 2017-03-03 22:12:22 -06:00
Scott Lahteine
b27f69ba51 Merge pull request #5813 from thinkyhead/rc_fix_makrpanel
Fix MAKRPANEL assignments
2017-03-03 21:40:49 -06:00
Scott Lahteine
1ef6ccd919 Merge pull request #5951 from thinkyhead/rc_print_2d_array
Reduce code size (40b, or 166b with bilinear subdivision)
2017-03-03 21:27:44 -06:00
Scott Lahteine
b9b203bfb2 Merge pull request #5950 from thinkyhead/rc_cleanup_mar3
General cleanup, const usage, var naming
2017-03-03 21:25:34 -06:00
Scott Lahteine
53f5086905 Fix MAKRPANEL assignments
MAKRPANEL is a DOGLCD+ULTRA_LCD+NEWPANEL so customize its pins within
that block.
2017-03-03 21:22:21 -06:00
Scott Lahteine
98c7b682ca General cleanup, const usage, var naming 2017-03-03 20:57:49 -06:00
jes
369bfc8a1e Reduce code size (40b, or 166b with bilinear subdivision) 2017-03-03 20:36:32 -06:00
Scott Lahteine
21fb347eee Merge pull request #5948 from thinkyhead/rc_fix_status_printf
Fix "Heating..." message
2017-03-03 12:28:27 -06:00
Scott Lahteine
0d13412105 Fix "Heating..." message 2017-03-03 12:12:51 -06:00
Scott Lahteine
5065636023 Merge pull request #5934 from thinkyhead/rc_advance_ed_ratio
LIN_ADVANCE: Fixed E/D ratio option
2017-03-03 03:24:41 -06:00
Scott Lahteine
903808bb97 Merge pull request #5943 from thinkyhead/catalan_march_2017
Update Catalan language
2017-03-03 03:13:51 -06:00
divendres
75ad82baab Update Catalan language 2017-03-02 20:40:06 -06:00
Scott Lahteine
34253497d4 Babysteps code tweak
As suggested by https://github.com/MarlinFirmware/Marlin/pull/5887#issuecomment-283832163
2017-03-02 20:35:45 -06:00
Scott Lahteine
e309e980ce Merge pull request #5942 from thinkyhead/rc_cleanup_finish_5887
Clean up and finish #5887
2017-03-02 20:26:13 -06:00
Scott Lahteine
fb4aead2b1 Clean up and finish #5887 2017-03-02 20:16:29 -06:00
Scott Lahteine
b3e2bd6f29 Reduce E_D_ratio code 2017-03-02 01:00:37 -06:00
Sebastianv650
de6c40ed8f Add option to fix E/D ratio
Work around for slicers producing buggy gcode.
2017-03-02 01:00:37 -06:00
Scott Lahteine
eeb490221f Remove BEEPER_PIN override in pins_RIGIDBOARD.h
Resolves #5926. This override is no longer needed since the RAMPS LCD controller pins were fixed.
2017-03-01 18:26:29 -06:00
Roxy-3D
11e892bd84 Merge pull request #5887 from Roxy-3D/RCBugFix
Double Click of Encoder Wheel Jumps to Z-BabyStepping
2017-03-01 17:15:02 -07:00
Scott Lahteine
cbeff12f8a Merge pull request #5933 from teemuatlut/lcd_days_hours
Fix formatting of SD print time hours above one day
2017-03-01 15:44:10 -06:00
Scott Lahteine
8a4e9d08a3 Merge pull request #5931 from thinkyhead/rc_core_endstop_fix
Fix CoreYX / YZ / ZX endstop logic
2017-03-01 15:32:11 -06:00
teemuatlut
9175d16660 Fix formatting of print time hours above one day 2017-03-01 18:55:25 +02:00
Scott Lahteine
b6d9eb229f Extend Core endstop commentary 2017-03-01 10:01:50 -06:00
Bob-the-Kuhn
c5e08e8761 CoreYX/YZ/ZX needs different endstop logic than CoreXY/YZ/XZ
In the endstop testing section, add the "reverse" logic in addition to "normal" core handling.

In CoreXY/YZ/XZ steppers rotating the same direction gives X movement. Opposing directions produces Y movement.

In CoreYX/ZY/ZX this is reversed. Same = Y, Opposite = X.

----

Fixes the issue where the Y endstop was being checked when moving in the X direction, etc.
2017-03-01 09:40:24 -06:00
Scott Lahteine
05b217c0d0 Merge pull request #5930 from thinkyhead/rc_lcd_timeout_config
Make LCD_TIMEOUT_TO_STATUS configurable
2017-02-28 19:42:27 -06:00
Scott Lahteine
c759c26cca Make LCD_TIMEOUT_TO_STATUS configurable
As suggested in
https://github.com/MarlinFirmware/Marlin/issues/5570#issuecomment-283059
065
2017-02-28 19:02:50 -06:00
Michael Henke
47729918fc enable ENSURE_SMOOTH_MOVES 2017-02-27 20:42:49 -08:00
Michael Henke
330b981912 created Configuration.h and Configuration_adv.h for the kossel mini sold by flsun 2017-02-25 21:31:37 -08:00
Scott Lahteine
493e738575 Merge pull request #5910 from thinkyhead/rc_more_nozzle_wipe
Bidirectional Zig-Zag Nozzle Wipe
2017-02-25 22:03:33 -06:00
Colin Gilgenbach
48b7e0f8d8 Nozzle Wipe Vertical Zig-Zag
- Add configuration support for zigzags in either the X or Y axis, for
wipe pads significantly longer in one dimension.
- Add configuration for default number of zig-zag triangles, vs. a
magic number in `Marlin_main.cpp`.
- Update description of auto nozzle wiping to match functionality
2017-02-25 21:52:43 -06:00
Scott Lahteine
f17b81b765 Add MAPPER_C2C3 to French language 2017-02-25 18:49:00 -06:00
Roxy-3D
7e607b06eb Better comments on DOUBLE_CLICK_TIME_WINDOW 2017-02-23 13:13:57 -07:00
Scott Lahteine
f9e4717f5b Merge pull request #5892 from thinkyhead/rc_msg_heating_pstr
Use PSTR for MSG_HEATING
2017-02-22 12:26:08 -06:00
Scott Lahteine
34cba42104 Use PSTR for MSG_HEATING 2017-02-22 11:30:19 -06:00
Roxy-3D
584d147a02 fixup the indentation 2017-02-22 07:23:54 -07:00
Roxy-3D
e443e0e2a9 Fix scoping issues for double click to Z-Babystepping 2017-02-21 18:15:28 -07:00
Roxy-3D
17d1cd7c09 Double Click of Encoder Wheel Jumps to Z-BabyStepping 2017-02-21 18:08:19 -07:00
Roxy-3D
48d862377a Double Click of Encoder Wheel Jumps to Z-BabyStepping 2017-02-21 18:04:31 -07:00
Scott Lahteine
cfdc189796 Merge pull request #5856 from thinkyhead/rc_fix_bad_comment
Remove non-applicable comment on MANUAL_Z_HOME_POS
2017-02-20 17:54:30 -06:00
Scott Lahteine
2efdc72aa5 Merge pull request #5876 from thinkyhead/rc_hotend_status
Add status_printf to print messages to the lcd status line.
2017-02-20 17:29:27 -06:00
dot-bob
cd68380ce6 Add status_printf to print messages to the lcd status line.
Also add a hotend indicator to the heating message displayed on the lcd status line.
2017-02-20 15:26:54 -06:00
Scott Lahteine
012aff6823 Merge pull request #5862 from thinkyhead/rc_fix_a_thing
Finish reducing of ABL_BILINEAR_SUBDIVISION
2017-02-18 21:36:28 -06:00
Scott Lahteine
b9187020c4 Finish reducing of ABL_BILINEAR_SUBDIVISION 2017-02-18 20:01:19 -06:00
Scott Lahteine
e282b72151 Remove non-applicable comment on MANUAL_Z_HOME_POS 2017-02-18 05:14:43 -06:00
Scott Lahteine
49d562d23d Merge pull request #5855 from thinkyhead/rc_followup_5840
Apply DISTINCT_E_FACTORS to sync_from_steppers
2017-02-18 04:51:01 -06:00
Scott Lahteine
57f92a4632 Apply DISTINCT_E_FACTORS to sync_from_steppers
Followup to #5840
2017-02-18 04:36:41 -06:00
Scott Lahteine
4da8b1494b Merge pull request #5854 from thinkyhead/rc_fixup_m600
M600 cleanup and bugfix
2017-02-18 04:27:13 -06:00
Scott Lahteine
dd02dba6e6 Merge pull request #5840 from MagoKimbra/rc_fix_lin_advanced_step_to_mm
Fix steps_to_mm for active extruders
2017-02-18 04:25:53 -06:00
Scott Lahteine
6e0b3fcc08 Optimize M600 heater status LCD items 2017-02-18 04:08:00 -06:00
Scott Lahteine
44b4e116bd Commentary / style in gcode_M600 2017-02-18 04:08:00 -06:00
Scott Lahteine
561904345f Tweak config ordering for M600 2017-02-18 00:01:31 -06:00
Scott Lahteine
7fdc620ef7 Merge pull request #5850 from thinkyhead/drop_some_comments
Remove some old code comments
2017-02-17 16:45:44 -06:00
Scott Lahteine
284d6de9da Remove some old code comments 2017-02-17 15:25:56 -06:00
MagoKimbra
3685224c1a Fix steps_to_mm for active extruders 2017-02-15 21:45:39 +01:00
Scott Lahteine
babe1d211c Merge pull request #5794 from thinkyhead/rc_m600_improve
M600 wait for heatup, prevent stepper timeout, etc.
2017-02-15 05:38:06 -06:00
Scott Lahteine
4578c573fe Pause the print job timer while in M600 2017-02-15 05:29:34 -06:00
Scott Lahteine
bfe6f71794 Simplify filament_change_beep function 2017-02-15 05:29:34 -06:00
Scott Lahteine
8289ea1316 Use a short name for the filament "endstop" 2017-02-15 05:29:34 -06:00
Scott Lahteine
d9dcef8a87 Spacing, coding standards 2017-02-15 05:29:34 -06:00
Scott Lahteine
931914e679 Apply M600 updates to all configs 2017-02-15 05:29:34 -06:00
Roxy-3D
8bf0b496b9 Improve M600 with timeout, wait for heatup. 2017-02-15 05:29:34 -06:00
Scott Lahteine
58b8e0cae7 Merge pull request #5837 from thinkyhead/rc_fix_mbl_homing
Fix broken homing in MBL
2017-02-15 04:48:30 -06:00
Tannoo
c40fe2113c Fix for broken MBL
LCD call was waiting forever, causing the system to hang.
2017-02-15 04:39:22 -06:00
Scott Lahteine
4d4745c0eb Parenthesize some menu defines for safety 2017-02-14 23:12:27 -06:00
Scott Lahteine
20ef0a6e27 Merge pull request #3152 from thinkyhead/sd_alpha_sort
SD files alphabetical sort in LCD menus
2017-02-14 21:48:57 -06:00
Scott Lahteine
47f9883b0f Dynamic allocation for SDCARD_SORT_ALPHA 2017-02-14 21:37:25 -06:00
Scott Lahteine
a561bd5e3a New feature: SDCARD_SORT_ALPHA 2017-02-14 21:37:24 -06:00
Scott Lahteine
c04d6b5aa6 Merge pull request #5829 from thinkyhead/rc_fix_isr_reentry
Combine fixes for LIN_ADVANCE and temperature ISR
2017-02-14 20:36:58 -06:00
Scott Lahteine
467f01435f Merge pull request #5816 from thinkyhead/rc_abl_virt_reduce
Reduce memory use by ABL_BILINEAR_SUBDIVISION slightly
2017-02-14 08:41:44 -06:00
Scott Lahteine
97b6fb6381 Reduce / optimize LIN_ADVANCE code 2017-02-14 07:52:03 -06:00
Sebastianv650
271ced7341 Prevent re-entering of temperature ISR
If Marlin is inside the temperature ISR, the stepper ISR is enabled. If
a stepper event is now happening Marlin will proceed with the stepper
ISR. Now, at the end of the stepper ISR, the temperatre ISR gets enabled
again. While Marlin proceed the rest of the temperature ISR, it's now
vulnerable to a second ISR call.
2017-02-14 07:52:03 -06:00
Sebastianv650
1b59766fcb Cleanup position_float
Hopefully fixes Marlin #5481
2017-02-12 13:09:06 +01:00
Scott Lahteine
a950c31e2d Merge pull request #5815 from thinkyhead/rc_pulses_per_step
Give encoder pulse/steps conditionals their own block
2017-02-12 04:14:00 -06:00
Scott Lahteine
7176de8605 Merge pull request #5814 from thinkyhead/hotend_loop_always
Make HOTEND_LOOP more consistent, let compiler optimize it
2017-02-12 04:13:14 -06:00
Scott Lahteine
adec219ca5 Merge pull request #5811 from thinkyhead/fix_two_strings
No space after X: or A: in M114 output
2017-02-12 04:11:51 -06:00
jes
eaa829b58c Reduce memory use by ABL_BILINEAR_SUBDIVISION slightly 2017-02-12 04:09:48 -06:00
Scott Lahteine
1c99ca82d8 Give encoder pulse/steps conditionals their own block 2017-02-12 03:57:57 -06:00
Scott Lahteine
e44294bb4d Make HOTEND_LOOP more consistent, let compiler optimize it 2017-02-12 02:50:38 -06:00
Scott Lahteine
701f4a6d9d Merge pull request #5729 from Bob-the-Kuhn/guaranteed-BLTouch-detection
guaranteed BLTouch detection
2017-02-12 01:13:35 -06:00
Scott Lahteine
c15b9a6a06 No space after X: or A: in M114 output 2017-02-12 00:10:03 -06:00
Scott Lahteine
e1702816f6 Fix SD_CHECK_AND_RETRY condition
Addressing #5806
2017-02-11 23:55:56 -06:00
Scott Lahteine
c64ecf95e2 Merge pull request #5808 from thinkyhead/rc_delta_float_radius
Cast DELTA_PRINTABLE_RADIUS to float in sq()
2017-02-11 23:43:46 -06:00
Scott Lahteine
1bc5be3bdf Cast DELTA_PRINTABLE_RADIUS to float in sq()
Addressing #5625
2017-02-11 23:28:39 -06:00
Bob-the-Kuhn
0369f97ec1 guaranteed BLTouch detection
To guarantee that the 5mS pulse from a BLTouch is recognized you need to
have the endstops.update() routine run twice in that 5mS period.

At 200 steps per mm, my system has problems  below a feedrate of 120 mm
per minute.

Two things were done to guarantee the two updates within 5mS:
1) In interrupt mode, a check was added to the temperature ISR.  If the
endstop interrupt flag/counter is active then it'll kick off the endstop
update routine every 1mS until the flag/counter is zero.  This
flag/counter is decremented by the temperature ISR AND by the stepper
ISR.

2) In poling mode, code was added to the stepper ISR that will make sure
the ISR runs about every 1.5mS.  The "extra" ISR runs only check the
endstops.  This was done by grabbing the intended ISR delay and, if it's
over 2.0mS, splitting the intended delay into multiple smaller delays.
The first delay can be up to 2.0mS, the next ones 1.5mS (as needed) and
the last no less than 0.5mS.

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

BLTouch error state recovery

If BLTouch already active when deploying the probe then try to reset it
& clear the probe.

If that doesn't fix it then declare an error.

Also added BLTouch init routine to startup section
2017-02-11 12:01:34 -06:00
Scott Lahteine
1e4d4e5915 Fix typo in language_uk
Thanks to @pavlus for this one
2017-02-10 15:34:31 -06:00
Scott Lahteine
7fe7a0c8be Merge pull request #5793 from thinkyhead/rc_adjust_probe_output
Adjust probe_pt() terminal output to respect probe z-offset
2017-02-09 23:05:02 -06:00
Scott Lahteine
633c253bc1 Merge pull request #5792 from thinkyhead/rc_default_dac_vals
Default DAC values for RigidBoard V2
2017-02-09 22:56:03 -06:00
Florian Heilmann
7bbc31704c Adjust probe_pt() terminal output to respect probe z-offset 2017-02-09 22:54:22 -06:00
Scott Lahteine
6dac1fe07e Merge pull request #5701 from tohara/RCBugFixCmake
Updated CMakeLists
2017-02-09 22:45:05 -06:00
Scott Lahteine
a245656db3 Merge pull request #5713 from gege2b/RCBF-French
French translation : Added missing strings as well as missing accents
2017-02-09 22:43:56 -06:00
jaysonkelly
713931338a Default DAC values for RigidBoard V2 2017-02-09 22:39:00 -06:00
Scott Lahteine
fb11e52cd2 Merge pull request #5787 from thinkyhead/rc_bob_pins_added
pinsDebug for 644/1284 & USB646/1286 families
2017-02-09 15:07:55 -06:00
Bob-the-Kuhn
ae706233a8 pinsDebug for 644/1284 & USB646/1286 families
added conditional compilation for PWMs 1C & 3C

add Teensyduino compatibility

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

changes per review - minor formatting changes

1) remove non-printable character at the end of line 687

2) split a really long comment into two lines

3) got rid of some trailing spaces

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

Made pinsDebug_Teensyduino.h the same between this PR and PR 5668 which
is for a re-written pinsDebug.h file.

The changes were:
1) added copyright @ GNU license header
2) a blank line crept in.
2017-02-09 07:24:02 -06:00
Gege2B
22dfcc9a71 French translation : Added missing strings as well as missing accents 2017-01-17 23:29:23 +01:00
Tom Haraldseid
1d65b4b316 Updated CMakeLists 2017-01-15 13:39:26 +08:00
Scott Lahteine
9b5515926a Merge pull request #5696 from thinkyhead/rc_volumetric_default
Allow enabling volumetric filament on config load
2017-01-14 05:48:51 -08:00
Robert Kirk
0d147ead66 Allow enabling volumetric filament on config load 2017-01-14 04:37:49 -08:00
Scott Lahteine
d3cb1a86be Merge pull request #5691 from AnHardt/fix5677
Fix M110 without leading N
2017-01-14 03:22:26 -08:00
AnHardt
fa26767efe Replace all remaining 'boolean' with 'bool' 2017-01-13 13:03:52 +01:00
AnHardt
f6858d9974 Fix M110 without leading N
Store N in the right variable.
This is too rarely used.

"mea culpa, mea culpa, mea maxima culpa"
2017-01-13 12:33:50 +01:00
Scott Lahteine
0c0c840ba8 Merge pull request #5683 from emartinez167/EMartinez-Changes
Updates to some incorrectly ended strings in the Spanish translation
2017-01-12 07:49:15 -08:00
Scott Lahteine
738b87091a Merge pull request #5684 from Kaibob2/patch-6
Update language_de.h
2017-01-12 07:48:41 -08:00
Kai
25dae3bccc Update language_de.h
Small corrections
2017-01-12 16:06:58 +01:00
emartinez167
7292145f4e Fix for some wrong strings
On last commit, some strings were ended with the incorrect character.
This fixes it.
2017-01-12 22:35:04 +08:00
emartinez167
3dee35888e Merge remote-tracking branch 'MarlinFirmware/RCBugFix' into EMartinez-Changes 2017-01-12 22:22:52 +08:00
Scott Lahteine
93a9aa6b76 Merge pull request #5682 from thinkyhead/rc_spanish_jan
Updates to Spanish language
2017-01-12 06:14:10 -08:00
Scott Lahteine
7a9c1a279b Merge pull request #5681 from thinkyhead/rc_prevent_boot_loop
Reset watchdog in SD init to prevent reboot
2017-01-12 06:13:56 -08:00
Scott Lahteine
e409c7f9e8 Merge pull request #5645 from esenapaj/From-microseconds-to-milliseconds
From "microseconds" to "milliseconds"
2017-01-12 06:02:55 -08:00
emartinez167
020c6af7b0 Updates to Spanish language
Add missing Spanish language definitions.
2017-01-12 05:53:39 -08:00
Hans Raaf
d29cc8f7bc Reset watchdog in SD init to prevent reboot
If the watchdog is enabled and bootscreen + SD card checks take too long, Marlin may hang at boot time because of the reset loop. We have this happen all the time with the Anet board if no SD card is inserted.
2017-01-12 05:33:38 -08:00
Scott Lahteine
7743849608 Merge pull request #5680 from thinkyhead/rc_configs_puhlease
code_value_float tweak
2017-01-12 05:22:47 -08:00
Scott Lahteine
16357fbfdf Merge pull request #5619 from Ocarthon/RCBugFix
Disable SD Detect for K8400
2017-01-12 05:22:03 -08:00
Scott Lahteine
e57c0fce66 Move MOSFET changes above #include for RIGIDBOARD
Correction to #5629
2017-01-12 04:46:49 -08:00
Scott Lahteine
c376f6a2cb code_value_float tweak 2017-01-12 04:38:09 -08:00
Scott Lahteine
fb3c30e24c Fix lcd_wait_for_homing causing menu to block
As a showcase function for how to do waiting in the lcd menu, this function should be preserved.
2017-01-12 04:37:23 -08:00
Scott Lahteine
f8ae0fd29f Merge pull request #5647 from manianac/RCBugFix-PrepareMenuFix
Fix empty Prepare menu
2017-01-12 04:20:18 -08:00
Robert Kirk
aab5118c6a Remove error causing break command
Use index macro instead of e
2017-01-01 17:47:01 -05:00
esenapaj
d38e335272 From "microseconds" to "milliseconds"
delay() is milliseconds
2017-01-02 01:19:33 +09:00
Scott Lahteine
34d5eb5201 Merge pull request #5589 from thinkyhead/rc_configs_puhlease
Better sanity check for FILAMENT_CHANGE_FEATURE, FILAMENT_RUNOUT_SCRIPT
2016-12-30 04:56:30 -08:00
emartinez167
a2fe24f319 Fix some errors and update a message 2016-12-29 23:34:42 +08:00
Philip Standt
8ae2bc7e2e Disable SD Detect for K8400 2016-12-28 23:21:18 +01:00
emartinez167
0844da794d Updates to Spanish language
Add missing Spanish language definitions.
2016-12-24 22:11:14 +08:00
Scott Lahteine
4061fca1ad Sanity checks for FILAMENT_CHANGE_FEATURE and FILAMENT_RUNOUT_SCRIPT 2016-12-23 19:55:12 -08:00
Scott Lahteine
5ab7b91615 Comment on filament runout sensor config 2016-12-23 19:50:27 -08:00
Scott Lahteine
922c67f17d Merge pull request #5588 from thinkyhead/rc_remove_biv25
Drop biv2.5 delta configurations
2016-12-23 19:14:50 -08:00
Scott Lahteine
78459d5de1 Merge pull request #5587 from thinkyhead/rc_never
Define ADV_NEVER, ADV_RATE
2016-12-23 19:00:57 -08:00
Scott Lahteine
8c6c048551 drop biv2.5 delta configurations 2016-12-23 18:56:07 -08:00
Scott Lahteine
92dbeebf40 Define ADV_NEVER, ADV_RATE 2016-12-23 18:43:23 -08:00
Scott Lahteine
71378f72af Merge pull request #5577 from manianac/RCBugFix-M600Dryrun
Allow M600 when dryrun debugging
2016-12-22 19:07:05 -08:00
Robert Kirk
306c184b1a Allow M600 when dryrun debugging 2016-12-21 20:30:51 -05:00
Scott Lahteine
fe2ea2906f Merge pull request #5573 from thinkyhead/rc_unify_stepper_isr
LIN_ADVANCE with unified stepper ISR
2016-12-21 02:53:32 -08:00
Sebastianv650
84c685f8b5 First draft of Unified Stepper / E Advance ISR 2016-12-21 01:34:39 -08:00
Scott Lahteine
83021d82c6 Merge pull request #5502 from AnHardt/symbol-strings
Add symbol-strings
2016-12-21 00:51:59 -08:00
Scott Lahteine
036eccfd6e Merge pull request #5572 from Kaibob2/patch-5
Update language_de.h
2016-12-21 00:50:40 -08:00
Scott Lahteine
b794b76836 Merge pull request #5567 from AnHardt/fix5194
Fix 5194
2016-12-21 00:49:52 -08:00
Scott Lahteine
451ba5df01 Merge pull request #5516 from esenapaj/Suppress-warning
Suppress warning
2016-12-21 00:00:35 -08:00
Scott Lahteine
92dbc63949 Merge pull request #5571 from esenapaj/Update-Japanese-translation
Update Japanese translation
2016-12-20 23:59:55 -08:00
Kai
ade72535c4 Update language_de.h
Added tarnslation for
```
#define MSG_DEBUG_MENU 
#define MSG_PROGRESS_BAR_TEST
```
2016-12-21 08:57:39 +01:00
Scott Lahteine
06153add6b Merge pull request #5565 from thinkyhead/rc_negative_retract_in_menu
Followup to #5550 - spacing before "mm"
2016-12-20 18:42:37 -08:00
esenapaj
ab6b005867 Suppress warning 2016-12-21 09:13:03 +09:00
AnHardt
61f15ef7e7 Fix 5194
I have been a bit too radical in cleaning up this section.
2016-12-21 00:45:29 +01:00
esenapaj
60515ff700 Update Japanese translation
・Add new translation
2016-12-21 08:44:07 +09:00
Scott Lahteine
1e419655f3 Followup to #5550 - spacing before "mm" 2016-12-20 02:27:54 -08:00
Scott Lahteine
1a26ce1cdc Merge pull request #5550 from FHeilmann/patch-2
Allow negative retract values in the LCD
2016-12-20 02:10:22 -08:00
Scott Lahteine
bec30c89e7 Merge pull request #5522 from esenapaj/Add-description-for-dual-x
Add description for choice of DEFAULT_DUAL_X_CARRIAGE_MODE
2016-12-20 01:31:53 -08:00
Florian Heilmann
780dabf32b Merge pull request #8 from thinkyhead/rc_negative_retract_in_menu
Replace "+mm" with "mm." Allow negative recover-swap length.
2016-12-20 10:31:07 +01:00
Scott Lahteine
7739c0affa Change "+mm" to "mm" in most languages
- Japanese and Chinese still need update
2016-12-20 01:16:51 -08:00
Scott Lahteine
1cba425308 Allow negative recover-swap length from LCD 2016-12-20 01:16:08 -08:00
Scott Lahteine
298a8c6a3c Merge pull request #5561 from thinkyhead/rc_no_case_light
Support for M335 case light "no case light"
2016-12-20 01:06:59 -08:00
Scott Lahteine
644f45cbd8 Merge pull request #5563 from akaJes/m600
FILAMENT_CHANGE_FEATURE allowed in idle mode
2016-12-20 01:06:10 -08:00
Scott Lahteine
4213330d22 Merge pull request #5562 from thinkyhead/rc_char_lcd_tweaks
Fix various LCD-related issues
2016-12-20 01:03:38 -08:00
Scott Lahteine
0d2fc13516 Place "Level Bed" closer to "Auto Home" 2016-12-20 00:51:03 -08:00
Scott Lahteine
b031d28ebf Encoder events should not skip stripes 2016-12-20 00:21:51 -08:00
Scott Lahteine
22881f38b9 Fix updating of "bool" menu items 2016-12-20 00:21:51 -08:00
Scott Lahteine
eb68715b94 No "Cooldown" menu if heaters are off 2016-12-20 00:21:51 -08:00
Jesus
4ed976b5ff m600 fixes 2016-12-20 09:47:46 +02:00
Damien
4e2639942b Support for M335 case light "no case light" 2016-12-19 23:23:08 -08:00
Scott Lahteine
18ba31e9b5 Add Debug Menu with LCD_PROGRESS_BAR_TEST as an example 2016-12-19 22:57:14 -08:00
Scott Lahteine
03af5961b0 Hide (or remove) custom character change on boot screen 2016-12-19 22:27:28 -08:00
Scott Lahteine
1642f5ed31 Add macro to some en strings 2016-12-19 22:27:28 -08:00
Scott Lahteine
dbb2d56c89 Correct comment on watchdog timer 2016-12-19 22:27:28 -08:00
Scott Lahteine
41a30923f3 Merge pull request #5559 from thinkyhead/rc_minimum_gcc_version
Throw an error for gcc before 4.7
2016-12-19 19:50:44 -08:00
Scott Lahteine
04f77df6c0 Merge pull request #5560 from thinkyhead/rc_bl_status
Have bed leveling status output current status, not requested.
2016-12-19 19:18:06 -08:00
Scott Lahteine
6d6a1db6ec Apply const to _EEPROM_writeData value param 2016-12-19 18:50:43 -08:00
Robert Kirk
f724ef5820 Have bed leveling status output current status, not requested. 2016-12-19 18:47:45 -08:00
Scott Lahteine
20218e553d Merge pull request #5527 from MagoKimbra/rc_configuration_store_fix_size
Fix size
2016-12-19 18:47:28 -08:00
Scott Lahteine
dcfbe2bd3c Throw an error for gcc before 4.7 2016-12-19 18:30:51 -08:00
Scott Lahteine
82fde7df2e Merge pull request #5512 from AnHardt/speed-compare-bbr
Optimize handling of block_buffer_runtime()
2016-12-19 18:21:06 -08:00
Scott Lahteine
64a44f697c Merge pull request #5557 from thinkyhead/rc_thermistor_breakup
Split up thermistor tables
2016-12-19 15:01:18 -08:00
Scott Lahteine
8986225752 Spacing, cleanup in speed_lookuptable.h 2016-12-19 14:52:45 -08:00
Scott Lahteine
e12c8e5cac Split up thermistor tables 2016-12-19 14:47:54 -08:00
Florian Heilmann
a7334fd2a0 Allow negative retract values in the LCD
This can already be done via G-Code, so adding the capability to the LCD should be straight forward.
2016-12-19 14:19:06 +01:00
AnHardt
292eb365c6 Optimize handling of block_buffer_runtime()
millis_t is long - divisions take for ever.

Return a kind of millisecond instead of microsecond -
divided by 1024 instead of 1000 for speed. (2.4% error)

That does not matter because block_buffer_runtime is
already a too short estimation.
Shrink the return-type.
2016-12-19 11:47:28 +01:00
esenapaj
6854f44bf2 Add description for choice of DEFAULT_DUAL_X_CARRIAGE_MODE 2016-12-19 02:21:10 +09:00
Scott Lahteine
3f6f036f7c Merge pull request #5524 from thinkyhead/rc_optional_dogm_splitup
Report EEPROM data size, not final index
2016-12-16 18:55:48 -08:00
MagoKimbra
86ba7e4542 Fix size
Fix size for writeData and readData.
For bilinear grid 11 x 11 for example, size is 4 (float) x 11 x 11 = 484. uint8_t max is 255.
2016-12-16 14:49:33 +01:00
Scott Lahteine
f9f75c8016 Fix USE_RAW_KINEMATICS in prepare_kinematic_move_to 2016-12-15 23:15:38 -08:00
Scott Lahteine
87921f390a Clarify what are "logical" positions in the planner 2016-12-15 23:15:38 -08:00
Scott Lahteine
a4f10f59c3 Write the E parameter length correctly 2016-12-15 23:15:38 -08:00
Scott Lahteine
2e904cb4f9 Merge pull request #5514 from esenapaj/Update-Japanese-translation
Update Japanese translation
2016-12-15 21:38:40 -08:00
Scott Lahteine
0b6817e0f9 Merge pull request #5505 from android444/patch-4
Update for translations language_pl.h
2016-12-15 21:38:18 -08:00
Scott Lahteine
3bd76f60e4 Report EEPROM data size, not final index 2016-12-15 20:26:28 -08:00
Scott Lahteine
78d6d6e076 Merge pull request #5452 from thinkyhead/rc_save_your_mesh
Save Bed Leveling to EEPROM
2016-12-15 20:23:01 -08:00
Scott Lahteine
0d0aa6c20d Patch type for max_acceleration_mm_per_s2 save/restore 2016-12-15 20:05:42 -08:00
Scott Lahteine
d4f5418802 Merge pull request #5517 from esenapaj/Fix-for-PR-#5255
Fix for the PR #5255 (Case light menu (3rd attempt))
2016-12-15 20:01:22 -08:00
Scott Lahteine
fa7010b0a1 Merge pull request #5515 from esenapaj/Remove-unnecessary-tabs-and-spaces
Remove unnecessary tabs and spaces
2016-12-15 19:58:32 -08:00
Scott Lahteine
6d7b1cdf6c Add M421 for ABL Bilinear 2016-12-15 19:39:11 -08:00
Scott Lahteine
32e65dc429 Extend M420 to print state and, with V, the matrix / mesh 2016-12-15 19:39:11 -08:00
Scott Lahteine
d04258753b Don't throw away the bed level matrix on G28 2016-12-15 19:21:18 -08:00
Scott Lahteine
8f0f225d10 Save ABL Planar Matrix to EEPROM 2016-12-15 19:21:15 -08:00
Scott Lahteine
e2429a9da1 Generalize Bed Leveling flag in EEPROM 2016-12-15 19:20:52 -08:00
Scott Lahteine
e42fd7813a Save ABL Bilinear Grid to EEPROM 2016-12-15 19:20:48 -08:00
Scott Lahteine
492b68f8e3 Better EEPROM read/write error handling 2016-12-15 19:08:44 -08:00
Scott Lahteine
55722c09da Use "UNPROBED" for un-probed bed_level_grid points 2016-12-15 19:08:44 -08:00
Scott Lahteine
2643404ac8 Throw an error in M420 if can't enable 2016-12-15 19:08:43 -08:00
Scott Lahteine
b1539394fd Use planner.unapply_leveling to undo tilt in G29 2016-12-15 19:08:43 -08:00
Scott Lahteine
04636f78eb Re-enable MBL/ABL after M48 2016-12-15 19:08:43 -08:00
Scott Lahteine
9b41638672 Minor tweak to G29 grid points 2016-12-15 19:08:42 -08:00
Scott Lahteine
daa2cad21f Fix comment on G29 to include 'Z' 2016-12-15 19:08:42 -08:00
Scott Lahteine
8244fefcc2 Tweak call to reset_bed_level in G29 2016-12-15 19:08:42 -08:00
Scott Lahteine
0995a5d734 Fixup reset_bed_level 2016-12-15 19:08:42 -08:00
Scott Lahteine
1b2fb2bdc7 ABL_GRID_POINTS_* => ABL_GRID_MAX_POINTS_* 2016-12-15 19:08:41 -08:00
Scott Lahteine
b091c9ceb7 Merge pull request #5520 from esenapaj/Fix-for-commented-section
Fix for commented section of Config_RetrieveSettings()
2016-12-15 18:16:30 -08:00
esenapaj
d486361c69 Fix for commented section of Config_RetrieveSettings() 2016-12-16 04:34:47 +09:00
esenapaj
88157ba529 Fix for the PR #5255 (Case light menu (3rd attempt)) 2016-12-16 00:57:32 +09:00
esenapaj
069c6b38dd Remove unnecessary tabs and spaces 2016-12-16 00:21:32 +09:00
esenapaj
9c8116aedf Update Japanese translation
・Add new translation
2016-12-16 00:06:58 +09:00
AnHardt
57b1275cde Add symbol-string to _de
Add symbol-string for _de
to reduce the frquencey of regenerating 'mappers' and 'fonts'
with the new utf-system.
2016-12-15 14:37:18 +01:00
android444
3363d2c937 Update for translations language_pl.h 2016-12-14 17:32:33 +01:00
Scott Lahteine
7ca4f16a5c Merge pull request #5430 from thinkyhead/rc_optional_dogm_splitup
Move Hollow Frame options to config-adv
2016-12-14 04:55:15 -08:00
Scott Lahteine
06af3b62ba Move HOLLOW_FRAME options to config_adv 2016-12-14 04:31:27 -08:00
Scott Lahteine
67ca6c7bfe Codestyle tweaks to ultralcd.cpp 2016-12-14 04:20:33 -08:00
Scott Lahteine
8d9fcd8e6f Merge pull request #5495 from AnHardt/autoadjusting_display-updates
Adaptive screen updates for all kinds of displays
2016-12-14 04:16:26 -08:00
Scott Lahteine
77a360912d Merge pull request #5491 from yhfudev/devel-rcbugfix-language-headers
UTF-8 language header files
2016-12-14 02:23:09 -08:00
Scott Lahteine
efb8b8425c Merge pull request #5493 from thinkyhead/rc_fix_recover_unhop
Prevent retract un-hop at wrong height
2016-12-14 02:20:08 -08:00
AnHardt
d0e24e0876 Adaptive screen updates for all kinds of displays
The target here is to update the screens of graphical and char base
displays as fast as possible, without draining the planner buffer too much.

For that measure the time it takes to draw and transfer one
(partial) screen to the display. Build a max. value from that.
Because ther can be large differences, depending on how much the display
updates are interrupted, the max value is decreased by one ms/s. This way
it can shrink again.
On the other side we keep track on how much time it takes to empty the
planner buffer.
Now we draw the next (partial) display update only then, when we do not
drain the planner buffer to much. We draw only when the time in the
buffer is two times larger than a update takes, or the buffer is empty anyway.

When we have begun to draw a screen we do not wait until the next 100ms
time slot comes. We draw the next partial screen as fast as possible, but
give the system a chance to refill the buffers a bit.

When we see, during drawing a screen, the screen contend has changed,
we stop the current draw and begin to draw the new content from the top.
2016-12-13 18:44:34 +01:00
yhfudev
2dbd38ce16 tag the utf-8 strings 2016-12-13 11:54:35 -05:00
Scott Lahteine
94ffb58da7 Prevent retract un-hop at wrong height 2016-12-13 08:24:12 -08:00
Scott Lahteine
0772c8e55f Merge pull request #5487 from thinkyhead/rc_easier_move_axis
Rearrange Move Menu, Fix up Delta Calibration
2016-12-13 07:07:05 -08:00
Scott Lahteine
b2c8de856b Merge pull request #5478 from AnHardt/stepspermm
Replace ftostr62sign with ftostr62rj
2016-12-13 07:05:42 -08:00
Scott Lahteine
1fd8185d37 Merge pull request #5492 from thinkyhead/rc_fix_language_es
Fix multiple definitions of message macros in the language-es.h
2016-12-13 06:57:52 -08:00
yhfudev
1cdffdede7 fix multiple definitions of message macros in the language-es.h 2016-12-13 06:48:38 -08:00
Scott Lahteine
b67f8cb499 Merge pull request #5490 from jbrazio/update-bqhp2
Update the bq Hephestos 2 example configuration
2016-12-13 05:04:24 -08:00
Scott Lahteine
93b2833347 Move Menu: Select axis first, resolution after 2016-12-13 03:11:14 -08:00
Scott Lahteine
48aa0f6475 Merge pull request #5475 from AnHardt/utf-mapper-tr
utf8-mapper for Turkish
2016-12-13 03:03:22 -08:00
Scott Lahteine
b9ee0d7bd3 Merge pull request #5488 from thinkyhead/rc_fade_compiler_warn
Patch fade_factor compiler warning
2016-12-13 03:00:47 -08:00
Scott Lahteine
641e0936d4 Patch up Delta Calibration Menu 2016-12-13 02:42:28 -08:00
Scott Lahteine
b4dbf4d18a Non-reentrant "Moving..." screen to safely wait in LCD 2016-12-13 02:42:27 -08:00
Scott Lahteine
7b625e0048 Patch fade_factor compiler warning 2016-12-13 02:29:01 -08:00
Scott Lahteine
6fa8fd15e2 Add negative temperatures for Thermistor 1
Changes from #5485 by @AndKe
2016-12-13 02:06:16 -08:00
Scott Lahteine
2b5d424394 Use handle_reprapworld_keypad for keypad handling 2016-12-13 01:41:08 -08:00
Scott Lahteine
887ed73c9b Expose delta_clip_start_height for use by others 2016-12-13 01:41:08 -08:00
João Brázio
3f75edb1d6 Updated bq Hephestos 2 example configuration 2016-12-13 09:26:07 +00:00
Scott Lahteine
6080ac566a Merge pull request #5483 from thinkyhead/rc_aragonese_fixup
Update Aragonese translation
2016-12-12 18:26:07 -08:00
Daniel Martinez
b796e7031d Update Aragonese translation 2016-12-12 17:36:33 -08:00
AnHardt
cd2b74e88d Replace ftostr62sign with ftostr62rj
`ftostr62sign()` is used only when displaing/editing
Steps/mm. A sign is not needed - the value is always positive.
Because the number part is long there is no't much place for the values name.
With this PR the is one more char for the name possible.
2016-12-12 20:25:20 +01:00
AnHardt
795541f87e utf8-mapper for Turkish
The non utf8 version of turkish is a bit unhandy.

Delete `language_tr.h`
Rename `language_tr_utf.h` to `language_tr.h`
Provide a propper utf8-mapper for Turkish and use it.
2016-12-12 15:56:59 +01:00
Scott Lahteine
7c71bb2900 Merge pull request #5471 from thinkyhead/rc_planner_report_m503
Patch to show E factors in M503
2016-12-11 17:47:41 -08:00
Scott Lahteine
39401b7472 Patch to show E factors in M503 2016-12-11 17:37:29 -08:00
Scott Lahteine
6b50230022 Merge pull request #5447 from thinkyhead/rc_update_dutch
Dutch cleanup, ordering, placeholders
2016-12-10 22:13:20 -08:00
Scott Lahteine
2c97c11731 Merge pull request #5454 from thinkyhead/rc_fix_delta_g29
Fix G29 starting height on DELTA
2016-12-10 22:10:33 -08:00
Scott Lahteine
8239c45b30 Merge pull request #5448 from thinkyhead/rc_eeprom_bump
EEPROM: Prolong life. Better support for `DISTINCT_E_FACTORS`.
2016-12-10 22:06:00 -08:00
Scott Lahteine
21ed43df5f New Dutch terms 2016-12-10 21:59:45 -08:00
Scott Lahteine
4bc6536f54 Move to safe zone on DELTA if using do_blocking_move_to* 2016-12-10 21:28:24 -08:00
Scott Lahteine
6f389158d7 Compile less code with EEPROM off 2016-12-09 06:05:32 -08:00
Scott Lahteine
f2301a2a04 Add e-stepper count to EEPROM (for planner vars) 2016-12-09 06:05:31 -08:00
Scott Lahteine
53c9fca0f6 Only write to EEPROM when a byte changes 2016-12-09 06:05:31 -08:00
Scott Lahteine
72fe995c42 Merge pull request #5449 from AnHardt/volatile-bbru
Make block_buffer_runtime_us volatile
2016-12-09 05:57:45 -08:00
AnHardt
13eebd11cf volatile_block_buffer_runtime_us
`block_buffer_runtime_us` is mangled in the planner and in the stepper-ISR.
So it needs to be volatile and interrupt protected.
2016-12-09 14:49:02 +01:00
Scott Lahteine
8383f35b40 Merge pull request #5445 from thinkyhead/rc_reduce_jerk_code
Slightly shrink jerk and advance code
2016-12-09 02:54:03 -08:00
Scott Lahteine
52f8924f6e Merge pull request #5446 from gege2b/RCBugFix-french
Update french translation (LIGHTS str)
2016-12-09 02:49:32 -08:00
Gege2B
40453c1b9a Update french translation (LIGHTS str) 2016-12-09 11:18:29 +01:00
Scott Lahteine
fc2fc828b3 Prettify LIN_ADVANCE code with the positive condition 2016-12-09 00:29:07 -08:00
Scott Lahteine
1929502e15 Add const to some variables 2016-12-09 00:29:06 -08:00
Scott Lahteine
2da4d22520 Pretty up ADVANCE code 2016-12-08 22:51:28 -08:00
Scott Lahteine
af024e1d7c Pretty up coast / reverse jerk code 2016-12-08 22:50:25 -08:00
Scott Lahteine
3f3b5c86d8 Slightly shrink code for jerk-based reduction of safe_speed 2016-12-08 22:24:29 -08:00
Scott Lahteine
dfdb180db4 Merge pull request #5440 from AnHardt/simplify-long_move
Simplify long_move()
2016-12-08 18:03:20 -08:00
AnHardt
87fe20b5f5 Simplify long_move()
We are not really interested in, if there are blocks.
All information we need is in `block_buffer_runtime_us`.
2016-12-09 00:13:35 +01:00
Scott Lahteine
574d9c7d3d Merge pull request #5432 from Kaibob2/patch-2
Update language_de.h
2016-12-08 13:14:04 -08:00
Scott Lahteine
f089279263 Merge pull request #5431 from esenapaj/Suppress-warnings,-etc
Suppress warnings, etc
2016-12-08 13:10:12 -08:00
Scott Lahteine
d92ccb230c Merge pull request #5438 from AnHardt/patch-long_move
Patch long_move()
2016-12-08 13:08:36 -08:00
Scott Lahteine
a1e0842c8b Merge pull request #5436 from esenapaj/Remove-redundant-E,-etc-plan-B
Remove redundant "E", etc plan B
2016-12-08 13:06:07 -08:00
AnHardt
706b240251 Patch long_move()
While the last move in the planner_buffer is running
it's duration is already subtracted from block_buffer_runtime_us.
2016-12-08 21:03:26 +01:00
esenapaj
a298a58684 Remove redundant "E" 2016-12-09 02:27:34 +09:00
Kai
390a6d976a Update language_de.h
#define MSG_ENDSTOP_ABORT  doesn't fit in Display 
See https://github.com/MarlinFirmware/Marlin/issues/5401#issuecomment-265714487
2016-12-08 12:18:19 +01:00
esenapaj
e9393c3634 Suppress warnings, etc
・Suppress warnings
・Remove unused variable "did_update"
2016-12-08 17:47:59 +09:00
Scott Lahteine
4ea87b8f34 Merge pull request #5414 from thinkyhead/rc_sanitycheck_inverting
Sanity-check inverting for Z probe and Z endstop
2016-12-08 00:28:33 -08:00
Scott Lahteine
da6a094424 Sanity-check inverting and pullups for Z probe and Z endstop
`Z_MIN_ENDSTOP_INVERTING` must match `Z_MIN_PROBE_ENDSTOP_INVERTING`
when using `Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN`.
This is easy to overlook.
2016-12-08 00:12:19 -08:00
Scott Lahteine
a9f64537ff Merge pull request #5429 from thinkyhead/rc_mention_M205
Fix compile error with LCD_I2C_VIKI
2016-12-07 22:16:57 -08:00
Scott Lahteine
3fb43c11fc Fix compile error with LCD_I2C_VIKI 2016-12-07 23:29:45 -06:00
Scott Lahteine
c1e1f63ffa Merge pull request #5424 from thinkyhead/rc_mention_M205
Include M205 note in configurations
2016-12-07 18:18:59 -06:00
Scott Lahteine
aa241c63b3 Include M205 note in configurations 2016-12-07 14:45:44 -06:00
Scott Lahteine
c8a95ec514 Merge pull request #5413 from MagoKimbra/rc_fix_mesh
Fix Mesh without Fade Height
2016-12-07 03:16:02 -06:00
Scott Lahteine
35ad9626f1 Merge pull request #5410 from thinkyhead/rc_polish_update
Update Polish language, reduce filament change messages
2016-12-07 03:15:53 -06:00
Scott Lahteine
01e5d46ea7 Patch some planner compile errors 2016-12-07 02:26:24 -06:00
MagoKimbra
5383212a28 Fix Mesh without Fade Height 2016-12-07 09:23:42 +01:00
Scott Lahteine
dbe1dc1452 Merge pull request #5406 from Rigid3D/RCBugFix
Turkish Translation Update
2016-12-07 00:56:08 -06:00
Scott Lahteine
66f1b7cce3 Merge pull request #5409 from thinkyhead/rc_croatian_update
Updates to Croatian language
2016-12-07 00:55:45 -06:00
Scott Lahteine
4783a59249 Remove filament-change empty lines from languages 2016-12-07 00:53:03 -06:00
Scott Lahteine
1705099c3e Save space by not defining unused filament change message lines 2016-12-07 00:53:03 -06:00
Scott Lahteine
29bc83ead8 Optimize findMissingTranslations.sh 2016-12-07 00:53:02 -06:00
android444
9b1f4b514b Update Polish language
Translation of messages in English to Polish.
2016-12-06 22:28:33 -06:00
Robert Marko
84f7e1de04 Updates to Croatian language 2016-12-06 22:24:12 -06:00
Scott Lahteine
b6bb4daea9 Merge pull request #5408 from esenapaj/README-and-Version-for-1.1.0-RCBugFix
README and Version for 1.1.0-RCBugFix
2016-12-06 22:21:19 -06:00
esenapaj
08cdaaf19b README and Version for 1.1.0-RCBugFix
Sync with RC8
2016-12-07 10:43:58 +09:00
Mehmet Sutas
f4663cb677 Update language_tr_utf8.h 2016-12-07 00:21:56 +03:00
Mehmet Sutas
b4fd115d4e Update language_tr.h 2016-12-07 00:20:07 +03:00
Scott Lahteine
83c5026db1 Ignore homing button when SD printing
As suggested in #5404 by @android444
2016-12-06 14:22:34 -06:00
Scott Lahteine
312caef472 Merge pull request #5398 from thinkyhead/rc_croatian_cleanup
Fix Croatian spacing, extra #endif
2016-12-06 03:22:19 -06:00
Scott Lahteine
46b65773ea Fix Croatian spacing, extra #endif 2016-12-06 03:10:37 -06:00
Scott Lahteine
3f2faac9d1 Merge pull request #5388 from thinkyhead/rc_subdivide_bilinear
Subdivide Bilinear Grid with Catmull Rom Splines
2016-12-05 20:28:50 -06:00
Scott Lahteine
b5b5edd9ad Merge pull request #5394 from thinkyhead/rc_drop_board_99
Remove mystery-board 99
2016-12-05 20:28:35 -06:00
Scott Lahteine
c48901f355 Remove mystery-board 99 2016-12-05 20:16:50 -06:00
akaJes
d7b948610a Experimental bilinear subdivision option 2016-12-05 20:11:24 -06:00
Scott Lahteine
6253b765aa Merge pull request #5389 from thinkyhead/distribute_screen_updates
Distribute GLCD screen updates in time
2016-12-05 20:08:33 -06:00
Scott Lahteine
b203901143 Merge pull request #5393 from AnHardt/Fix-auto_report_temperatures
Fix auto_report_temperatures()
2016-12-05 19:38:23 -06:00
AnHardt
59a27ed27d Fix auto_report_temperatures()
The `auto_report_temperatures` needs a linefeed to be recognized by Repetier Host.
2016-12-06 01:26:44 +01:00
AnHardt
a6fbd4a5d8 Distribute GLCD screen updates in time
Currently we draw and send the screens for a graphical LCD all at once.
We draw in two or four parts but draw them directly behind each other.
For the tested status screen this takes 59-62ms in a single block.
During this time nothing else (except the interrupts) can be done.
When printing a sequence of very short moves the buffer drains - sometimes until it's empty.

This PR splits the screen update into parts.
Currently we have 10 time slots. During the first one the complete screen is drawn. (60,0,0,0,0,0,0,0,0,0,0)
Here i introduce pauses for doing other things. (30,30,0,0,0,0,0,0) or (15,15,15,15,0,0,0,0,0,0)
Drawing in consecutive time slots prevents from lagging too much. Even with a 4 stripe display all the drawing is done after 400ms.
Previous experiments with a even better distribution of the time slots like
(30,0,0,0,0,30,0,0,0,0) and (15,0,15,0,15,0,15,0,0,0) did not feel good when using the menu, because of too much lag.

Because of the previous PRs to speed up the display updates and especially reducing the difference between drawing 2 or 4 stripes,
it now makes sense for the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER to go from 2 to 4 stripes. This costs about 1-2ms per complete
screen update, but is payed back by having partial updates lasting only the half time and two additional brakes. Also ~256 byte of
framebuffer are saved in RAM.

13:45:59.213 : echo: #:17 >:13 s:30;   #:16 >:13 s:29;   S#:33 S>:26 S:59
13:46:00.213 : echo: #:16 >:14 s:30;   #:17 >:13 s:30;   S#:33 S>:27 S:60
13:46:01.215 : echo: #:17 >:13 s:30;   #:16 >:13 s:29;   S#:33 S>:26 S:59
13:46:02.215 : echo: #:16 >:13 s:29;   #:16 >:14 s:30;   S#:32 S>:27 S:59
13:46:03.214 : echo: #:17 >:13 s:30;   #:17 >:13 s:30;   S#:34 S>:26 S:60
13:46:04.214 : echo: #:16 >:13 s:29;   #:16 >:14 s:30;   S#:32 S>:27 S:59
13:46:05.212 : echo: #:16 >:14 s:30;   #:17 >:13 s:30;   S#:33 S>:27 S:60
13:46:06.212 : echo: #:17 >:13 s:30;   #:16 >:13 s:29;   S#:33 S>:26 S:59

03:30:36.779 : echo: #:8 >:7 s:15;   #:10 >:7 s:17;   #:8 >:6 s:14;   #:8 >:7 s:15;   S#:34 S>:27 S:61
03:30:37.778 : echo: #:8 >:6 s:14;   #:10 >:7 s:17;   #:9 >:7 s:16;   #:8 >:6 s:14;   S#:35 S>:26 S:61
03:30:38.778 : echo: #:8 >:6 s:14;   #:11 >:7 s:18;   #:8 >:6 s:14;   #:8 >:7 s:15;   S#:35 S>:26 S:61
03:30:39.777 : echo: #:8 >:6 s:14;   #:10 >:7 s:17;   #:8 >:8 s:16;   #:8 >:6 s:14;   S#:34 S>:27 S:61
03:30:40.780 : echo: #:8 >:6 s:14;   #:11 >:7 s:18;   #:8 >:6 s:14;   #:8 >:6 s:14;   S#:35 S>:25 S:60
03:30:41.780 : echo: #:9 >:6 s:15;   #:10 >:7 s:17;   #:8 >:6 s:14;   #:9 >:6 s:15;   S#:36 S>:25 S:61
03:30:42.779 : echo: #:8 >:6 s:14;   #:10 >:8 s:18;   #:8 >:6 s:14;   #:8 >:6 s:14;   S#:34 S>:26 S:60
03:30:43.778 : echo: #:9 >:6 s:15;   #:10 >:7 s:17;   #:8 >:7 s:15;   #:9 >:6 s:15;   S#:36 S>:26 S:62

#: draw a stripe
>: transfer a stripe
s: sum of of draw and transfer for one stripe
S#: sum of draws for a complete screen
S>: sum of transfers for a complete screen
S: time to draw and transfer a complete screen
2016-12-05 12:22:54 -06:00
Scott Lahteine
f882355994 Merge pull request #5318 from Sebastianv650/Account_for_LCD_improvements
Account for LCD improvements in ENSURE_SMOOTH_MOVES
2016-12-05 11:23:58 -06:00
Scott Lahteine
20e834461d Merge pull request #5385 from thinkyhead/rc_ftostr4sign_decimal
Show decimal for small numbers in ftostr4sign
2016-12-05 11:22:45 -06:00
Scott Lahteine
b6b100c471 Merge pull request #5371 from thinkyhead/rc_extruders_can_differ
Allow distinct factors for multiple extruders
2016-12-05 11:22:31 -06:00
Scott Lahteine
1aca2dfe0c Merge pull request #5387 from thinkyhead/rc_polish_update
Polish language update – plus placeholders
2016-12-05 10:52:20 -06:00
Scott Lahteine
449d9cbf60 Add placeholders for Polish translatable strings 2016-12-05 10:37:00 -06:00
c64pl
643dc4b64e Update language_pl.h
Fixed translations
2016-12-05 10:37:00 -06:00
Scott Lahteine
0974b75fb6 Merge pull request #5386 from thinkyhead/rc_galician_update
Galician language update.
2016-12-05 10:36:26 -06:00
Rafa Couto
2b9115330d Galician language update. 2016-12-05 10:11:28 -06:00
Scott Lahteine
1f3e2440bc Merge pull request #5175 from thinkyhead/rc_dualx_homing
Unpark when using Z_SAFE_HOMING with Dual X
2016-12-05 10:02:56 -06:00
Scott Lahteine
d5bf1684fe Implement as optional feature LCD_DECIMAL_SMALL_XY
And reduce the function size to simplify
2016-12-05 09:26:05 -06:00
Guthenberg
bfb8d3b53e Show more decimals in Display, if possible
_123, -123, _-12, __-1  plus  1234, 12.3, -1.2
2016-12-05 09:05:46 -06:00
Scott Lahteine
1e30d1da47 Simplify itostr4sign
- This function becomes obsolete if ftostr4sign is re-written.
2016-12-05 09:05:46 -06:00
Scott Lahteine
82a187acae Merge pull request #5359 from AnHardt/update-de
Add missing translations to lang-de
2016-12-05 07:31:28 -06:00
Scott Lahteine
4bafdf4b66 Support DISTINCT_E_FACTORS in LCD Motion Menu 2016-12-05 07:26:18 -06:00
Scott Lahteine
3391c785c6 Support for distinct E factors 2016-12-05 07:26:18 -06:00
Scott Lahteine
0dfe95eaba Adjust formatting in Planner 2016-12-05 07:26:17 -06:00
Scott Lahteine
c9c6e084ce Merge pull request #5383 from thinkyhead/rc_fixup_5378
Fix rows error in DOGM
2016-12-05 07:24:44 -06:00
Scott Lahteine
09587f7c0d Fix rows error in DOGM 2016-12-05 07:14:11 -06:00
Scott Lahteine
c47e07d129 Fix Dual X software endstops 2016-12-05 06:51:41 -06:00
Scott Lahteine
4217e9653e Adjust park code in tool_change 2016-12-05 06:51:41 -06:00
Scott Lahteine
b20405db31 Only DXC_AUTO_PARK_MODE should auto-move in tool_change 2016-12-05 06:48:43 -06:00
Scott Lahteine
ca24af7d5d Dual X with home_z_safely is not parked 2016-12-05 06:43:26 -06:00
Scott Lahteine
0e15b4f434 Dual X set_axis_is_at_home can use x_home_pos for both 2016-12-05 06:43:26 -06:00
Scott Lahteine
54109dfaec Reduce code size for Dual X un-park 2016-12-05 06:43:26 -06:00
Scott Lahteine
fe96f74db1 Use const arguments in Dual X helper functions 2016-12-05 06:43:26 -06:00
Scott Lahteine
41278c1e8b Apply LOGICAL_POSITION to home positions on Dual X 2016-12-05 06:43:26 -06:00
Scott Lahteine
053fb55af6 Fix modes ordering in prepare_move_to_destination_dualx 2016-12-05 06:43:26 -06:00
Scott Lahteine
ee50928eee Make LOGICAL and RAW position macros ternary-compatible 2016-12-05 06:43:26 -06:00
Scott Lahteine
56dd15c0ad Use SET_INPUT for PS_ON_PIN in kill 2016-12-05 06:43:26 -06:00
Scott Lahteine
200cf3e9f9 Merge pull request #5381 from thinkyhead/rc_fix_fade_factor
Properly apply fade_factor to MBL
2016-12-05 06:06:13 -06:00
Scott Lahteine
84ff78c1e3 Pass the fade factor to mbl.get_z 2016-12-05 03:01:51 -06:00
Scott Lahteine
85c2b96685 Apply const to MBL class methods 2016-12-05 02:50:59 -06:00
Scott Lahteine
c06161b773 Use apply_leveling, not MBL directly 2016-12-05 01:53:36 -06:00
Scott Lahteine
818f8b93d3 Merge pull request #5378 from thinkyhead/rc_duration_rj
Better alignment of elapsed print time
2016-12-04 22:42:23 -06:00
Scott Lahteine
9d88a61d52 Better alignment of elapsed print time 2016-12-04 21:30:49 -06:00
Scott Lahteine
21c7b7ef87 Merge pull request #5374 from thinkyhead/rc_lcd_edit_tweaks
Fix garbled negative values on LCD
2016-12-04 16:32:12 -06:00
Scott Lahteine
0b53d78046 Tweak editable items for debugging 2016-12-04 03:51:10 -06:00
Scott Lahteine
0b9b529745 Merge pull request #5368 from thinkyhead/rc_croatian_update
Save PROGMEM with string changes
2016-12-03 19:37:23 -06:00
Scott Lahteine
fccc97de6d Save PROGMEM with string changes
Unlike RAM-based strings, PROGMEM strings aren’t consolidated by the
compiler.
2016-12-03 19:21:46 -06:00
AnHardt
e7fc353f08 Add missing translations to lang-de 2016-12-03 20:51:49 +01:00
Scott Lahteine
ea13c68515 Merge pull request #5365 from thinkyhead/rc_croatian_update
Add placeholders for Bulgarian translation
2016-12-03 12:30:22 -06:00
Scott Lahteine
3f2cb376e0 Add placeholders for Bulgarian translation 2016-12-03 12:14:02 -06:00
Scott Lahteine
b22d37ba52 Merge pull request #5364 from thinkyhead/rc_croatian_update
Update Croatian to include missing strings
2016-12-03 11:37:42 -06:00
Robert Marko
b796a687ca Update Croatian to include missing strings
Added all missing strings according to English
2016-12-03 11:15:41 -06:00
Scott Lahteine
3bb76b254d Merge pull request #5363 from thinkyhead/rc_fix_hotend_offset_M503
Fix hotend offset report in M503
2016-12-03 10:28:49 -06:00
Scott Lahteine
255ed80164 Fix hotend offset report in M503 2016-12-03 10:17:35 -06:00
Scott Lahteine
7273a18c8d Merge pull request #5358 from thinkyhead/rc_fixup_scripts
Enhance findMissingTranslations, format the output
2016-12-03 09:37:32 -06:00
Scott Lahteine
b44f06a296 Extend findMissingTranslations, reformat output 2016-12-03 08:48:51 -06:00
Scott Lahteine
1dfe39f0d7 Merge pull request #5351 from petrzjunior/RCBugFix
[LANGUAGE] Update Czech (Case light)
2016-12-03 03:52:18 -06:00
Petr Zahradník
c66f3ed34b Update Czech 2016-12-03 10:32:34 +01:00
Scott Lahteine
cbf208ea1f Merge pull request #5348 from Kaibob2/patch-1
Update language_de.h
2016-12-03 01:53:24 -06:00
Scott Lahteine
a2660cf688 Merge pull request #5347 from tnw513/fix-italian
Added missing translations
2016-12-03 01:52:45 -06:00
Scott Lahteine
27dd5acc22 Fix set_led_color for BLINKM
Follow-up to #5330
2016-12-03 01:51:11 -06:00
Kai
8530c32309 Update language_de.h
Grammar corrections
2016-12-02 19:40:36 +01:00
Silvio Didonna
f1d5ffa211 Added missing translations 2016-12-02 18:49:39 +01:00
Scott Lahteine
b0361ebe4f Merge pull request #5343 from thinkyhead/rc_invert_case_light
Allow case light pin to be active low
2016-12-02 01:17:11 -06:00
Scott Lahteine
f60b4f8659 Allow case light pin to be active low 2016-12-01 23:32:34 -06:00
Scott Lahteine
3f4c02e42f Merge pull request #5259 from Sebastianv650/Allow_UART-ISR_inside_Stepper
Allow UART ISRs inside the stepper ISR
2016-12-01 23:17:42 -06:00
Scott Lahteine
115f81840b Merge pull request #5342 from thinkyhead/rc_reliable_redraw
Fix redraw in SD Card menus
2016-12-01 22:42:24 -06:00
Scott Lahteine
d07229f185 Fix redraw in SD Card menus 2016-12-01 18:15:58 -06:00
Scott Lahteine
47b4b21308 Merge pull request #5331 from esenapaj/Fix-for-the-PR-#5072
Fix for the PR #5072 (Add predefined AUTO_FAN_PINs to pins files), etc
2016-12-01 13:37:02 -06:00
Scott Lahteine
14b1500525 Merge pull request #5338 from thinkyhead/rc_fix_fade_factor
Fix compile without ENABLE_LEVELING_FADE_HEIGHT
2016-12-01 12:06:39 -06:00
Scott Lahteine
8d14420331 Fix compile without ENABLE_LEVELING_FADE_HEIGHT 2016-12-01 11:37:24 -06:00
Scott Lahteine
415294801f Merge pull request #5330 from thinkyhead/rc_rgb_led
Support for an RGB LED using 3 pins
2016-11-30 14:14:00 -06:00
esenapaj
0909cf3d46 Adjust spacing 2016-11-30 19:39:39 +09:00
esenapaj
8e9e9c17b0 Follow-up the PR #5323 (Adding ukrainian language support)
・Update forgotten Configuration_adv.h of Felix\DUAL and K8400\Dual-head
2016-11-30 19:39:39 +09:00
esenapaj
d92ce8849b Fix for the PR #5072 (Add predefined AUTO_FAN_PINs to pins files), etc
・Make descriptions the same as others
2016-11-30 19:39:38 +09:00
Scott Lahteine
e00b380489 Merge pull request #5323 from akaJes/lang-ua
Adding ukrainian language support
2016-11-30 01:10:40 -06:00
Scott Lahteine
862e3c93d9 Merge pull request #5328 from esenapaj/Suppress-warning
Suppress warning
2016-11-30 01:05:20 -06:00
Scott Lahteine
65c50e062e Support for an RGB LED using 3 pins 2016-11-30 00:02:31 -06:00
esenapaj
3047f3c85c Suppress warning 2016-11-30 00:32:56 +09:00
jes
f674246397 extend Configurations files 2016-11-29 15:04:36 +02:00
jes
c90191faaf adding ukrainian laguage support 2016-11-29 14:49:45 +02:00
Sebastianv650
912704a0d8 Enable ISRs inside temperature ISR
to capture chars at UART at 250000 baud.
2016-11-28 20:08:50 +01:00
Sebastianv650
f62f4006af Account for LCD improvements in ENSURE_SMOOTH_MOVES
.. and give the hint to try lower values if possible.
2016-11-28 17:44:19 +01:00
Scott Lahteine
092e949b58 Merge pull request #5169 from thinkyhead/rc_core_inverted
Support for COREYX, COREZX, COREZY
2016-11-28 02:26:41 -06:00
Scott Lahteine
e9e4208ff1 Merge pull request #5274 from Sebastianv650/improve_smooth_moves
Improvement for ENSURE_SMOOTH_MOVES
2016-11-28 02:22:08 -06:00
Scott Lahteine
c7935bb0d2 Merge pull request #5299 from thinkyhead/rc_bed_correction_fade
Add a fade factor for mesh leveling
2016-11-28 02:07:51 -06:00
Scott Lahteine
a69b1ee691 Merge pull request #5313 from thinkyhead/rc_fix_menu_actions
Keep drawing menu unless screen changes
2016-11-28 02:01:39 -06:00
Scott Lahteine
32ee3acf86 Merge pull request #5315 from thinkyhead/rc_fixup_material_menus
Refine material heatup menu items
2016-11-28 01:46:51 -06:00
Scott Lahteine
c70a06daf1 lcd_save_previous_menu => lcd_save_previous_screen 2016-11-28 01:46:18 -06:00
Scott Lahteine
13ea43cc8d Only exit menu handler when the screen changes 2016-11-28 01:46:18 -06:00
Scott Lahteine
f45b6a7762 Merge pull request #5314 from thinkyhead/case_light_menu_fix
Fix and optimize case-light code
2016-11-28 01:45:27 -06:00
Scott Lahteine
59fafb93b2 Merge pull request #5304 from AnHardt/pixel-shifting
MENU_HOLLOW_FRAME for the menu screens
2016-11-28 01:41:47 -06:00
Scott Lahteine
0951d385ce Don't set heater temperature above its maximum 2016-11-28 01:37:24 -06:00
Scott Lahteine
c9193e856d Limit preheat parameters based on all nozzles 2016-11-28 01:37:24 -06:00
Scott Lahteine
bb4529f7d2 PLA / ABS => Material 1 / 2 2016-11-28 01:37:24 -06:00
Scott Lahteine
61437d988a Fix and optimize case-light code 2016-11-28 01:34:52 -06:00
AnHardt
7a9fa78822 MENU_HOLLOW_FRAME for the menu screens
MENU_HOLLOW_FRAME for the menu screens and
some pixel shifting to optimize the look with tall fonts. (cn)
2016-11-27 22:59:05 +01:00
Scott Lahteine
20b0889602 Merge pull request #5303 from AnHardt/reduce-sripes
Not more then 4 stripes for u8g-devices
2016-11-26 18:47:43 -06:00
AnHardt
24ca1a6289 Not more then 4 stripes for u8g-devices
To optimise speed.
Costs well invested 128Byte of RAM.
2016-11-26 19:08:33 +01:00
Scott Lahteine
668e737893 Merge pull request #5288 from thinkyhead/rc_selective_rendering
Optimize graphical display with selective rendering
2016-11-26 06:54:41 -06:00
Scott Lahteine
aee71c543e Minor formatting in language.h 2016-11-26 06:53:52 -06:00
Scott Lahteine
05d8d189f6 Adjust spacing in utf_mapper.h 2016-11-26 06:53:52 -06:00
Scott Lahteine
5460a529da Add option DOGM_SPI_DELAY_US 2016-11-26 06:53:52 -06:00
Scott Lahteine
71842b6a17 Apply const to LCD arguments and locals 2016-11-26 06:53:52 -06:00
Scott Lahteine
b1abd7edef Optimize graphical display with selective rendering 2016-11-26 06:53:52 -06:00
Scott Lahteine
23935dd23a Merge pull request #5301 from AnHardt/fix-USE_BIG_EDIT_FONT
Fix USE_BIG_EDIT_FONT
2016-11-26 06:53:21 -06:00
AnHardt
b91fab2d7d Fix USE_BIG_EDIT_FONT 2016-11-26 13:50:25 +01:00
Scott Lahteine
4cd73e183d Hide hidden files and folders 2016-11-26 06:26:28 -06:00
Scott Lahteine
f6f77d34a1 Add a fade factor for mesh leveling 2016-11-26 03:41:26 -06:00
Scott Lahteine
679d37f83f Merge pull request #5298 from AnHardt/fonts-unterlaengen
Change font decent to -1 for tr and gr
2016-11-25 20:01:11 -06:00
AnHardt
75fdcc14b7 Activate font and mapper for el-gr 2016-11-26 02:30:37 +01:00
AnHardt
a0004e7cd3 Change font decent to -1 for tt and gr
For speeding up font drawing unify font decent.
Tr and Gr have ben the only fonts with a font decent of -2.
Sorry for some, a bit compressd, but hopefully still readeble symbols.
2016-11-26 02:29:23 +01:00
Scott Lahteine
307f263f89 Merge pull request #5292 from esenapaj/Update-Japanese-translation
Update Japanese translation
2016-11-25 16:56:49 -06:00
Scott Lahteine
9d177c93a2 Merge pull request #5291 from esenapaj/Follow-up-the-PR-#5255
Follow-up the PR #5255 (Case light menu (3rd attempt))
2016-11-25 16:56:15 -06:00
esenapaj
7070143042 Update Japanese translation
・Add new translation
2016-11-24 21:10:40 +09:00
esenapaj
ef97645002 Follow-up the PR #5255 (Case light menu (3rd attempt)) 2016-11-24 19:42:05 +09:00
Scott Lahteine
2a9b3376a9 Merge pull request #5289 from thinkyhead/rc_which_menu_actions
Drop "static" keyword in ultralcd.cpp function declarations
2016-11-23 23:04:05 -06:00
Scott Lahteine
b97dafe4b8 Drop "static" keyword in ultralcd.cpp function declarations 2016-11-23 20:43:01 -06:00
Scott Lahteine
2e966f8e5b Patch Capabilities Report for "PROGRESS" 2016-11-23 19:31:46 -06:00
Scott Lahteine
f60321d3e3 Merge pull request #5284 from thinkyhead/rc_turkish_update
Turkish update (squashed)
2016-11-23 14:57:52 -06:00
Mehmet Sutas
a26668b10c Add UTF8 Turkish Translation 2016-11-23 14:19:16 -06:00
Mehmet Sutas
61aa796307 Added Human Readable Comments 2016-11-23 14:19:16 -06:00
Mehmet Sutas
6fb9c6fe07 Follow-up for #5167 Turkish Language
Add check for Turkish Font before setting better font for graphic displays
2016-11-23 14:19:15 -06:00
Scott Lahteine
d891324830 Merge pull request #5258 from mosh1/mbl_speed_fix
Fix z feedrate value when doing mesh bed leveling. probe feedrate use…
2016-11-23 14:15:01 -06:00
Scott Lahteine
7f8133a51f Merge pull request #5255 from Kaibob2/CaseLightMenu
Case light menu (3rd attempt)
2016-11-23 13:46:33 -06:00
Kai
e9b42f4f47 Update language_de.h 2016-11-23 19:29:19 +01:00
Kai
0c341f0c50 Added Menu entry for Case light 2016-11-23 19:29:15 +01:00
Scott Lahteine
3bc2273ac9 Comment M540 2016-11-21 18:08:00 -06:00
Scott Lahteine
14b74181f5 Merge pull request #5179 from thinkyhead/rc_TMC2130
TMC2130 "Silent StepStick" support
2016-11-21 14:10:52 -06:00
Scott Lahteine
bb2114a060 Merge pull request #5264 from thinkyhead/rc_delta_safe_zone
Add an option for delta to home to the top
2016-11-21 13:56:44 -06:00
Scott Lahteine
38466b1d2f Merge pull request #5271 from esenapaj/Fix-for-the-PR-#5267
Fix for thePR #5267 (Introduce a +1234.56 format for over 999 steps/mm)
2016-11-21 13:55:56 -06:00
Scott Lahteine
9b96a4a53b Merge pull request #5246 from thinkyhead/rc_some_cleanup
Minor stepper cleanup
2016-11-21 13:55:25 -06:00
Sebastianv650
8190483eeb Improvement for ENSURE_SMOOTH_MOVES
Instead of waiting for a single long block, compare the complete block
buffer runtime for the long_move() check.
2016-11-21 17:58:24 +01:00
esenapaj
da67037550 Fix for thePR #5267 (Introduce a +1234.56 format for over 999 steps/mm)
・Fix memory leak
2016-11-21 22:31:01 +09:00
Scott Lahteine
0f891e848b Merge pull request #5268 from esenapaj/Update-Japanese-translation
Update Japanese translation
2016-11-21 03:18:36 -06:00
Scott Lahteine
c91325e904 Merge pull request #5267 from esenapaj/Introduce-a-+1234.56-format
Introduce a +1234.56 format for over 999 steps/mm
2016-11-21 03:17:52 -06:00
esenapaj
190a04c467 Update Japanese translation
・Change translation for 16 width LCD
2016-11-21 17:51:43 +09:00
esenapaj
7b836a4000 Introduce a +1234.56 format for over 999 steps/mm 2016-11-21 17:45:07 +09:00
Scott Lahteine
76f47aebb6 Travis test TMC2130 options 2016-11-21 00:52:19 -06:00
Scott Lahteine
3e0376b45e Reorder M114 and M119 gcode cases 2016-11-21 00:52:19 -06:00
Scott Lahteine
644fac5d34 Reduce all stepper_indirection init code with macros 2016-11-21 00:52:18 -06:00
Scott Lahteine
4e4f37b6c2 Code formatting for TMC and L6470 config options 2016-11-21 00:52:18 -06:00
Scott Lahteine
127e21ae00 Extend M122 for all steppers 2016-11-21 00:52:18 -06:00
Scott Lahteine
bf5f5f44cc Make TMC2130 init code auto-configure
Simply apply enabled settings instead of requiring users to edit
stepper_indirection.cpp
2016-11-21 00:52:17 -06:00
Moritz
d67c1d825f Add TMC2130 support 2016-11-21 00:17:45 -06:00
Scott Lahteine
11effeee2c Add an option for delta to home to the top 2016-11-20 23:12:07 -06:00
Sebastianv650
50059690e0 Allow UART ISRs inside the stepper ISR
If the stepper ISR takes too long, chars are lost which leads to serial
communication errors like "Line number not +1" or "Wrong checksum". In
worst case, the printer can even do crazy moves.

With this changes, UART interrupts are handled inside the stepper ISR.
This way, no chars should be lost.
2016-11-20 13:09:12 +01:00
Scott Lahteine
8bf07684d2 Merge pull request #5256 from AnHardt/e-interrupts-2
Endstop interrupt refinement
2016-11-20 02:27:02 -06:00
Moshen Chan
29b174bfb9 Fix z feedrate value when doing mesh bed leveling. probe feedrate uses XY_PROBE_SPEED 2016-11-19 16:34:41 -08:00
AnHardt
88b38eafd8 Endstop interrupt refinement
At the start of a move, check if the endstops are already triggered.
The 'change' interrupts will not see a change if already triggered.
2016-11-19 13:30:49 +01:00
Scott Lahteine
79c8591192 Merge pull request #5253 from thinkyhead/rc_smooth_move_ex-lax
Ensure smooth print moves even with LCD enabled
2016-11-19 01:38:41 -06:00
Scott Lahteine
0215cacb30 Merge pull request #5247 from esenapaj/Re-follow-the-PR-#4634
Re-follow the PR #4634 (Set language display charset in language.h)
2016-11-19 01:32:40 -06:00
Scott Lahteine
2cc32d85a3 Adjust ENSURE_SMOOTH_MOVES coding style 2016-11-19 01:28:48 -06:00
Scott Lahteine
072541f286 Update ENSURE_SMOOTH_MOVES in all configs 2016-11-19 01:28:47 -06:00
Sebastianv650
de89dc9f04 Ensure smooth print moves even with LCD enabled
lcd_update can take so much time that the block buffer gets drained if
there are only short segments. This leads to jerky printer movements for
example in circles and a bad print quality.

This change implements a simple check: Only if the block currently
executed is long enough, run lcd_update.
This also means the printer will not show actual values on the LCD nor
will it respond to buttons pressed. A option that keeps the menu
accessible is also available.
Aditionaly, slow down if a block would be so fast that adding a new
block to the buffer would take more time. In this case, the buffer would
drain until it's empty in worst case.
2016-11-19 01:28:47 -06:00
Scott Lahteine
7b95918e84 Merge pull request #5251 from thinkyhead/rc_cmake_support
Added CMake support
2016-11-18 23:53:09 -06:00
Scott Lahteine
87b6b19256 Patch CASE_LIGHT typo 2016-11-18 23:49:12 -06:00
Scott Lahteine
0be6167f14 Merge pull request #5250 from CONSULitAS/RCBugFix_K8200_backinsync_2016-11-18
K8200: Example configuration back in sync
2016-11-18 22:49:18 -06:00
Scott Lahteine
de3eea920d Merge pull request #5252 from thinkyhead/rc_endstop_interrupt_followup
Endstop interrupts followup
2016-11-18 22:35:25 -06:00
Scott Lahteine
eb714ee873 Move dummy thermistor opts, fix redundant sensor comment 2016-11-18 22:24:48 -06:00
Scott Lahteine
7a99c6ce4f Reformat temp sensor listing 2016-11-18 22:24:47 -06:00
Scott Lahteine
181cdb3cfe Move GCode list above include lines 2016-11-18 22:24:46 -06:00
Scott Lahteine
25d0c167bd More detailed static_assert messages 2016-11-18 22:24:46 -06:00
Scott Lahteine
eb120e518c Followup to new endstop interrupts feature
- Fix typos, verbiage
- Fix naming of `setup_endstop_interrupts`
- Some formatting, indentation, spacing
2016-11-18 21:53:45 -06:00
Scott Lahteine
832fe284b4 Merge pull request #5184 from AnHardt/endstop_interrupts
Introduce endstop interrupts
2016-11-18 20:50:24 -06:00
tohara
f579ec2e7a Added CMake support 2016-11-18 20:18:34 -06:00
CONSULitAS
cbae44df64 K8200: Example configuration back in sync
Configuration.h: back in sync, new features configured
Configuration_adv.h: back in sync, new features configured
README.md: text updated
2016-11-18 22:55:02 +01:00
esenapaj
5db3738fe7 Re-follow the PR #4634 (Set language display charset in language.h) 2016-11-18 17:44:49 +09:00
Scott Lahteine
32247c1b80 Merge pull request #5244 from thinkyhead/rc_danish_nov_2016
Update to Danish language 10/11-2016
2016-11-18 01:29:25 -06:00
Scott Lahteine
6eb6f12c64 Patch up some language formatting 2016-11-18 01:16:58 -06:00
Bo Herrmannsen
8cffa60cc5 Update to Danish language 10/11-2016 2016-11-18 01:16:57 -06:00
Scott Lahteine
98600e1433 Minor stepper cleanup 2016-11-18 01:15:57 -06:00
Florian Heilmann
d08867986e Add autotemp capabilities to M104
This allows M104 to pass the F and B parameters to enable autotemp as well
2016-11-17 11:28:19 -06:00
Sebastianv650
c11b2bb777 Bugfix LIN_ADV
Advance has nothing todo with Z_AXIS, strange copy&paste error?
2016-11-17 11:28:19 -06:00
Scott Lahteine
ee0765e872 Merge pull request #5233 from esenapaj/Update-Japanese-translation
Update Japanese translation
2016-11-17 03:38:19 -06:00
Scott Lahteine
2330619da0 Merge pull request #5191 from petrzjunior/const
Replace const bool with #define for consistency
2016-11-17 03:37:32 -06:00
esenapaj
b278b7a395 Update Japanese translation
Only adjust spacing
2016-11-17 09:05:51 +09:00
Petr Zahradník junior
d7ce5d271b Replace const bool with #define for consistency 2016-11-16 18:55:21 +01:00
Scott Lahteine
d63230d73e Merge pull request #5192 from Kaibob2/patch-7
Printer Stats / Completed prints line doesn't fit in display (when german)
2016-11-16 00:16:36 -06:00
Scott Lahteine
548b45026d Merge pull request #5214 from Sebastianv650/RCBugFix_planner_opt
Save some cycle inside the planner
2016-11-16 00:06:55 -06:00
Scott Lahteine
5d23e52d75 Merge pull request #5228 from thinkyhead/rc_keep_last_mix
Fix DIRECT_MIXING_IN_G1 to preserve the previous mix
2016-11-15 19:12:01 -06:00
Scott Lahteine
db47aa983d Merge pull request #5226 from mtowara/RCBugFix
bump -std in Makefile to c++11
2016-11-15 16:13:32 -06:00
Scott Lahteine
99b0c1fe56 Fix DIRECT_MIXING_IN_G1 to preserve the previous mix 2016-11-15 16:12:26 -06:00
Scott Lahteine
a0aad8d686 Merge pull request #5224 from thinkyhead/rc_limit_G30_xy
Fix G30 with limits, print correct probe XY
2016-11-15 15:20:12 -06:00
Markus Towara
23a675f621 reduce binary size of .hex
still a few bytes bigger than with arduino but nothing major
2016-11-15 21:57:15 +01:00
Markus Towara
5b6e2cecf5 bump c/c++ standard to gnu11
needed for constexpr
2016-11-15 21:54:12 +01:00
Scott Lahteine
410657b050 Fix G30 with limits, print correct probe XY 2016-11-15 14:10:28 -06:00
AnHardt
f3eee02596 Introduce endstop interrupts
If ENDSTOP_INTERRUPTS_FEATURE is enabled this tries to set up interrupt routines
for all used endstop pins. If this worked without errors, `endstops.update()` is called
only if one of the endstops changed its state.

The new interrupt routines do not really check the endstops and react upon them. All what they
do, is to set a flag if it makes sense to call the endstop test we are used to.

This can be used on:
* ARM (DUE) based boards - all pins can raise interrupts,
* RAMPS - all 6 endstop pins plus some other on EXT-2 can raise interrupts,
* RAMPS based boards - as long the designers did not change the pins for the endstops or at least left enough,
* all boards, if there are enough pins that can raise interrupts, and you are willing/able to swap with pins dedicated to other purpose.
2016-11-15 12:07:41 +01:00
Sebastianv650
e3ffb58fbd Save some cycle inside the planner
planner.h:
fan speed is used to set integer variables, so no need for long.
Basicaly a byte should be enough for all the fan things, as it's 0-255?

planner.cpp:
Save some float multiplications.
We could squeeze out even more by defining feedrate_percentage,
saved_feedrate_percentage and flow_percentage as float instead of int.
Everytime they are used in the time-critical planner, they are casted to
float and multiplied by 0.01. Not done jet, as they are used in LCD menu
functions I don't know well enough.
2016-11-13 13:34:12 +01:00
Scott Lahteine
665b7f3893 Merge pull request #5212 from thinkyhead/rc_mixing_faster
Store mix factors as reciprocals and multiply
2016-11-12 18:47:11 -06:00
Scott Lahteine
60cc9342a4 Merge pull request #5188 from thinkyhead/rc_extended_host_support
Extended host support: M155 Auto temp report, M115 capabilities
2016-11-12 15:38:06 -06:00
Scott Lahteine
f663220e87 Store Mix factors as reciprocals and multiply 2016-11-12 15:19:18 -06:00
Scott Lahteine
ea3c08d249 Merge pull request #5186 from esenapaj/Follow-up-the-PR-#5167-etc
Follow up the PR #5167 (Add Turkish Language) again, etc
2016-11-12 13:11:54 -06:00
Scott Lahteine
c488378532 Merge pull request #5205 from Sebastianv650/RCBugFix_stepperpatch
Remove useless line from stepper ISR
2016-11-12 12:43:07 -06:00
Scott Lahteine
7972378828 Merge pull request #5209 from floyd871/RCBugFix
Megatronics 3.0 has no SD-Card detect
2016-11-12 12:42:02 -06:00
Michael Neumann
8bdf303da0 Update pins_MEGATRONICS_3.h 2016-11-12 12:26:07 +01:00
Michael Neumann
3890366c83 Update pins.h 2016-11-12 12:25:45 +01:00
Michael Neumann
c0d45ca7f2 Update boards.h 2016-11-12 12:24:47 +01:00
Sebastianv650
cdc18f8c22 Remove useless line from stepper ISR
The flag is already set inside planner.get_current_block(). Doing it
twice isn't making it better..
2016-11-11 19:35:03 +01:00
Kai
8e8b4398f3 Printer Stats / Completed prints line doesn't fit in display (when german) 2016-11-09 22:03:25 +01:00
Scott Lahteine
b31a07e261 Stateful M355 with separate P parameter 2016-11-09 03:28:18 -06:00
Scott Lahteine
c8d4cd35d8 Include more features in Travis testing 2016-11-09 02:32:59 -06:00
Scott Lahteine
3c9a838651 Extended capabilities report in M115 2016-11-09 02:32:58 -06:00
Scott Lahteine
68b866b5dd Add M155 - Auto-report temperature with interval 2016-11-09 02:32:58 -06:00
Scott Lahteine
68b46fb2c9 Allow send to i2c address 0 (broadcast) 2016-11-08 17:54:55 -06:00
Scott Lahteine
75bfde9945 M155=>M260, M156=>M261 2016-11-08 17:54:54 -06:00
esenapaj
2ae72b0491 Follow up the PR #5167 (Add Turkish Language) again, etc
・Update forgotten K8400\Dual-head\Configuration.h
・Adjust spacing
2016-11-09 06:31:21 +09:00
Scott Lahteine
06f2282f82 Merge pull request #5176 from thinkyhead/rc_filchange_feedback
Give instant feedback for filament change
2016-11-07 12:11:54 -06:00
Scott Lahteine
dcfd7c69e8 Merge pull request #5163 from nzinov/RCBugFix
Improve G30 probing command - add optional arguments
2016-11-07 11:37:13 -06:00
Scott Lahteine
e765eebfb0 Patch spacing in bilinear grid report 2016-11-07 04:08:25 -06:00
Scott Lahteine
7780052fb3 Give instant feedback for filament change 2016-11-07 03:48:16 -06:00
Scott Lahteine
de6f2ef2a3 Merge pull request #5171 from esenapaj/Follow-up-the-PR-#5167-etc
Follow up the PR #5167 (Add Turkish Language), etc
2016-11-07 00:05:44 -06:00
esenapaj
24e3f7abe7 Update Turkish translation
・Add new translation
2016-11-07 04:59:18 +09:00
esenapaj
be48792e9c Follow up the PR #5167 (Add Turkish Language), etc
・Remove all the #ifndef
・Follow the PR #4603 (Strip never-translated strings from language
files)
・Follow the PR #4634 (Set language display charset in language.h)
・Follow the PR #4936 (Put max_jerk vars in array, clean up jerk code)
・Adjust spacing
2016-11-06 23:59:02 +09:00
Scott Lahteine
1864b282c5 Implement reversed CORE options 2016-11-05 23:47:51 -05:00
Scott Lahteine
e3c8318504 Add reversed CORE options 2016-11-05 23:47:46 -05:00
Scott Lahteine
5aee8d892c Merge pull request #5167 from thinkyhead/rc_turkish_squashed
Add Turkish Language
2016-11-05 21:31:34 -05:00
Rigid3D
2327764980 Add Turkish Language 2016-11-05 21:06:16 -05:00
Nikolay Zinov
dea00bbcf1 improve G30 probing
Add optional parameters
X, Y for probe point
S sets stowing on and off
2016-11-05 13:22:45 +03:00
Scott Lahteine
1614c9d207 Merge pull request #5155 from thinkyhead/rc_core_babystepping
BABYSTEPPING-oriented cleanup
2016-11-03 23:46:04 -05:00
Scott Lahteine
00662b8635 Minor babystep cleanup patches 2016-11-03 23:31:45 -05:00
Scott Lahteine
cad792e702 Reduce code for invariant lcd_detected 2016-11-03 23:31:45 -05:00
Scott Lahteine
b23d255491 Move macros above Stepper::babystep 2016-11-03 23:31:45 -05:00
Scott Lahteine
cc57d46158 Fix set_position for CoreYZ 2016-11-03 23:31:45 -05:00
Scott Lahteine
0269347682 Merge pull request #5141 from thinkyhead/rc_old_slowdown_what
OLD_SLOWDOWN does nothing, so remove it
2016-11-03 23:30:43 -05:00
Scott Lahteine
e92e2b2446 Merge pull request #5144 from Sebastianv650/RCBugFix_LIN_ADV_wipe
Account for wipe moves
2016-11-03 23:19:25 -05:00
Scott Lahteine
28a039c0e1 Merge pull request #5154 from thinkyhead/rc_bilinear_splits
Don't define bilinear_line_to_destination on kinematic setups
2016-11-03 15:29:31 -05:00
Scott Lahteine
176aeafc19 Don't define bilinear_line_to_destination on kinematic setups 2016-11-03 14:10:07 -05:00
Sebastianv650
d448500643 Account for moves with negative E movements
Added a rule so that LIN_ADVANCE isn't used for moves with negative E movements (de_float will be negative in this cases).
I also added a more detailed comment to make it more clear what the if statement does.
2016-11-03 17:01:17 +01:00
Scott Lahteine
2185973e39 Merge pull request #5150 from thinkyhead/rc_bilinear_splits
Corrections to bilinear_line_to_destination
2016-11-03 04:54:39 -05:00
Scott Lahteine
236853df22 Corrections to bilinear_line_to_destination
- Allow more than 9x9 probe points
- Account for the probe starting position
2016-11-03 04:43:59 -05:00
Scott Lahteine
3b6a43f7ad Merge pull request #5148 from thinkyhead/rc_dual_tool_z_limit
Fix Z raise with DXC_AUTO_PARK_MODE
2016-11-02 21:52:44 -05:00
Scott Lahteine
0115e495fe Fix up Dual X switch blocks 2016-11-02 21:38:50 -05:00
Scott Lahteine
2495ab7af2 Make dual_x_carriage_mode an enumeration 2016-11-02 21:38:49 -05:00
Scott Lahteine
d6c36f5bb9 Fix Z raise with DXC_AUTO_PARK_MODE 2016-11-02 21:36:50 -05:00
Scott Lahteine
0c79553fc5 Cast int to AxisEnum for some accessors 2016-11-02 17:42:24 -05:00
Scott Lahteine
adbf1f7dca Add M355 to the GCodes list. 2016-11-02 16:43:52 -05:00
Scott Lahteine
63efc10599 Merge pull request #5134 from thinkyhead/rc_bilinear_split_lines
Split cartesian moves on grid boundaries with bilinear ABL
2016-11-02 16:14:55 -05:00
Scott Lahteine
12167bc8f3 OLD_SLOWDOWN does nothing, so remove it 2016-11-02 01:28:19 -05:00
Scott Lahteine
1ee0fdcad7 Merge pull request #5140 from esenapaj/Follow-up-the-PR-#5089
Follow-up the PR #5089 (Centralize click-handling in the LCD loop)
2016-11-02 01:13:56 -05:00
esenapaj
c8c1a28f6f Follow-up the PR #5089 (Centralize click-handling in the LCD loop)
bool feedback is no longer used
2016-11-02 08:36:02 +09:00
Scott Lahteine
b0be2e41ff Merge pull request #5136 from esenapaj/Follow-up-the-PR-#5133
Follow-up the PR  #5133 (M355 Case light)
2016-11-01 11:04:48 -05:00
esenapaj
c3a105186d Follow-up the PR #5133 (M355 Case light)
・Add CASE_LIGHT_PIN into pinsDebug.h
2016-11-02 00:31:50 +09:00
Scott Lahteine
ee5b8d6dc8 Split moves on grid boundaries with bilinear ABL on cartesian 2016-11-01 08:25:47 -05:00
Scott Lahteine
66744a6076 Merge pull request #5133 from thinkyhead/rc_M355_case_light
M355 Case light
2016-11-01 07:51:27 -05:00
Scott Lahteine
955d14acb0 Patch photo pin code style 2016-11-01 06:30:14 -05:00
Stanley
ab3f966f5f Case light G-code M355
implemented G-Code M355 into Marlin
2016-11-01 06:30:14 -05:00
Scott Lahteine
8b44413498 Merge pull request #5124 from Sebastianv650/RCBugFix_LIN_ADV-Patch
BugFix for incorrect E-speed calculation
2016-11-01 05:13:17 -05:00
Scott Lahteine
f418e82b15 Remove redundant definition of EN_C 2016-11-01 05:10:07 -05:00
Sebastianv650
f9bea7968f BugFix for incorrect E-speed calculation
The extrusion speed was wrong due to a not high enough precision of
esteps to XY steps, therefore now the target float values are used to
calculate the ratio between XY movement and extrusion speed.
The e_speed_multiplier8 was replaced by an absolute multiplier called
abs_adv_steps_multiplier8, therefore one multiplication and bitshift can
be saved inside the stepper ISR. Due to this, also extruder_advance_k is
better suited inside the planner and not the stepper files any more.
2016-11-01 08:08:47 +01:00
Scott Lahteine
9c108aea18 Merge pull request #5132 from thinkyhead/rc_fix_M43
Followup to #5118 - pins debugging cleanup
2016-11-01 02:05:21 -05:00
Bob-the-Kuhn
c20b4098be 2 bug fixes & some minor changes
see detailed  description in PR #5118
2016-11-01 01:29:41 -05:00
Scott Lahteine
fa6bf12697 Merge pull request #5118 from thinkyhead/rc_expanded_M43
Enhancements to M43 pins debugging
2016-10-31 08:29:53 -05:00
Scott Lahteine
3a107e280d Developer note in pins_MIGHTYBOARD_REVE.h 2016-10-31 08:22:39 -05:00
Scott Lahteine
85e307dcd8 No FAN0_PIN 2016-10-31 08:08:03 -05:00
Scott Lahteine
ff3a8ca0d1 Use NUM_DIGITAL_PINS instead of custom DIO_COUNT 2016-10-31 08:08:03 -05:00
Scott Lahteine
04a1fac029 Some cleanup to M43 2016-10-31 08:08:03 -05:00
Scott Lahteine
24f6612551 Reduce and optimize endstop_monitor code 2016-10-31 08:08:03 -05:00
Scott Lahteine
b4444e91ae Reduce code and build size of PWM_details 2016-10-31 08:08:02 -05:00
Scott Lahteine
dbe414ef03 Squash redundant code in PWM_status 2016-10-31 08:08:02 -05:00
Scott Lahteine
af26d22741 Clean up some spacing and semantics 2016-10-31 08:08:02 -05:00
Bob-the-Kuhn
81397d7a9a EXTRUDER_x_AUTO_FAN name change to Ex_AUTO_FAN
I stumbled across a name change that'll be used a lot so I'm updateing
the name list.
2016-10-31 08:08:02 -05:00
Bob-the-Kuhn
c7f1f0dae6 Add endstop monitor & make pins report pretty 2016-10-31 08:08:02 -05:00
Scott Lahteine
d567b426d5 Merge pull request #4894 from thinkyhead/rc_mightyboard_rev_e
Mightyboard Revision E preliminary support
2016-10-31 08:01:41 -05:00
Scott Lahteine
43df9ace4e Merge pull request #5110 from thinkyhead/rc_z2_min_allowed
Support Z2 min in M119 report
2016-10-31 07:59:45 -05:00
Scott Lahteine
8a4c51f313 Merge pull request #5115 from thinkyhead/rc_buffer_line_wait_later
Optimize buffer_line by calculating before wait-for-free-block
2016-10-30 16:46:18 -05:00
Scott Lahteine
23f05f8be7 Use bit-length types in block_t 2016-10-30 16:16:29 -05:00
Scott Lahteine
8dc7807d85 Add support for CoreYZ to planner.buffer_line 2016-10-30 16:16:28 -05:00
Scott Lahteine
1cf878fdb1 Calculate dm and e-steps earlier in planner 2016-10-30 16:16:28 -05:00
Scott Lahteine
75dbb71dd7 Replace block.busy with a block.flag bit 2016-10-30 16:16:28 -05:00
Scott Lahteine
c7f22f688f buffer_line can calculate while it's waiting 2016-10-29 17:08:42 -05:00
Scott Lahteine
3c3fe1a1ba Merge pull request #5089 from thinkyhead/rc_break_m1_fix
Centralize click-handling in the LCD loop
2016-10-29 16:07:08 -05:00
Scott Lahteine
f3720f4e81 const arguments to test_dual_z_endstops 2016-10-29 16:01:27 -05:00
Scott Lahteine
8cebd2a7db Arrange Z2 min before Z2 max 2016-10-29 01:54:19 -05:00
Scott Lahteine
accabf088a Add support for Z2 min endstop to M119 2016-10-29 01:54:02 -05:00
Scott Lahteine
396434a445 Fix compiler warning in M145 2016-10-28 20:57:36 -05:00
Scott Lahteine
8e787304c9 const float ref args in planner.h 2016-10-28 20:57:36 -05:00
Scott Lahteine
07bfc45df8 Adjust spacing in gcode_M149 2016-10-28 20:57:36 -05:00
Scott Lahteine
1a2310c494 Make LCD preheat vars an array to reduce code size 2016-10-28 20:57:36 -05:00
Scott Lahteine
1226ae1912 Some cleanup in ultralcd.h 2016-10-28 20:57:21 -05:00
Scott Lahteine
50ee749082 Centralize click-handling in the LCD loop 2016-10-28 20:57:21 -05:00
Scott Lahteine
47ad97c35e Merge pull request #5109 from thinkyhead/rc_eeprom_M218_tool_offset
Save hotend_offset array (M218) in EEPROM
2016-10-28 20:08:29 -05:00
Scott Lahteine
d095c7933b Merge pull request #5108 from MagoKimbra/Fix_M420
Fix Command M420
2016-10-28 19:23:40 -05:00
Scott Lahteine
bff6bbdb12 Indentation in configuration_store.cpp 2016-10-28 18:55:42 -05:00
Scott Lahteine
97115d56f9 Print error for M500 with disabled EEPROM 2016-10-28 18:53:48 -05:00
Scott Lahteine
67ab54185b Save hotend_offset array (M218) in EEPROM 2016-10-28 18:45:23 -05:00
MagoKimbra
dfcdbb437b Fix Command M420 2016-10-28 20:53:48 +02:00
Scott Lahteine
c34dbfb248 Merge pull request #5072 from thinkyhead/rc_preset_auto_fans
Add predefined AUTO_FAN_PINs to pins files
2016-10-27 17:12:11 -05:00
Scott Lahteine
1e00f5a4bd Merge pull request #5097 from thinkyhead/rc_fix_endstop_issue
Don't trigger endstops that are actually Z2 or probe
2016-10-27 08:32:48 -05:00
Scott Lahteine
9a23f73765 Don't trigger endstops that are actually Z2 or probe 2016-10-27 08:12:17 -05:00
Scott Lahteine
c07cc9e3f1 Revert changes made to z dual endstop test
#3631 broke z dual endstops. Solved by @Nocturnal42 in https://github.com/MarlinFirmware/Marlin/issues/5078#issuecomment-256572248
2016-10-27 07:41:39 -05:00
Scott Lahteine
c4c53856a4 Merge pull request #5094 from esenapaj/Fix-for-the-PR-#5088
Fix for the PR #5088 (Handle M108 in M1 also with ULTIPANEL)
2016-10-26 21:51:18 -05:00
Scott Lahteine
2e3110539b Merge pull request #5095 from thinkyhead/rc_fix_bilinear_math
Fix bilinear grid constraints
2016-10-26 21:48:19 -05:00
Scott Lahteine
4ec7ed554d Merge pull request #5093 from esenapaj/Follow-up-the-PR-#5087-etc
Follow-up the PR #5087 (Fixed SERVO pins on Azteeg X3), etc
2016-10-26 21:23:34 -05:00
esenapaj
d5a5042d23 Fix for the PR #5088 (Handle M108 in M1 also with ULTIPANEL) 2016-10-27 10:32:20 +09:00
Scott Lahteine
9cbedab91b Use DPM where possible 2016-10-26 18:38:32 -05:00
Scott Lahteine
ad38d91692 Sanity check that auto fan pins can do PWM 2016-10-26 18:38:32 -05:00
Scott Lahteine
95275eb9b3 Predefine auto fan pins in some pins files 2016-10-26 18:38:32 -05:00
Scott Lahteine
3f94b15cef Fix bilinear grid constraints
Followup to #5090
2016-10-26 18:11:26 -05:00
Scott Lahteine
d439fb95f7 Sanity check for the renamed options 2016-10-26 17:51:26 -05:00
Scott Lahteine
b6aa894893 Rename auto fan pins and add auto fan flags 2016-10-26 17:51:26 -05:00
Scott Lahteine
ada935de87 Allow TEMP_STAT_LEDS with only one LED defined 2016-10-26 17:51:26 -05:00
Scott Lahteine
4b056d8184 Fix warning in ultralcd.cpp 2016-10-26 17:51:26 -05:00
Scott Lahteine
9dfd029911 Fix bug in fastio.h _GET_TIMER 2016-10-26 17:51:25 -05:00
esenapaj
8b1d90e281 Follow-up the PR #5087 (Fixed SERVO pins on Azteeg X3), etc
・Add header
・Adjust spacing
2016-10-27 06:46:03 +09:00
Scott Lahteine
bfd3b3c604 Merge pull request #5087 from Fulg/azteeg-x3-pins
Fixed SERVO pins on Azteeg X3
2016-10-26 06:01:16 -05:00
Scott Lahteine
208d720614 Merge pull request #5082 from Fulg/RCBugFix
Only issue MAXTEMP when heating
2016-10-26 05:55:33 -05:00
Scott Lahteine
b5d9639dd0 Merge pull request #5090 from thinkyhead/rc_fix_bilinear_math
Fix for bilinear grid outside bounds
2016-10-26 05:45:17 -05:00
Scott Lahteine
f0d673561f Fix for bilinear grid outside bounds 2016-10-26 05:00:03 -05:00
Scott Lahteine
24bcea6c02 Merge pull request #5088 from thinkyhead/rc_break_m1_fix
Handle M108 in M1 also with ULTIPANEL
2016-10-26 00:44:01 -05:00
Scott Lahteine
1ba1ec0db9 Handle M108 in M1 also with ULTIPANEL 2016-10-25 23:25:47 -05:00
Scott Lahteine
7ad33422e3 Clear dir_t size, not pointer size 2016-10-25 22:59:40 -05:00
Benoit Miller
1c716034ec Fixed SERVO pins on Azteeg X3 2016-10-25 17:11:26 -04:00
Benoit Miller
2aa12d78dc Only issue MAXTEMP when heating 2016-10-24 17:09:29 -04:00
Scott Lahteine
3fcf915808 Fix uninitialized var in reset_acceleration_rates 2016-10-24 11:55:41 -05:00
Scott Lahteine
14f824c3de Merge pull request #5071 from esenapaj/Extend-measuring-range-of-thermocouple
Extend measuring range of thermocouple for MAX31855
2016-10-24 02:00:12 -05:00
Scott Lahteine
1097a50694 Merge pull request #5070 from gcormier/rcbugfix
Fix #4995 - M48/G29 on CoreXY maybe others?
2016-10-24 00:56:36 -05:00
Scott Lahteine
fed6cfc5f5 Merge pull request #5074 from Sebastianv650/Accel_calc_v2
Planner acceleration bugfix and speedup v2
2016-10-23 16:42:57 -05:00
Sebastianv650
c397b9d60a Planner acceleration bugfix and speedup v2
.) Use already existing inverse_millimeters instead of /
block->millimeters.
.) Prevent overflow during acceleration calculation by checking if float
is necessary. Idea modified from Sailfish.
.) Save two uint32_t or even float multiplications by checking if
step[AXIS] has steps and if max acceleration is lower than accel. If
not, there is no need to check this axis.
2016-10-23 12:47:46 +02:00
Scott Lahteine
aa99bd8d13 Merge pull request #5068 from esenapaj/Fix-for-PR-#5066
Fix for the PR #5066 (Updated french translation)
2016-10-23 02:56:36 -05:00
esenapaj
70e287ca8c Extend measuring range of thermocouple for MAX31855 2016-10-23 10:22:39 +09:00
Greg Cormier
f0aed9dac7 Fix #4995 - M48/G29 on CoreXY maybe others? 2016-10-22 20:45:13 -04:00
esenapaj
e50992694f Fix for the PR #5066 (Updated french translation)
MSG_INFO_PRINT_TIME is still being used
2016-10-23 06:09:56 +09:00
Scott Lahteine
483082387c Merge pull request #5022 from esenapaj/Fix-for-the-PR-#4553
Fix for the PR #4553 (Save bytes for custom chars (Hitachi LCD))
2016-10-22 13:54:09 -05:00
Scott Lahteine
8b967a9ff0 Merge pull request #5058 from thinkyhead/rc_reverse_arrow_buttons
Apply encoder reverse options to keypad arrows
2016-10-22 13:52:35 -05:00
esenapaj
523c7eaa6c Fix for the PR #4553 (Save bytes for custom chars (Hitachi LCD)) 2016-10-23 03:29:00 +09:00
Scott Lahteine
ca48a49fdb Merge pull request #5065 from petrzjunior/transl
[LANGUAGE] Update Czech (BLTOUCH and DAC strings)
2016-10-22 12:46:10 -05:00
Scott Lahteine
f0744fc815 Merge pull request #5066 from thinkyhead/rc_french_update
Updated french translation
2016-10-22 12:45:51 -05:00
Gege2B
88b7f6eb46 Updated french translation 2016-10-22 12:30:22 -05:00
Scott Lahteine
3544c3632f Merge pull request #5062 from thinkyhead/rc_warnings_fix
Warnings fixed redux
2016-10-22 12:21:36 -05:00
Petr Zahradník junior
8323d78ed7 Translated BLTOUCH and DAC strings 2016-10-22 19:12:21 +02:00
Scott Lahteine
e151f952a3 Apply encoder reverse options to keypad arrows 2016-10-22 11:51:33 -05:00
Scott Lahteine
cfb47929ca Merge pull request #5060 from thinkyhead/rc_fix_ugly_code
Reduce, clean up MINTEMP / MAXTEMP test code
2016-10-22 11:27:30 -05:00
Josef Pavlik
dca50737f5 fixed warning: ISO C++ forbids compound-literals 2016-10-22 11:23:16 -05:00
Josef Pavlik
0bd66807b2 fixed warning: extra ; 2016-10-22 11:12:29 -05:00
Josef Pavlik
d35dc407a8 fixed warning: ISO C99 requires rest arguments to be used 2016-10-22 11:12:29 -05:00
Josef Pavlik
c2b51af3ba fixed warning: ISO C does not permit named variadic macros 2016-10-22 11:12:29 -05:00
Scott Lahteine
0d3fc7dd89 Merge pull request #5059 from gcormier/fixbaby
Set defer delay back to false when exiting babystepping.
2016-10-22 10:59:17 -05:00
Scott Lahteine
f888597197 Reduce, clean up code for mintemp/maxtemp tests 2016-10-22 10:31:03 -05:00
Scott Lahteine
ad64723354 Move MAX_EXTRUDERS to pins.h 2016-10-22 10:07:51 -05:00
Scott Lahteine
5f5a55a0de Add a ZERO macro to clear arrays 2016-10-22 10:07:18 -05:00
Greg Cormier
0009725637 Set defer delay back to false when exiting babystepping. 2016-10-22 09:43:30 -04:00
Scott Lahteine
627f9d5285 Merge pull request #5056 from thinkyhead/rc_lin_adv_opt
LIN_ADVANCE optimizations
2016-10-22 07:06:39 -05:00
Scott Lahteine
0908329d96 Merge pull request #5057 from thinkyhead/rc_mbl_lcd_logical
Fix manual leveling coordinates
2016-10-22 06:31:02 -05:00
Scott Lahteine
14e60f0d3b Correct typo in configs
As pointed out by #5044
2016-10-22 05:56:32 -05:00
Scott Lahteine
1165e83263 MBL coordinates are logical 2016-10-22 05:55:44 -05:00
Scott Lahteine
dbfabb4c0a Merge pull request #5043 from Kaibob2/patch-5
Correct grammar and translation in language_de.h
2016-10-22 05:52:54 -05:00
Scott Lahteine
b19bba275f No LCD timeout during babystepping
As requested in #5031
2016-10-22 05:26:07 -05:00
Scott Lahteine
b9109b2875 Improve LIN_ADVANCE commentary (all configs) 2016-10-22 05:03:09 -05:00
Sebastianv650
9818d97587 Fix Z-hops during retract/prime lead to blobs
We don't want to have retract/prime movements done with LIN_ADVANCE, that's also true with simultaneously executed Z-hops.
2016-10-22 04:54:59 -05:00
Sebastianv650
599649e45d Add formula for LIN_ADVANCE_K
With this formula, a start value for K for further fine-calibration can be calculated.
2016-10-22 04:54:59 -05:00
Scott Lahteine
be7d245eff Merge pull request #5008 from thinkyhead/test_endstop_hits
Save some PROGMEM in MBL G28
2016-10-22 03:35:52 -05:00
Scott Lahteine
7c0e52256d Merge pull request #5053 from thinkyhead/rc_fix_baud_config
Patch BAUDRATE line in configs
2016-10-22 03:27:45 -05:00
Scott Lahteine
2783dcb4cc Save some RAM in MBL's G29 2016-10-22 02:52:56 -05:00
Scott Lahteine
4f5a8c05d5 Tweaks to endstops macros 2016-10-22 02:52:56 -05:00
Scott Lahteine
083d41a2c2 Remove redundant estep rate code from LIN_ADVANCE
As noted by https://github.com/MarlinFirmware/Marlin/pull/4971#issuecomment-252503295
2016-10-22 02:19:14 -05:00
Scott Lahteine
4f6bfabaad Patch BAUDRATE line in configs 2016-10-22 00:48:52 -05:00
Kai
2bfedb74d5 Correct grammar and translation in language_de.h
Made Filament change Text sound like correct german.
2016-10-19 14:56:46 +02:00
Roxy-3D
8ddd039e68 Merge pull request #5037 from esenapaj/Fix-for-the-commit-dc2cb84
Fix for the commit dc2cb84 (Revert acceleration limiting to avoid overflow)
2016-10-18 15:33:06 -05:00
esenapaj
1e1edeadd3 Fix for the commit dc2cb84 (Revert acceleration limiting to avoid overflow)
・Add forgotten '\'
2016-10-18 18:07:20 +09:00
Scott Lahteine
dc2cb8454c Revert acceleration limiting to avoid overflow 2016-10-17 17:08:41 -05:00
Scott Lahteine
6ae5cf17a9 Merge pull request #5033 from esenapaj/Fix-freezing-with-MAX31855
Fix freezing and MINTEMP Error with MAX31855 thermocouple
2016-10-17 16:22:20 -05:00
Scott Lahteine
f257c4bcae Merge pull request #5036 from thinkyhead/rc_dac_code_deps
Fix DAC current code
2016-10-17 16:19:00 -05:00
Scott Lahteine
b80cc0cbb5 Fix DAC current code 2016-10-17 15:17:57 -05:00
esenapaj
385bd8a4a3 Fix freezing and MINTEMP Error with MAX31855 thermocouple 2016-10-16 07:33:14 +09:00
Scott Lahteine
ca7275a67a Disable EXTRAPOLATE_FROM_EDGE by default 2016-10-14 14:44:28 -05:00
Scott Lahteine
0921c7da84 Merge pull request #4997 from thinkyhead/rc_jerk_from_mk2
Adapt Jerk / Speed code from Prusa MK2
2016-10-12 06:38:50 -05:00
Scott Lahteine
4d89652bc2 Apply minor optimizations to planner.cpp 2016-10-12 04:42:15 -05:00
Scott Lahteine
1092319b19 Adapt speed/jerk code based on Prusa MK2 branch 2016-10-12 04:42:14 -05:00
Scott Lahteine
37643fef63 Merge pull request #4972 from bgort/platformio-improvements
Move platformio directories out of source tree
2016-10-12 03:42:33 -05:00
Scott Lahteine
8e1cc9332a Replace block flag bools with flag bits
…and apply const to some method parameters
2016-10-10 23:17:49 -05:00
Scott Lahteine
d41f2bdbd8 Merge pull request #4991 from thinkyhead/rc_max31855_fix
Patches for Stepper DAC and MAX31855
2016-10-10 20:12:06 -05:00
Scott Lahteine
d2da14459f Merge pull request #4993 from thinkyhead/rc_planner_deps
Sort out some header dependencies
2016-10-10 20:11:27 -05:00
Scott Lahteine
e7cf566fc5 Do kinematic segments with buffer_line_kinematic
This breaks the raw option, but in the future perhaps all planner moves
will be sent in raw form instead of logical.
2016-10-10 17:14:03 -05:00
Scott Lahteine
a10e81dc2a Minor cleanup of set_bed_leveling_enabled 2016-10-10 17:14:03 -05:00
Scott Lahteine
029824bc49 Patch ADJUST_DELTA macro for SCARA 2016-10-10 17:14:03 -05:00
Scott Lahteine
5ce5a9c822 Marlin: planner.h tweak 2016-10-10 17:14:03 -05:00
Scott Lahteine
d963020532 Sort out some header dependencies 2016-10-10 17:14:03 -05:00
Scott Lahteine
e17f9b8b99 DAC patches
As suggested by #4985
2016-10-10 14:08:04 -05:00
Scott Lahteine
2cb5df8a56 Merge pull request #4984 from esenapaj/Small-fix-for-PR-#4980
Small fix for the PR #4980 (LIN_ADVANCE bug fix and optimization)
2016-10-10 13:30:47 -05:00
Scott Lahteine
b6221df3f3 Merge pull request #4983 from MarlinFirmware/revert-4933-rc_drop_pid_func_range
Revert "Removal of PID functional range"
2016-10-10 13:29:54 -05:00
Scott Lahteine
a07033a6c1 Merge pull request #4974 from esenapaj/Follow-up-the-PR-#4955
Fix and follow-up the PR #4955 (PINS_DEBUGGING and M43: Read pin states), etc
2016-10-10 13:27:52 -05:00
Scott Lahteine
f8199b2cc1 Merge pull request #4982 from thinkyhead/rc_abl_bugfix
Fix planner with kinematics, delta ABL
2016-10-10 13:24:22 -05:00
esenapaj
f41c60d4a4 Follow-up the PR #4955, etc
・More ANALOG NUMBERING to Analog Input
・Add comment header to all the section of all the pins files

・Sort sections as follows:
1. Some special definitions (USBCON, LARGE_FLASH, etc)
2. Servos
3. Limit Switches
4. Z Probe
5. Steppers
6. Temperature Sensors
7. Heaters / Fans
8. Misc. Functions
9. LCD / Controller

・Move MAX6675_SS into "Temperature Sensors" section
・Adjust spacing
2016-10-10 14:22:43 +09:00
esenapaj
00456b0cb3 Fix compilation errors 2016-10-10 14:22:43 +09:00
esenapaj
cfb5c24bc9 Small fix for the PR #4980 (LIN_ADVANCE bug fix and optimization)
・Fix a comment about timer
2016-10-10 07:48:42 +09:00
Scott Lahteine
149b8d9e4b Handle MAX31855 error conditions 2016-10-09 17:12:50 -05:00
Scott Lahteine
f4ec265363 Fix a typo 2016-10-09 16:45:29 -05:00
Scott Lahteine
4ec2d459e6 Fix mcp4728_setVref_all as followup to #4967 2016-10-09 16:45:00 -05:00
Scott Lahteine
1e551c0688 Revert "Squashed - Removal of PID functional range" 2016-10-09 16:27:45 -05:00
Scott Lahteine
4037df82b0 Merge pull request #4981 from esenapaj/Update-Japanese-language
Update Japanese translation, etc
2016-10-09 16:11:53 -05:00
Scott Lahteine
e4e290d957 Make EXTRUDER_RUNOUT_PREVENT kinematic compatible 2016-10-09 15:58:33 -05:00
Scott Lahteine
847429eff4 Make tool_change kinematic compatible 2016-10-09 15:58:32 -05:00
Scott Lahteine
a4a7ca10ca Make USE_DELTA_IK_INTERPOLATION compatible with ABL 2016-10-09 15:58:32 -05:00
Scott Lahteine
c5cac486f5 Use a, b, c instead of lx, ly, lz 2016-10-09 14:34:24 -05:00
Scott Lahteine
bbeaca5839 Merge pull request #4980 from thinkyhead/rc_lin_update
LIN_ADVANCE bug fix and optimization
2016-10-09 14:29:09 -05:00
Josef Pavlik
f8c2473a71 Improve planner kinematics, fix delta ABL 2016-10-09 13:32:46 -05:00
Scott Lahteine
48761f2021 Patch delta endstop adjustment config 2016-10-09 13:32:45 -05:00
Josef Pavlik
28d41b48e3 delta endstop adjustment configurable 2016-10-09 13:09:34 -05:00
Scott Lahteine
ff6b23cb0f Fix an issue with shifted LCD lines 2016-10-09 13:00:00 -05:00
Scott Lahteine
e4d2662d81 Use some macros in M48 2016-10-09 12:21:05 -05:00
Scott Lahteine
3752d9aca8 Fix timer comments 2016-10-09 12:11:00 -05:00
Sebastianv650
a448cedbc5 LIN_ADVANCE bug fix and optimization
.) long to int: Extruder stalls at 10kHz / 20kHz step limits with long.
.) Take the delta_adv_steps calculation out of the step_loops loop. Wasted calculation performance if done inside.
.) >> 2 replaced by 3: Is divide by 8. Reason: Timer 0 runs at 16/8=2MHz, Timer 1 at 16/64=0.25MHz. ==> 2/0.25=8.
2016-10-09 11:55:02 -05:00
esenapaj
b27080c1dd Update Japanese translation
・Add new translation
2016-10-10 01:52:51 +09:00
esenapaj
0780146034 Move DAC section from inside of the changing filament section 2016-10-10 01:17:46 +09:00
Scott Lahteine
fc93796e42 Merge pull request #4967 from thinkyhead/rc_dac_menu
Revised DAC Drive Strength Menu
2016-10-09 00:52:48 -05:00
Brian
9c0404eae4 Move platformio directories out of source tree 2016-10-08 13:45:26 -04:00
Scott Lahteine
a1b50f1102 Cleanup of code style 2016-10-07 15:57:24 -05:00
jaysonkelly
13c9dcc600 Add LCD menu for DAC 2016-10-07 15:13:03 -05:00
Scott Lahteine
00261cbfcb Merge pull request #4933 from thinkyhead/rc_drop_pid_func_range
Squashed - Removal of PID functional range
2016-10-07 15:07:55 -05:00
Scott Lahteine
ee01def16d Merge pull request #4955 from thinkyhead/rc_debug_pins
PINS_DEBUGGING and M43: Read pin states
2016-10-07 14:47:34 -05:00
Scott Lahteine
a0df34fd4c Add PINS_DEBUGGING advanced config option 2016-10-07 14:20:13 -05:00
Scott Lahteine
e21bab5243 PINS_DEBUGGING and M43 Read Pins 2016-10-07 14:11:48 -05:00
Scott Lahteine
3c97fa6e29 Merge pull request #4963 from esenapaj/Fix-for-advance-algorithm
Move routine of direction signal of ADVANCE and LIN_ADVANCE from Stepper::isr() to Stepper::advance_isr()
2016-10-07 00:33:42 -05:00
Scott Lahteine
48e63c4730 Comment some globals 2016-10-06 22:06:33 -05:00
Scott Lahteine
9a6c66602f Fix formatting of extrapolate debug output 2016-10-06 17:04:22 -05:00
Scott Lahteine
cd77eb5c40 Clear grid for bilinear G29 2016-10-06 17:00:53 -05:00
Scott Lahteine
53a0856f5c Print Y as int in print_bed_level 2016-10-06 16:46:54 -05:00
esenapaj
f8df88f271 Move routine of direction signal of ADVANCE and LIN_ADVANCE from Stepper::isr() to Stepper::advance_isr() 2016-10-07 02:01:29 +09:00
Roxy-3D
30fee51e86 Merge pull request #4958 from bgort/m48_improvements
Improve M48 output; Add min, max, range, etc.
2016-10-06 10:02:22 -05:00
Brian
357854a7ef tweak variables; 2016-10-05 19:49:05 -04:00
Brian
48cf19151a Improve M48 output; Add min, max, range, etc. 2016-10-05 16:09:39 -04:00
Scott Lahteine
c63cb45268 Fix thermal runaway timeout 2016-10-05 08:42:39 -05:00
Scott Lahteine
e6164d254d Clean up GCode command short comments 2016-10-05 06:13:30 -05:00
Scott Lahteine
47bd142b29 Should marlinAnalogInputToDigitalPin use analogInputToDigitalPin? 2016-10-05 06:13:30 -05:00
Scott Lahteine
bd8520e61d Label analog pins in a similar way
Some other pins formatting also
2016-10-05 06:13:30 -05:00
Scott Lahteine
0c0deb5194 Common pin_is_protected function 2016-10-05 04:41:27 -05:00
Scott Lahteine
49d77720d5 More support for 4th extruder or heater 2016-10-05 04:40:22 -05:00
Scott Lahteine
9dd56e61bd Merge pull request #4954 from thinkyhead/rc_more_debug_homing
Fix buzzer when both i2c and beeper pin are set
2016-10-05 03:39:47 -05:00
Scott Lahteine
46839c222a Comment and clean up some vars 2016-10-04 23:40:45 -05:00
Scott Lahteine
8910bb7c97 Fix buzzer conditional compile 2016-10-04 21:38:41 -05:00
Scott Lahteine
de7e798e6f Replace single-char S_ECHOs with S_CHAR 2016-10-04 21:38:41 -05:00
Scott Lahteine
0e83f34174 Tweak debugging of probe_pt 2016-10-04 21:38:00 -05:00
Scott Lahteine
cc02f6edf8 Merge pull request #4943 from esenapaj/Small-update-of-language_kana_h
Small update of language_kana.h
2016-10-04 03:21:57 -05:00
Scott Lahteine
ca26011e3c Merge pull request #4941 from MagoKimbra/rc_fix_M205
Add note for M205
2016-10-04 03:21:20 -05:00
Scott Lahteine
9485aa8f13 Include negative Z probe offset in clearance move 2016-10-03 16:18:04 -05:00
Scott Lahteine
5c1eb595e6 Fix for G2/G3 negative radius
As suggested in #4940
2016-10-03 14:48:44 -05:00
esenapaj
f09ae96f28 Small update of language_kana.h 2016-10-03 23:41:39 +09:00
MagoKimbra
7b37539fe7 Add note for M205 2016-10-03 08:54:15 +02:00
Scott Lahteine
d5f598cd82 Tweak probe debug, add newline 2016-10-02 17:35:40 -05:00
Scott Lahteine
c592ccb6f5 Patch max_jerk[Z] menu item 2016-10-02 10:12:47 -05:00
Scott Lahteine
d80a79eb77 Use right-shift instead of / 2, why not? 2016-10-02 07:01:40 -05:00
Rerouter
02fe9cf558 Removal of functional range constraint
Also lined up the >> 1 and / 2 mentioned earlier in the unconstrained I term issue,
2016-10-02 07:01:40 -05:00
Rerouter
5f5d87cad3 Update Configuration.h 2016-10-02 07:01:40 -05:00
Scott Lahteine
6abfc96165 Merge pull request #4936 from thinkyhead/rc_more_debug_homing
Put max_jerk vars in array, clean up jerk code
2016-10-02 06:54:54 -05:00
Scott Lahteine
761593b74b Cleanup some vars, use of min/max 2016-10-02 06:34:56 -05:00
Scott Lahteine
d19cfcfc1d max_jerk array, DEFAULT_XYJERK => DEFAULT_[XY]JERK 2016-10-02 06:34:56 -05:00
Scott Lahteine
911f7e436c Merge pull request #4934 from thinkyhead/rc_more_debug_homing
More detailed debugging of G28 delta
2016-10-02 03:17:58 -05:00
Scott Lahteine
e7dc174f30 More detailed debugging of G28 delta 2016-10-02 02:18:57 -05:00
Scott Lahteine
473f4a17a8 Merge pull request #4914 from Rerouter/PID-Unconstrained-Itemp
Pid unconstrained itemp
2016-10-01 06:58:07 -05:00
Scott Lahteine
bad8899ebc Merge pull request #4900 from thinkyhead/rc_g38_changes
Cleanup of G38.2 / G38.3
2016-10-01 06:57:17 -05:00
Scott Lahteine
73ce3a61c7 Cleanup, comment zigzag 2016-10-01 05:21:52 -05:00
Scott Lahteine
0d538f3db6 Add to all configurations 2016-10-01 05:00:53 -05:00
Scott Lahteine
919fe3e4b8 Rename feature to G38_PROBE_TARGET 2016-10-01 05:00:53 -05:00
Scott Lahteine
a2864ab7fe Patched up, cleaned up 2016-10-01 05:00:53 -05:00
Bob-the-Kuhn
2911aa7ffa code changes to implement G38 commands
1) modified 3 code files
Marlin.h
Marlin_main.cpp
endstops.cpp

2) modified config files so I could test on my machine

Testing was done on an AzteegX3pro based machine.

The probe was hooked to the Z_MIN endstop.

My controller doesn't have a dedicated Z_PROBE input so I couldn't test
that functionality.

Verified that a large file (without any G38 commands) executed the same
before and after the changes.

Verified that the head moves as expected when G38.2 and G38.3 commands
are issued. Single & multiple axis moves were tested along with + and -
directions.

Code was added to the main ISR. In normal operation only one extra IF
statement is evaluated. I didn't notice any performance degradation
because of the added code.

The G38 commands are expected to be issued manually by the operator
during machine setup. The G38 commands wait until the machine is idle
before proceeding. That way the other commands are minimally impacted
by the extra ISR overhead when a G38 command is in the queue.

The G38 commands are very similar to the G28 commands except 1) only the
Z_PROBE is used and movement can be in the + or - direction.

See issue 4677 for a discussion on adding G38 commands to Marlin.
Feature request: add ability to use G38.2 command (CNC)
MarlinFirmware/Marlin#4677
2016-10-01 05:00:53 -05:00
Scott Lahteine
74d048e77e Merge pull request #4927 from thinkyhead/rc_bltouch_noraise
Don't check Z_MAX on raise when the probe pwns the pin
2016-10-01 04:52:56 -05:00
Scott Lahteine
4afa293289 Say "BLTOUCH" in machine info report 2016-09-30 17:13:27 -05:00
Scott Lahteine
ed7d2694fc Don't check Z_MAX on raise when the probe pwns the pin 2016-09-30 16:41:30 -05:00
Rerouter
638b809d90 Merge pull request #3 from thinkyhead/rc_unconstrain_pid
Apply changes to all configs
2016-09-30 17:41:32 +10:00
Scott Lahteine
3bbdd48a4d Merge pull request #4918 from thinkyhead/rc_abl_patchups
Fix up ABL - Add PROBE_Y_FIRST option. Arduino 1.6.8 required.
2016-09-29 15:29:01 -05:00
Scott Lahteine
dac7a75054 Merge pull request #4919 from thinkyhead/rc_k8400_stops
K8400 has 1xXY an 2xZ endstop plugs
2016-09-29 15:24:57 -05:00
Scott Lahteine
fffc9fefa8 Apply changes to all configs 2016-09-29 02:17:33 -05:00
Scott Lahteine
587cb6c283 K8400 has 1xXY an 2xZ endstop plugs 2016-09-29 02:07:22 -05:00
Scott Lahteine
d234bc160e Require Arduino 1.6.8 to compile 2016-09-29 02:00:27 -05:00
Scott Lahteine
2d2c9bdf92 Add PROBE_Y_FIRST option for probe order 2016-09-29 02:00:27 -05:00
Scott Lahteine
c8c57e59fc Patch the end of G29 to sync plan position 2016-09-29 02:00:27 -05:00
Scott Lahteine
81b8c9f8ec Add XY parameters to G29 for mesh dimensions 2016-09-29 02:00:27 -05:00
Scott Lahteine
56cf674150 M420 can now enable/disable ABL 2016-09-29 02:00:26 -05:00
Scott Lahteine
06790977c4 Use updated position methods 2016-09-29 01:31:05 -05:00
Scott Lahteine
e8f2604a6f Patch print_bed_level numbering 2016-09-29 01:31:05 -05:00
Scott Lahteine
d066610514 Patch up bilinear_z_offset 2016-09-29 01:31:05 -05:00
Scott Lahteine
850e38d013 G30 will only disable bed leveling 2016-09-29 01:31:04 -05:00
Scott Lahteine
510ef5d14a Standard function to turn bed leveling on/off 2016-09-29 01:27:37 -05:00
Scott Lahteine
ecf7cdde65 Augment planner/stepper getters/setters 2016-09-29 01:27:37 -05:00
Scott Lahteine
2febd8ec82 Double-touch debugging 2016-09-29 01:27:37 -05:00
Scott Lahteine
b331077c32 Use stepper.get_axis_position_degrees 2016-09-29 01:27:37 -05:00
Scott Lahteine
0d9efb24f3 Fix up bilinear_z_offset 2016-09-29 01:26:22 -05:00
jaysonkelly
3b3d282f8e Adjusted values for Rigidboard Configuration
Rigidboard differs a little in configuration from the PrinterBoardRevF we modeled the code after.
2016-09-28 14:14:04 -05:00
Scott Lahteine
850259bb25 Watch bed temp also for Control menu item 2016-09-28 14:14:04 -05:00
esenapaj
92c03a44a9 Fix the PR #4899 (ABL: Enable by type. Bilinear for all.) etc.
About Configuration.h:
・Fix the PR #4899 (ABL: Enable by type. Bilinear for all.)
Remove Duplicated contents

・Fix the PR #4305 (Custom boot screen feature improvement)
Revert from "during boot" to "during bootup" in all the example
Configuration.h

・Fix the PR #4207 (Clean up, simplify and generalize the Allen-key-probe
code.)
Resolve and relocate the duplicated definitions in Z_PROBE_ALLEN_KEY
section

・Follow-up the PR #4805 (Additional documentation of Configuration.h)
Add forgotten changes to all the example Configuration.h

Adjust spacing

About Configuration_adv.h:
Add missing description of SLOWDOWN for DELTA

Adjust spacing
2016-09-28 14:14:04 -05:00
Rerouter
50e5ee4de4 Update Configuration.h 2016-09-28 17:38:09 +10:00
Rerouter
1a2f1d4974 Update temperature.cpp 2016-09-28 17:36:53 +10:00
Rerouter
a765c98850 Removal of the constraints of the Iterm 2016-09-28 17:26:49 +10:00
Scott Lahteine
8b46eb3766 Fix bilinear interpolation 2016-09-27 03:18:49 -05:00
Scott Lahteine
5100bdac81 Improve Bilinear Grid
- Extrapolate properly for even numbered grid points
- Extrapolate using average, not median
- Improve bilinear grid report output
- Add debug output for bilinear extrapolation
- Add option to extrapolate from edge, not center
2016-09-27 00:03:19 -05:00
Scott Lahteine
a3e91ec65e Add 'Q' option to G29 when debug leveling is on 2016-09-27 00:03:19 -05:00
Scott Lahteine
1fceda4fb0 Add leveling type and details to machine_info 2016-09-27 00:03:19 -05:00
Scott Lahteine
e0e0166075 Fix auto bed leveling - turn on after successful G29 2016-09-27 00:03:19 -05:00
Scott Lahteine
f4b9052529 Merge pull request #4899 from thinkyhead/rc_nonlinear_grid
ABL: Enable by type. Bilinear for all.
2016-09-26 15:25:09 -05:00
Scott Lahteine
18e40de39c Adjust final Z after bilinear G29 2016-09-26 00:22:22 -05:00
Scott Lahteine
ea0dbee3c9 Enable ABL by type, support bilinear on cartesian 2016-09-25 23:35:37 -05:00
Scott Lahteine
9cebbabd05 Merge pull request #4893 from thinkyhead/rc_stat_led_check
Define status LED pins without condition
2016-09-25 18:50:47 -05:00
Scott Lahteine
fd64233182 Merge pull request #4895 from thinkyhead/rc_implemented_codes
Include requirements in "Implemented Codes"
2016-09-25 11:49:31 -05:00
Scott Lahteine
5fff8d148b Clean up digital pots and microsteps 2016-09-25 11:16:22 -05:00
Scott Lahteine
570676d265 Include requirements in "Implemented Codes" 2016-09-25 07:50:33 -05:00
Scott Lahteine
cb48292338 Use fastio for literal pins 2016-09-25 06:33:38 -05:00
Scott Lahteine
07703d2bd6 Use _PIN suffix on some pins 2016-09-25 06:33:38 -05:00
Scott Lahteine
203e519bf4 Sanity check for status LED pins 2016-09-25 06:33:38 -05:00
Scott Lahteine
ba43277429 Always define status LED pins 2016-09-25 06:33:37 -05:00
Scott Lahteine
ad691022d7 Fix up spacing in A4JP pins 2016-09-25 06:33:37 -05:00
Scott Lahteine
fba0b67f7d Rename status led pins 2016-09-25 06:33:37 -05:00
Scott Lahteine
9d86c07702 Clean up some fastio.h spacing 2016-09-25 06:33:37 -05:00
Scott Lahteine
ab84ed22ca No such thing as G6 and G7 pins 2016-09-25 05:28:22 -05:00
Scott Lahteine
c2f13be750 Mightyboard Revision E 2016-09-25 05:28:04 -05:00
Scott Lahteine
041d127cd3 Match bltouch test in do_homing_move with new code 2016-09-24 23:58:08 -05:00
Scott Lahteine
eb4fa8adf8 Merge pull request #4889 from thinkyhead/rc_tweaky_fix
Fix HEATERS_PARALLEL
2016-09-24 14:46:00 -05:00
Scott Lahteine
16461900c2 Fix for HEATERS_PARALLEL 2016-09-24 05:34:40 -05:00
Scott Lahteine
1583d37edd Comment on M851 case 2016-09-24 05:34:36 -05:00
Scott Lahteine
076f3a8284 unsigned char => uint8_t 2016-09-24 05:23:40 -05:00
Scott Lahteine
8935bed594 MIDDLE_DEAD_ZONE => MIDDLE_DEAD_ZONE_R 2016-09-24 05:18:36 -05:00
Scott Lahteine
6cf0952bf9 Merge pull request #4887 from thinkyhead/rc_autumn_fixups
Improve MINIMUM_STEPPER_PULSE
2016-09-24 03:23:42 -05:00
Scott Lahteine
8061f1fac9 Merge pull request #4888 from thinkyhead/fix_warnings_etc
Suppress warnings, fix nonlinear_z_offset
2016-09-24 03:22:49 -05:00
esenapaj
7bdc58a818 Suppress warnings, fix nonlinear_z_offset 2016-09-24 03:06:08 -05:00
Scott Lahteine
9ecea6f445 Merge pull request #4885 from esenapaj/Update-Japanese-translation
Update Japanese translation
2016-09-24 02:49:18 -05:00
Scott Lahteine
eabff30e75 Improve MINIMUM_STEPPER_PULSE 2016-09-24 02:23:43 -05:00
esenapaj
3ed8f8331c Update Japanese translation
・Add new translation
2016-09-24 09:24:38 +09:00
Scott Lahteine
da1644313d Merge pull request #4883 from esenapaj/Follow-up-the-PR-#4860
Follow-up the PR #4860 (Fix BLTOUCH string and SERVO_DELAY)
2016-09-23 16:39:37 -05:00
Scott Lahteine
903b8bb60c No need for auto_bed_leveling_was_enabled 2016-09-23 16:38:22 -05:00
esenapaj
ee60225c07 Follow-up the PR #4860 (Fix BLTOUCH string and SERVO_DELAY) 2016-09-24 06:18:27 +09:00
Scott Lahteine
d0796fc54c Merge pull request #4868 from thinkyhead/rc_autumn_fixups
Cleanups for the Autumn release
2016-09-23 16:11:37 -05:00
Scott Lahteine
0951bffcc0 Sanity check homing bumps 2016-09-23 15:39:02 -05:00
Scott Lahteine
a9a21db39f No homing bump if bump distance is 0 (or less) 2016-09-23 15:39:02 -05:00
Scott Lahteine
2b4da57ea7 Patch Z safe homing for probe Z homing 2016-09-23 15:39:02 -05:00
Scott Lahteine
c6dd539c84 Print error for M42 bad pin 2016-09-23 15:39:02 -05:00
Scott Lahteine
8b399610fb Skip raw moves to current position 2016-09-23 15:39:02 -05:00
Scott Lahteine
22ece0081e Pass array pointer to unapply_leveling 2016-09-23 15:39:01 -05:00
Scott Lahteine
cbc158eb62 Add a proper flag for ABL enabled 2016-09-23 15:39:01 -05:00
Scott Lahteine
666e944336 Init xProbe/yProbe for compiler 2016-09-23 15:39:01 -05:00
Scott Lahteine
2c52e6ecf4 Clean up G28 MBL code 2016-09-23 15:39:01 -05:00
Scott Lahteine
0bf1054bb2 Patch do_homing_move for SCARA 2016-09-23 15:39:00 -05:00
Scott Lahteine
6ad0da661c Report position in G92 2016-09-23 15:39:00 -05:00
Scott Lahteine
199a7b5dd5 Tweak SCARA debugging 2016-09-23 15:39:00 -05:00
Scott Lahteine
865ad25781 Fix prepare_kinematic_move_to precision 2016-09-23 15:39:00 -05:00
Scott Lahteine
85e607153b Improve kinematic optimization options 2016-09-23 03:03:15 -05:00
Scott Lahteine
2846531f0b const argument in do_homing_move 2016-09-23 03:03:15 -05:00
Scott Lahteine
cc639d7d9c Less indentation in Stepper::isr 2016-09-23 03:03:14 -05:00
Scott Lahteine
7dec8071b2 Always synchronize in Stepper::set_position 2016-09-23 03:03:14 -05:00
Scott Lahteine
c6142aa2a1 Minor cleanups in Marlin_main.cpp 2016-09-23 03:03:14 -05:00
Scott Lahteine
0427f3cc3b Use memcpy/memset in planner 2016-09-23 03:03:14 -05:00
Scott Lahteine
6b9bf8e8fe Add Planner::sync_from_steppers
Use to sync the planner after an interrupted move (when not overriding
the logical position).
2016-09-23 03:03:14 -05:00
Scott Lahteine
be11a8a938 Fix debug in Planner::buffer_line 2016-09-23 03:03:13 -05:00
Scott Lahteine
b211df818e Make movement functions more available 2016-09-23 03:03:13 -05:00
Scott Lahteine
6335acbf5c Patch bug in linear unapply_leveling 2016-09-23 03:03:13 -05:00
Scott Lahteine
1370d9a52b Merge pull request #4875 from thinkyhead/rc_bltouch_update
Use probe clearance for bump when homing Z with probe
2016-09-22 16:57:08 -05:00
Scott Lahteine
e8d5073a90 Use probe clearance for bump when homing Z with probe 2016-09-22 15:41:28 -05:00
Scott Lahteine
dbe41245f1 Merge pull request #4821 from thinkyhead/rc_revert_to_raises
Z Raise/Clearance rather than Height
2016-09-22 15:30:07 -05:00
Scott Lahteine
747a2257dd Only deploy/stow BLTOUCH on downward move 2016-09-22 15:26:19 -05:00
Scott Lahteine
e242946ac3 Patch G29 for linear leveling, reachable with probe 2016-09-22 15:26:19 -05:00
Scott Lahteine
b800eb0fed Add probe option to position_is_reachable 2016-09-22 15:26:19 -05:00
Scott Lahteine
fafafcf9d1 Use unapply_leveling in set_current_from_steppers_for_axis 2016-09-22 15:26:18 -05:00
Scott Lahteine
e69d1e2879 Homing/probing feedrate, comments 2016-09-22 15:26:18 -05:00
Scott Lahteine
7d72ed688c Revert motor_current_setting to constexpr
We should use `constexpr` wherever it makes sense, for its added benefits. See http://stackoverflow.com/questions/13346879/const-vs-constexpr-on-variables
2016-09-22 15:26:18 -05:00
Scott Lahteine
145d9005d1 Fix BLTOUCH string and SERVO_DELAY 2016-09-21 01:45:23 -05:00
Scott Lahteine
2b7cc27c37 Merge pull request #4840 from thinkyhead/rc_G2_G3_arc_r_method
Add support for G2/G3 with R parameter
2016-09-21 01:30:37 -05:00
Scott Lahteine
e0e10e0e45 Merge pull request #4859 from thinkyhead/rc_kinematic_and_scara
Kinematic and SCARA patches
2016-09-21 01:21:49 -05:00
Scott Lahteine
31f03c838a Only deploy/stow BLTouch for Z axis 2016-09-21 00:54:54 -05:00
Scott Lahteine
0c951436e4 Extend SCARA test, stress-test ABL_GRID_POINTS_* 2016-09-20 18:48:06 -05:00
Scott Lahteine
3913e04ac7 Add Delta kinematic optimization options 2016-09-20 18:48:06 -05:00
Scott Lahteine
8e31640229 Optimize prepare_kinematic_move_to 2016-09-20 18:48:06 -05:00
Scott Lahteine
fd9b8ae4d4 Use position_is_reachable in G29, M48 2016-09-20 18:48:06 -05:00
Scott Lahteine
7194e4434f SCARA support in position_is_reachable 2016-09-20 18:48:06 -05:00
Scott Lahteine
1c5f9821c4 SCARA support in homeaxis 2016-09-20 18:48:05 -05:00
Scott Lahteine
92b4459f6c Simpler G92 for SCARA 2016-09-20 18:48:05 -05:00
Scott Lahteine
46cc2e3f6a Fix get_cartesian_from_steppers 2016-09-20 18:31:36 -05:00
Scott Lahteine
435c3ed404 Patch SCARA_move_to_cal for coordinate space 2016-09-20 18:31:36 -05:00
Scott Lahteine
5efb12e889 Simpler report_current_position for SCARA 2016-09-20 18:31:36 -05:00
Scott Lahteine
83fc5e1540 No line_to_* functions with IS_KINEMATIC 2016-09-20 18:31:36 -05:00
Scott Lahteine
59d39d7655 G0 direct move for SCARA 2016-09-20 18:31:36 -05:00
Scott Lahteine
ad9d6870ed SCARA support in do_blocking_move_to 2016-09-20 18:31:36 -05:00
Scott Lahteine
8542ebcecd prepare_move_to_destination_raw => prepare_uninterpolated_move_to_destination 2016-09-20 18:31:36 -05:00
Scott Lahteine
f900f97611 Update sw endstops in set_axis_is_at_home 2016-09-20 18:31:36 -05:00
Scott Lahteine
0d43cef1de M206 for MORGAN_SCARA 2016-09-20 18:31:36 -05:00
Scott Lahteine
e94cb7a380 MORGAN_SCARA kinematics 2016-09-20 18:31:36 -05:00
Scott Lahteine
890bade2fa Additions, mods to SCARA config 2016-09-20 18:31:36 -05:00
Scott Lahteine
01f1028510 Try on "CLEARANCE" for size 2016-09-20 18:29:49 -05:00
Scott Lahteine
0e7d638a7a Revert to Probe Raise rather than Probe Height 2016-09-20 18:29:49 -05:00
Scott Lahteine
82b0014f5e Merge pull request #4856 from thinkyhead/rc_bltouch_update
Fix and extend BLTouch support
2016-09-20 17:13:52 -05:00
Scott Lahteine
51e42a2d77 Adjust BLTouch probe behavior
Addressing #4855
- Have the pin deploy only immediately before probing
- Have the pin retract immediately after every probe
2016-09-20 16:20:36 -05:00
Scott Lahteine
13523cbf29 Fix and extend BLTouch support 2016-09-20 16:20:36 -05:00
Scott Lahteine
5cbed13f41 'constexpr' => 'const' for PWM_MOTOR_CURRENT 2016-09-20 15:57:48 -05:00
Scott Lahteine
be3a8f4126 Merge pull request #4857 from thinkyhead/rc_fix_travis_u8glib
Arduino 1.6.10, direct download U8glib in Travis CI
2016-09-20 15:52:53 -05:00
Scott Lahteine
ed759626fe Arduino 1.6.10, direct download U8glib in Travis CI 2016-09-20 15:35:33 -05:00
Scott Lahteine
7ae351c92f Merge pull request #4842 from thinkyhead/rc_DISABLE_Z_MIN_PROBE_ENDSTOP_whassup
Drop DISABLE_Z_MIN_PROBE_ENDSTOP, clean up probe config
2016-09-20 12:16:51 -05:00
Scott Lahteine
ba94c89e21 Merge pull request #4852 from esenapaj/Fix-for-advance-extrusion-algorithms
Fix for advance extrusion algorithms
2016-09-20 11:33:14 -05:00
Scott Lahteine
e87ad155cc Merge pull request #4851 from thinkyhead/rc_linear_grid
Patch G29 for 3-point leveling
2016-09-20 11:29:59 -05:00
esenapaj
954563d603 Adjust spacing 2016-09-20 19:35:44 +09:00
esenapaj
7e9576dc5b Extend the e_steps[] from int to long for allowing more than 32,767 E steps
Probably needed for long straight lines when using high microstepping
2016-09-20 19:35:44 +09:00
esenapaj
b04ed8f9c3 Fix inverted stepper signal of ADVANCED and LIN_ADVANCED 2016-09-20 19:35:44 +09:00
esenapaj
8692748ecd Fix broken direction signal of ADVANCED and LIN_ADVANCED
Remove a setting proccess of E direction in advance_isr()
2016-09-20 19:35:44 +09:00
Scott Lahteine
e9ce42353e Patch G29 for 3-point leveling 2016-09-20 04:46:41 -05:00
Scott Lahteine
c2744d8a8b Add support for G2/G3 with R parameter 2016-09-19 00:35:09 -05:00
Scott Lahteine
e05af606a8 Clean up probe config options 2016-09-19 00:26:16 -05:00
Scott Lahteine
153e240cdd Probe conditionals to Conditionals_LCD.h 2016-09-19 00:25:53 -05:00
Scott Lahteine
ff38a3c3b1 Use SD Detect Pin 53 for 3DRAG, K8200, and K8400
See #4316
2016-09-18 23:46:09 -05:00
Scott Lahteine
9a9e9afcf8 Merge pull request #4839 from thinkyhead/rc_bltouch_servo_nr
Better BLTOUCH support
2016-09-18 23:42:16 -05:00
Scott Lahteine
f38a33a5d8 Add handling of BLTouch error state 2016-09-18 22:00:32 -05:00
Scott Lahteine
c4dcfa254e Allow override of Z_ENDSTOP_SERVO_NR with BLTOUCH 2016-09-18 22:00:32 -05:00
Scott Lahteine
7d9ebda478 Remove redundant servo probe sanity check 2016-09-18 21:46:18 -05:00
Scott Lahteine
f0beae7641 Fix stupid, stupid, stupid oversight in G29 update
Mea culpa!
2016-09-18 16:24:47 -05:00
Scott Lahteine
127d796420 Merge pull request #4837 from thinkyhead/rc_nonlinear_in_planner
Handle nonlinear bed-leveling in Planner
2016-09-18 15:31:51 -05:00
Scott Lahteine
77639672d7 Move NONLINEAR bed leveling to planner
This is in advance of moving non-linear bed leveling to the planner
class.
2016-09-18 13:50:38 -05:00
Scott Lahteine
9429c7db89 Use ABC indices in delta[] 2016-09-18 13:50:38 -05:00
Scott Lahteine
5f2f991192 Use 'logical' rather than 'target' or 'cartesian' 2016-09-18 13:50:38 -05:00
Scott Lahteine
40d3e854f6 Remove redundant extern delta[] 2016-09-18 13:39:47 -05:00
Scott Lahteine
2ebfbc4c8d Merge pull request #4836 from thinkyhead/rc_some_comments
Some comments, const args, debug output tweaks
2016-09-18 13:38:07 -05:00
Scott Lahteine
48fe2fdc9e Merge pull request #4835 from thinkyhead/rc_abl_non_square_grid
Allow non-square Auto Bed Leveling grid
2016-09-18 13:37:43 -05:00
Scott Lahteine
e5505e3b33 Allow non-square leveling grid 2016-09-18 13:11:20 -05:00
Scott Lahteine
2fc9ad6657 Use const ref args in probe_pt 2016-09-18 12:58:43 -05:00
Scott Lahteine
2c2688d7ad Adjust comments, spacing 2016-09-18 12:58:42 -05:00
Scott Lahteine
b9d19b0008 Tweak extrapolate_one_point 2016-09-18 12:58:42 -05:00
Scott Lahteine
3c0b591935 Fix nozzle position description 2016-09-18 12:58:42 -05:00
Scott Lahteine
18d8dd4c0f set_current_from_steppers_for_axis const arg 2016-09-18 12:58:42 -05:00
Scott Lahteine
edfaf1c582 Stepper::report_positions patch 2016-09-18 12:58:42 -05:00
Scott Lahteine
d1f4c3d73b Patch sync_plan_position comment 2016-09-18 12:58:41 -05:00
Scott Lahteine
0c25af30d4 Document homeaxis 2016-09-18 12:58:41 -05:00
Scott Lahteine
e7882e45e3 Document set_axis_is_at_home 2016-09-18 12:58:40 -05:00
Scott Lahteine
fef959c31a Merge pull request #4834 from thinkyhead/rc_code_bool
Standardize code_value_bool
2016-09-18 12:44:20 -05:00
Scott Lahteine
07ac9a1152 Merge pull request #4822 from blubbfish/patch-3
Tweak some german language strings
2016-09-18 11:38:22 -05:00
Scott Lahteine
661fe09ce7 Standardize code_value_bool 2016-09-18 11:32:32 -05:00
Scott Lahteine
20e5140e75 Merge pull request #4833 from thinkyhead/rc_no_scara_axis_scaling
Remove SCARA axis_scaling
2016-09-18 11:31:50 -05:00
Scott Lahteine
37258956d5 Merge pull request #4832 from thinkyhead/rc_fix_M0_M1
Enable M0/M1 with Emergency Parser
2016-09-18 11:31:36 -05:00
Scott Lahteine
a501f430eb Enable M0/M1 with Emergency Parser 2016-09-18 11:14:10 -05:00
Philip Schell
cd8b22b527 Tweak some german language strings
Change some string to get a better wording in german
2016-09-16 22:29:39 +02:00
Scott Lahteine
83a41c7ceb Remove SCARA axis_scaling 2016-09-16 15:21:18 -05:00
Scott Lahteine
d41eeb62af Merge pull request #4781 from thinkyhead/rc_final_z_correction
Use simplified Z correction in G29 when possible
2016-09-16 15:14:19 -05:00
Scott Lahteine
502150046c Merge pull request #4805 from thinkyhead/rc_config_adjustment
Additional documentation of Configuration.h
2016-09-16 15:13:20 -05:00
Scott Lahteine
a1812b55f6 Space out array values 2016-09-16 14:41:05 -05:00
Scott Lahteine
d4599fd8ed Comment patches to Configuration.h 2016-09-16 14:41:05 -05:00
Scott Lahteine
723e983073 Default EXTRUDE_MAXLENGTH to 200mm 2016-09-16 14:41:04 -05:00
Scott Lahteine
b08bd84f8e Merge pull request #4806 from blubbfish/patch-2
Update language_de.h
2016-09-16 14:39:20 -05:00
Scott Lahteine
939bf1057c Merge pull request #4820 from darrelhunt/RCBugFix
Fixing Pin Definition Files to Define USBCON
2016-09-16 14:33:38 -05:00
darrelhunt
7b8bfa4358 Update pins_TEENSYLU.h 2016-09-16 11:26:37 -07:00
darrelhunt
829c8592f2 Update pins_TEENSY2.h 2016-09-16 11:26:09 -07:00
darrelhunt
e0aee20327 Update pins_SAV_MKI.h 2016-09-16 11:25:42 -07:00
darrelhunt
88d3fc0bcf Update pins_PRINTRBOARD.h 2016-09-16 11:25:14 -07:00
darrelhunt
4277221abb Update pins_BRAINWAVE_PRO.h 2016-09-16 11:24:32 -07:00
darrelhunt
b8ecbe9116 Update pins_BRAINWAVE.h 2016-09-16 11:23:52 -07:00
darrelhunt
60f757077e Update pins_5DPRINT.h 2016-09-16 11:22:52 -07:00
Scott Lahteine
4ca837b6cf Merge pull request #4815 from tnw513/fix-italian
Added missing translation (Italian)
2016-09-15 19:08:28 -05:00
Silvio Didonna
ff2b2d5939 Added missing translations 2016-09-16 01:17:58 +02:00
Philip Schell
2b11c3274c Update language_de.h 2016-09-15 15:16:11 +02:00
Philip Schell
54e6d12382 Update language_de.h
@MarlinFirmware/language-team updated german languagefile to the latest english version
2016-09-14 14:17:21 +02:00
Scott Lahteine
57564ae576 Use last probe point to correct Z when possible 2016-09-14 02:03:43 -05:00
Scott Lahteine
e40646de42 Merge pull request #4803 from thinkyhead/rc_lcd_button_fix
Clear LCD button state, apply timer to all
2016-09-13 18:03:39 -05:00
Scott Lahteine
2fce217576 Merge pull request #4804 from thinkyhead/rc_fix_broken_G29
Fix some regressive typos in G29
2016-09-13 17:51:38 -05:00
Scott Lahteine
29f224594c Fix some regressive typos in G29 2016-09-13 17:31:02 -05:00
Scott Lahteine
5ecc7d9f25 Clear LCD button state, apply timer to all
Addressing #3007
2016-09-13 16:10:27 -05:00
Scott Lahteine
94d5cf8721 Merge pull request #4789 from thinkyhead/rc_better_leveling_etc
Various cleanups ahead of more…
2016-09-13 05:21:17 -05:00
Scott Lahteine
9b0931ef74 Apply fixed EXTRUDER_RUNOUT_PREVENT 2016-09-13 03:33:04 -05:00
Scott Lahteine
b1a60e8954 Reformat, rearrange, tweak, and document
- Add comments to several functions
- Add an option to use Fast SQRT for Delta IK
- Group related functions together
- Outdent some leveling-related functions
2016-09-13 03:33:04 -05:00
Scott Lahteine
61284cbd8c Various code style adjustments 2016-09-13 03:33:04 -05:00
Scott Lahteine
788a16fc46 Clean up serial out code 2016-09-13 03:33:03 -05:00
Scott Lahteine
0e38bea79d Shrink 3-point leveling code 2016-09-13 03:33:03 -05:00
Scott Lahteine
4f75ce6957 Unify reset_bed_level for linear/non-linear 2016-09-13 03:33:03 -05:00
Scott Lahteine
41d8149bce Sanity check for more than 1 controller 2016-09-13 03:33:02 -05:00
Scott Lahteine
40785ce8ac Use count method for kinematic sanity check 2016-09-13 03:33:02 -05:00
Scott Lahteine
3236762e07 Clean up sanity check for LCD_PROGRESS_BAR 2016-09-13 03:33:02 -05:00
Scott Lahteine
a9ed23225f bed_level => bed_level_grid 2016-09-13 03:33:02 -05:00
Scott Lahteine
82be65065c Fix up untilted_stepper_position and set_current_from_steppers_for_axis 2016-09-13 03:33:01 -05:00
Scott Lahteine
d65f5d816f Patch to fix kinematics 2016-09-13 03:33:01 -05:00
Scott Lahteine
e529c6407e Rename set_cartesian_from_steppers, cartesian_position 2016-09-13 03:33:01 -05:00
Scott Lahteine
c109399bf6 Fix planner leveling and rename arguments
Use lx, ly, lz for “logical” positions
2016-09-13 03:33:01 -05:00
Scott Lahteine
d4f21af6b3 sync_plan_position_delta => sync_plan_position_kinematic 2016-09-13 03:33:01 -05:00
Scott Lahteine
acd1b6e9c0 Rename delta_grid spacing for general nonlinear 2016-09-13 03:33:00 -05:00
Scott Lahteine
c5fa70809b Implement M0/M1 for EMERGENCY_PARSER 2016-09-13 03:33:00 -05:00
Scott Lahteine
786d1afb72 Add position_is_reachable, use in home_z_safely 2016-09-13 03:33:00 -05:00
Scott Lahteine
b4034915f8 Move z safe homing to its own function 2016-09-13 03:33:00 -05:00
Scott Lahteine
c84b14c77a Move delta homing to its own function 2016-09-13 03:32:59 -05:00
Scott Lahteine
f9a192c7e3 Move setup() and loop() to the end 2016-09-13 03:32:59 -05:00
Scott Lahteine
8ff338c2b9 Patch stepper.h for SCARA 2016-09-13 03:32:59 -05:00
Scott Lahteine
74d7f5e57b Patch SCARA example config 2016-09-13 03:32:59 -05:00
Scott Lahteine
6ab54c60b1 Add conditionals for kinematics, leveling 2016-09-13 03:32:59 -05:00
Scott Lahteine
21514568fd Add enum for ALL_AXES 2016-09-13 03:32:58 -05:00
Scott Lahteine
413b61e64a Add HYPOT2 and float comparison macros 2016-09-13 03:32:58 -05:00
Scott Lahteine
0ea7ed6db6 Merge pull request #4797 from thinkyhead/rc_runout_comments
Fix comment on FILAMENT_RUNOUT_SENSOR
2016-09-13 02:25:26 -05:00
Scott Lahteine
a6f6ed352b Fix comment on FILAMENT_RUNOUT_SENSOR 2016-09-13 02:14:34 -05:00
Scott Lahteine
48e14d049a Merge pull request #4710 from thinkyhead/rc_fix_leveling_maths
Bed leveling that accounts for home XYZ
2016-09-10 15:47:39 -05:00
Scott Lahteine
416821a71c Merge pull request #4765 from thinkyhead/rc_endstop_direction
Sanitycheck endstop plugs based on homing direction
2016-09-10 14:49:50 -05:00
Scott Lahteine
9248cfb0ad Bed leveling that accounts for home XYZ 2016-09-10 13:47:21 -05:00
Scott Lahteine
2e8fd70fb1 Merge pull request #4779 from thinkyhead/rc_cleanups_1
Minor code cleanup, tweak M109/M190
2016-09-10 13:47:05 -05:00
Scott Lahteine
6ac9d895ca Tweak Filament Width variables 2016-09-10 13:29:25 -05:00
Scott Lahteine
68ba45572e Don't say "heating complete" unless done 2016-09-10 13:29:25 -05:00
Scott Lahteine
2bfc6fe1b0 Move XYZ constants closer to the top 2016-09-10 13:25:44 -05:00
Scott Lahteine
12b94e419f Sanitycheck endstop plugs based on homing direction 2016-09-08 13:56:32 -05:00
Scott Lahteine
29c4f67a29 Additional path - followup to #4743 2016-09-07 15:08:12 -05:00
Scott Lahteine
8a8d6e00b7 Merge pull request #4756 from thinkyhead/rc_makefilefix
makefile fix for arduino 1.6.9 unzipped
2016-09-03 20:24:26 -05:00
Robert Bartl
494d5770b8 makefile fix for arduino 1.6.9 unzipped 2016-09-03 19:45:27 -05:00
Scott Lahteine
6f71bd7372 Merge pull request #4754 from thinkyhead/rc_mixing_regression
Unify counter_m and counter_M
2016-09-02 12:27:43 -05:00
Scott Lahteine
9bf78ef465 Fix capitalization of counter_m 2016-09-02 11:31:45 -05:00
Scott Lahteine
42b5616327 Try bool for direction instead of long 2016-09-02 11:28:48 -05:00
Scott Lahteine
cbe9ab902c Merge pull request #4747 from thinkyhead/rc_sd_show_percent
Option to show SD percent on Graphical LCD
2016-09-02 07:44:42 -05:00
Scott Lahteine
f20b2b21eb Optimize LCD string/char printing 2016-09-02 06:41:24 -05:00
Scott Lahteine
3b2f7ba225 Merge pull request #4748 from thinkyhead/rc_sd_print_timer
Patch duration_t toDigital method
2016-09-02 04:41:11 -05:00
Scott Lahteine
dad94d2fef Merge pull request #4749 from thinkyhead/rc_minumum_minimum
Fix a misspelling of minimum
2016-09-02 04:41:00 -05:00
Kai
445d8215e4 Option to show SD percent on Graphical LCD 2016-09-02 02:17:36 -05:00
Scott Lahteine
d07a913f21 Tweak to stepper advance e_steps update 2016-09-02 02:06:17 -05:00
Scott Lahteine
aaef7c6b89 Fix a misspelling of minimum 2016-09-02 01:42:38 -05:00
Scott Lahteine
ad659b5f91 Merge pull request #4725 from thinkyhead/rc_log_machine_info
Log machine info in G28 and G29
2016-09-01 23:58:59 -05:00
Scott Lahteine
c6859a1e54 Handle hours >= 100 2016-09-01 23:54:48 -05:00
Kai
9f706a9635 Patch duration_t toDigital method 2016-09-01 23:34:15 -05:00
Scott Lahteine
c3caa42630 Merge pull request #4738 from thinkyhead/rc_ensure_floats
Optimize stepper ISRs, plus cleanup, shorthand
2016-09-01 14:36:22 -05:00
Scott Lahteine
3ff657e729 Merge pull request #4727 from thinkyhead/rc_homing_together
Add heading for movement settings
2016-09-01 14:26:46 -05:00
Scott Lahteine
426f662586 Apply MINIMUM_STEPPER_PULSE in stepper advance_isr 2016-08-30 14:31:48 -05:00
Scott Lahteine
8c7ee4599e Optimize stepper advance_isr 2016-08-30 14:31:48 -05:00
Scott Lahteine
9725bcd099 Minor "optimizations" in stepper ISR 2016-08-30 14:21:43 -05:00
Scott Lahteine
4ec3d1ea58 Add some commentary to stepper ISR 2016-08-30 14:21:15 -05:00
Scott Lahteine
d9bcc7bb45 Set a bool when a stepper block is done 2016-08-30 14:20:48 -05:00
Scott Lahteine
08f717e5f7 Use bit-size typedefs for some stepper vars 2016-08-30 14:19:49 -05:00
Scott Lahteine
d554c1dda8 Clean up planner kernel pass methods 2016-08-30 14:16:13 -05:00
Scott Lahteine
b2e5ec85d7 Add [XYZ]_CENTER conditionals 2016-08-30 14:15:41 -05:00
Scott Lahteine
7e20448a2d Add HOMING_Z_WITH_PROBE conditional 2016-08-30 13:29:26 -05:00
Scott Lahteine
0e4107da34 Minor cleanup of homeaxis, etc. 2016-08-30 13:29:26 -05:00
Scott Lahteine
f1201e11c7 Improve the Jerk description 2016-08-29 12:39:21 -05:00
Scott Lahteine
3f038bef00 Heading for movement settings 2016-08-29 02:01:34 -05:00
Scott Lahteine
fd2269f489 Log machine info in G28 and G29 2016-08-28 20:48:28 -05:00
Scott Lahteine
6eaf4f4909 Fix spacing of debug output in homeaxis 2016-08-28 19:43:33 -05:00
Scott Lahteine
1e6d1c39ea Improve verbiage of dropsegments sanity error 2016-08-28 19:40:32 -05:00
Scott Lahteine
0729a8f08d Use the probe travel height for pre-probe move
Instead of using the home_bump for Z to move close to the bed before doing a slow probe, use the probe travel height.
2016-08-28 19:13:08 -05:00
Scott Lahteine
dd94d0b9d5 Fix bed probing bug without PROBE_DOUBLE_TOUCH
If `PROBE_DOUBLE_TOUCH` wasn't enabled, the probe move could be way too short! See #4701 for example.
2016-08-28 19:00:25 -05:00
Scott Lahteine
35a0c46f16 Tweak debug output for probe in G29 2016-08-28 18:44:44 -05:00
Scott Lahteine
a82a89bc58 Merge pull request #4722 from thinkyhead/rc_minimum_stepper_pulse
MINIMUM_STEPPER_PULSE option
2016-08-28 10:03:32 -05:00
Scott Lahteine
73c5c312c9 Merge pull request #4723 from thinkyhead/rc_fix_some_text
Fix Danish encoding and an error message
2016-08-28 10:02:46 -05:00
Scott Lahteine
a2572d2854 Fix Danish encoding and an error message 2016-08-28 09:51:06 -05:00
Scott Lahteine
759234af60 MINIMUM_STEPPER_PULSE option 2016-08-27 23:58:40 -05:00
Scott Lahteine
2cb63f0bf7 Merge pull request #4719 from thinkyhead/rc_delta_homing_patch
Marlin patches for homing, esp. Delta
2016-08-27 20:46:50 -05:00
Scott Lahteine
8241cf9901 Merge pull request #4720 from thinkyhead/rc_allow_stepper_omission
Patch stepper.cpp to allow omitting steppers
2016-08-27 20:36:22 -05:00
Scott Lahteine
7e893f4309 Merge pull request #4721 from thinkyhead/rc_temperature_isr_comments
Rc temperature isr comments
2016-08-27 20:36:03 -05:00
Scott Lahteine
73d86098b7 Marlin patches for homing, esp. Delta 2016-08-27 20:32:05 -05:00
Scott Lahteine
338bc768b1 Merge pull request #4717 from thinkyhead/rc_log_the_probe
Debug logging of nozzle type and offsets
2016-08-27 20:24:19 -05:00
Scott Lahteine
fae92e3f3c Merge pull request #4718 from thinkyhead/rc_twibus_patch_20160827
TWIBus patch for proper use of Wire.requestFrom
2016-08-27 20:22:53 -05:00
Scott Lahteine
a485a19052 Added optional planner logging 2016-08-27 20:12:22 -05:00
Scott Lahteine
e9bfca5870 Additional comments for Temperature::isr 2016-08-27 20:12:22 -05:00
Scott Lahteine
a255945f29 Add DEBUG_ALL enum 2016-08-27 20:12:22 -05:00
Scott Lahteine
a28e15399f Patch stepper.cpp to allow omitting steppers 2016-08-27 20:11:17 -05:00
Scott Lahteine
2b226bc5c2 TWIBus patch for proper use of Wire.requestFrom 2016-08-27 20:09:28 -05:00
Scott Lahteine
d641344d3a Remove redundant probe offset in homing 2016-08-27 19:58:56 -05:00
Scott Lahteine
fb19a3cdec Merge pull request #4649 from thinkyhead/rc_boelle_danish_update
Danish update (18 Aug 2016)
2016-08-27 19:06:05 -05:00
Scott Lahteine
00638131e5 Debug logging of nozzle type and offsets 2016-08-27 15:21:01 -05:00
Scott Lahteine
8e9ac72191 Merge pull request #4709 from thinkyhead/rc_log_the_reason
Log whether homing with probe or endstop
2016-08-26 17:05:55 -05:00
Scott Lahteine
991a34aff2 Log whether homing with probe or endstop 2016-08-26 15:50:10 -05:00
Scott Lahteine
3b93b79f5c Merge pull request #4703 from bgort/RCBugFix
Add note suggesting RAMBo users use the RAMBo board type or platformio environment
2016-08-26 14:53:56 -05:00
Scott Lahteine
00cdb15cec Move invariant LCD strings to language.h 2016-08-26 02:48:57 -05:00
Bo Herrmannsen
d2ae5b00d9 Danish up to date (18 Aug 2016) 2016-08-26 02:48:57 -05:00
Scott Lahteine
0c892357a7 Merge pull request #4693 from thinkyhead/rc_pins_cleanup_aug23
Cleanup of pins files, Conditionals
2016-08-25 21:35:36 -05:00
Scott Lahteine
e78274a7f4 Consistent order/formatting of pins files 2016-08-25 20:59:45 -05:00
Scott Lahteine
11e9530111 Properly handle probe pin for BQ printers 2016-08-25 20:59:44 -05:00
Scott Lahteine
1968983f35 Move PROBE_SELECTED to an earlier point 2016-08-25 20:59:44 -05:00
Brian
2fae32f35f Add note suggesting RAMBo users use the RAMBo board type or platformio environment;
Add note that Viki 2.0 wiring diagram v1.2 has a mistake in it;
2016-08-25 15:05:29 -04:00
Scott Lahteine
2c3de5ee46 Merge pull request #4691 from esenapaj/Suppress-warnings
Suppress warnings
2016-08-24 21:35:18 -05:00
Scott Lahteine
37ac540a26 Fix unsigned/signed comparison in fanPin loop 2016-08-24 21:34:30 -05:00
esenapaj
1749a7fae3 Suppress warning 2016-08-24 00:18:06 +09:00
Scott Lahteine
d07d85ac9f Ensure probe points at the delta edge are kept 2016-08-23 05:09:56 -05:00
Scott Lahteine
13e337ac4b Merge pull request #4688 from AnHardt/crittical_section
Repair MarlinSerial with TX-buffer
2016-08-23 03:31:12 -05:00
AnHardt
7e36b76af2 Repair MarlinSerial with TX-buffer
These '{' are important to avoid the redefinition of `unsigned char _sreg = SREG;`
at the same level.
Used in
```
#define CRITICAL_SECTION_START  unsigned char _sreg = SREG; cli();
```
2016-08-22 23:40:09 +02:00
Scott Lahteine
6b274e563d Merge pull request #4685 from thinkyhead/rc_gege2b_french
Update french language
2016-08-22 14:20:54 -05:00
Gege2B
1e65f1a1d8 Update french language 2016-08-22 12:46:58 -05:00
Scott Lahteine
d8f4f263e0 Merge pull request #4673 from thinkyhead/rc_segments_steps_move
MIN_SEGMENTS_FOR_MOVE => MIN_STEPS_PER_SEGMENT
2016-08-21 09:34:06 -05:00
Scott Lahteine
ab59280075 MIN_SEGMENTS_FOR_MOVE => MIN_STEPS_PER_SEGMENT
Follow-up to #4666
2016-08-21 08:56:03 -05:00
Scott Lahteine
27b80b1dd1 Merge pull request #4667 from thinkyhead/rc_M211_sw_endstop_switch
M211: Enable/Disable Software Endstops
2016-08-21 06:44:00 -05:00
Scott Lahteine
f9e3347d6f Merge pull request #4669 from thinkyhead/rc_config_descriptions
PREVENT_DANGEROUS_EXTRUDE => PREVENT_COLD_EXTRUSION
2016-08-21 06:41:57 -05:00
Scott Lahteine
14a03727e1 Tweak serialprintPGM 2016-08-21 00:10:09 -05:00
Scott Lahteine
2f223b8c79 Use ABC and XYZ for "3" 2016-08-21 00:10:08 -05:00
Scott Lahteine
4cd1ad8f28 Adjustments to M209, G28, M605 2016-08-21 00:10:08 -05:00
Scott Lahteine
e354cf5884 Apply sw_endstops_enabled to manual move 2016-08-21 00:10:08 -05:00
Scott Lahteine
280534c06f Add M211: Enable/Disable Software Endstops 2016-08-21 00:10:08 -05:00
Scott Lahteine
01d4703429 PREVENT_DANGEROUS_EXTRUDE => PREVENT_COLD_EXTRUSION
Also improve the documentation of this and related options, and set
EXTRUDE_MINTEMP to 170 everywhere.
2016-08-20 23:35:27 -05:00
Scott Lahteine
a1f6cf1e5d Merge pull request #4665 from thinkyhead/rc_lcd_not_ultipanel
Clean up ultralcd code, dependencies on ULTIPANEL
2016-08-20 22:43:17 -05:00
Scott Lahteine
1a255afa36 Merge pull request #4666 from thinkyhead/rc_dropsegments_adj
dropsegments => MIN_SEGMENTS_FOR_MOVE
2016-08-20 22:42:16 -05:00
Scott Lahteine
374f8d2014 dropsegments => MIN_SEGMENTS_FOR_MOVE 2016-08-20 18:52:15 -05:00
Scott Lahteine
76c3f326ff Clean up DOGM code, comments 2016-08-20 18:33:12 -05:00
Scott Lahteine
71319adbb8 Wrap ULTIPANEL-dependent code 2016-08-20 18:33:11 -05:00
Scott Lahteine
305913545e Move number-to-string function to utility.* 2016-08-20 18:33:11 -05:00
Scott Lahteine
394c80c87b Merge pull request #4655 from thinkyhead/rc_serial_static
Optimize, reduce size of MarlinSerial
2016-08-20 15:51:57 -05:00
Scott Lahteine
b15f8ca641 Merge pull request #4660 from MagoKimbra/Fix_Zig_Zag
Fix_Zig_Zag
2016-08-20 15:44:25 -05:00
MagoKimbra
28d1e5a946 Fix_Zig_Zag 2016-08-20 11:28:08 +02:00
Scott Lahteine
14395a1a96 Optimize, reduce size of MarlinSerial 2016-08-19 16:53:20 -05:00
Scott Lahteine
4d4c00d69c Merge pull request #4651 from thinkyhead/rc_homing_vs_leveling_z
Improvements to homing / leveling
2016-08-19 15:45:49 -05:00
Scott Lahteine
f3a54316e6 Merge pull request #4652 from bgort/RCBugFix
Add Rambo support/env to platformio.ini; properly maps extended pins
2016-08-19 09:30:59 -05:00
Brian Gortney
8fae3e1f9f Add Rambo support/env to platformio.ini; properly maps extended pins 2016-08-19 07:11:23 -04:00
Scott Lahteine
12d72363cb Do Delta radius check without sqrt 2016-08-19 05:05:48 -05:00
Scott Lahteine
044f800be9 Use SERIAL_PROTOCOLLNPGM in G28 2016-08-19 04:45:33 -05:00
Scott Lahteine
d309a9647d Include probe offset for moving "close to the bed" 2016-08-19 04:45:33 -05:00
Scott Lahteine
35a08eeaeb Use Z_HOME_DIR over axis_home_dir where we can 2016-08-19 04:45:32 -05:00
Scott Lahteine
99b22d5785 Default AUTO_BED_LEVELING_GRID_POINTS to 3 2016-08-19 04:45:32 -05:00
Scott Lahteine
9b1f3f7d12 Sanity-check DELTA + AUTO_BED_LEVELING_GRID_POINTS 2016-08-19 04:45:32 -05:00
Scott Lahteine
733453569b Merge pull request #4650 from thinkyhead/rc_percent_is_percent
extruder_multiplier => flow_percentage
2016-08-19 04:38:18 -05:00
Scott Lahteine
55355a4fb8 Make probed points more symmetrical 2016-08-19 04:32:03 -05:00
Scott Lahteine
1f776f6034 Tweak some code comments 2016-08-19 04:32:02 -05:00
Scott Lahteine
748228cf40 Use named indices for delta_grid_spacing 2016-08-19 04:32:02 -05:00
Scott Lahteine
ead333e7da line_to_axis_pos => do_homing_move 2016-08-19 04:32:02 -05:00
Scott Lahteine
7a4ccd7967 Add do_probe_move with Z fixes 2016-08-19 04:32:02 -05:00
Scott Lahteine
a1bad589c9 Augment debug/homing logging 2016-08-19 04:32:02 -05:00
Scott Lahteine
41b5c48129 Update software endstops if EEPROM is loaded 2016-08-19 04:32:01 -05:00
Scott Lahteine
628dcbc764 extruder_multiplier => flow_percentage 2016-08-18 22:13:47 -05:00
Scott Lahteine
6970c24ee6 Merge pull request #4642 from zenmetsu/ru-Lang
Ru lang updated
2016-08-18 17:11:46 -05:00
Jason Westervelt
d222ee4de2 Update language_ru.h
Updated missing translations.  Caught up on change to MSG_HOME.
2016-08-17 13:55:44 -07:00
Scott Lahteine
464d594450 Merge pull request #4608 from thinkyhead/rc_more_twibus_tweaks
Additional details for I2C_SLAVE_ADDRESS
2016-08-15 19:37:03 -07:00
Scott Lahteine
d63b8e2b2b Additional details for I2C_SLAVE_ADDRESS 2016-08-15 19:27:53 -07:00
Scott Lahteine
7427290d3a Merge pull request #4634 from thinkyhead/rc_lang_disp_char
Set language display charset in language.h
2016-08-15 19:25:56 -07:00
Scott Lahteine
aa30550b21 Keep SIMULATE_ROMFONT only language.h 2016-08-15 19:11:31 -07:00
Scott Lahteine
cec61c350d Set language display charset in language.h 2016-08-15 19:01:12 -07:00
Scott Lahteine
165d7abb1b Merge pull request #4625 from thinkyhead/rc_i2c_request_capture_flush
Add request, capture, flush to TWIBus
2016-08-15 18:15:43 -07:00
Scott Lahteine
0e6b41a34a Merge pull request #4624 from RicardoGA/RCBugFix
Update Spanish Lenguage
2016-08-15 18:15:23 -07:00
RicardoGA
507784b846 Fix Messages length 2016-08-15 10:30:51 -05:00
Scott Lahteine
bd928a69ec Add request, capture, flush to TWIBus 2016-08-15 00:04:20 -07:00
RicardoGA
7b7f319ed5 Update Spanish Lenguage
Adds missing messages
2016-08-14 23:30:43 -05:00
Scott Lahteine
132322e4d9 Fix #4614: currentScreen only defined with ULTIPANEL 2016-08-14 00:29:46 -07:00
Scott Lahteine
dcd26b0403 Merge pull request #4621 from thinkyhead/rc_fan_set_output
Init PWM-able AUTO_FAN pins with SET_OUTPUT
2016-08-13 21:22:27 -07:00
Scott Lahteine
79ba983782 Allow reply() to use const string with no warning 2016-08-13 21:05:44 -07:00
Scott Lahteine
27570c08ba Merge pull request #4620 from thinkyhead/rc_twibus_further
Further refinements of TWIBus
2016-08-13 20:56:09 -07:00
Scott Lahteine
3a0a94b21a Always init configured fan pins 2016-08-13 20:38:40 -07:00
Scott Lahteine
c63003ed3e Use matching auto-fan flags 2016-08-13 20:38:40 -07:00
Scott Lahteine
3475fd7b0f Init PWM-able auto fan pins with SET_OUTPUT 2016-08-13 20:38:40 -07:00
Scott Lahteine
abf9696db1 Loop fan-pins based on array size 2016-08-13 20:05:32 -07:00
Scott Lahteine
e88575c8ec Init next_auto_fan_check_ms to zero 2016-08-13 20:05:32 -07:00
Scott Lahteine
7272ec5608 Update HAS_FAN flags for 4 auto fans 2016-08-13 20:05:32 -07:00
Scott Lahteine
7b21811a9a Flags for matching auto-fans 2016-08-13 20:05:32 -07:00
Scott Lahteine
97e0aed304 Further refinements of TWIBus 2016-08-13 18:32:41 -07:00
Scott Lahteine
38fa1b1939 Merge pull request #4196 from cimbalo/Platformio_support
Add working PlatformIO support
2016-08-12 17:32:09 -07:00
Scott Lahteine
d7edc039af Merge pull request #4605 from thinkyhead/rc_3drag_fan_is_8
Fixup 3DRAG pins based on updated RAMPS pins
2016-08-12 17:30:27 -07:00
Scott Lahteine
7147c86e9f Merge pull request #4611 from tnw513/patch-2
Fix acceleration and feedrate following bq/Marlin
2016-08-12 17:30:02 -07:00
Silvio
923388e0c7 Fix acceleration and feedrate following bq/Marlin 2016-08-12 15:42:20 +02:00
Scott Lahteine
405afec393 Include decimeters in filamentUsed display 2016-08-12 05:16:43 -07:00
Scott Lahteine
fef0e8ba86 Merge pull request #4610 from thinkyhead/rc_sd_pause_and_stop
Fix stopSDPrint so it works when paused
2016-08-12 04:09:22 -07:00
Scott Lahteine
192ac2dfd7 Squish some CardReader code 2016-08-12 03:32:42 -07:00
Scott Lahteine
61932b859e Fix bug in CardReader::stopSDPrint
If the SD print is paused, it cannot be stopped
2016-08-12 03:21:10 -07:00
Scott Lahteine
9e5d5a3b7c Merge pull request #4597 from tnw513/italian_fix
Added hyphenated strings for full graphic display
2016-08-12 02:37:53 -07:00
Silvio Didonna
f999292eea added hyphenated letters for full graphic display and fixed some strings 2016-08-12 08:57:22 +02:00
Scott Lahteine
11027a56b6 Merge pull request #4606 from thinkyhead/rc_more_i2c_slave
Add an i2c request handler
2016-08-11 23:51:56 -07:00
Scott Lahteine
67f119d18b Add an i2c request handler 2016-08-11 18:09:18 -07:00
Scott Lahteine
2d3db5b5bd Fixup pins_3DRAG based on updated RAMPS pins 2016-08-11 15:49:47 -07:00
Scott Lahteine
d29a64d4b3 Merge pull request #4603 from thinkyhead/rc_less_MSG_MOVE
Strip never-translated strings from language files
2016-08-11 14:21:58 -07:00
Scott Lahteine
d6a7ca6553 Merge pull request #4584 from thinkyhead/rc_delta_cal_more
Use configured feedrates, center in DELTA_CALIBRATION_MENU
2016-08-11 14:04:05 -07:00
Scott Lahteine
64f15ac451 Merge pull request #4602 from thinkyhead/rc_marlinserial_clean
Minor cleanup of SdFatUtil.h, MarlinSerial.cpp
2016-08-11 13:42:16 -07:00
Scott Lahteine
d3b432adca Strip never-translated strings from language files 2016-08-11 13:41:07 -07:00
Scott Lahteine
1a558ef486 Tweak MarlinSerial precursor 2016-08-11 12:47:06 -07:00
Scott Lahteine
802818f7ab Cleanup SdFatUtil.h 2016-08-11 12:47:06 -07:00
Scott Lahteine
52560e257f Merge pull request #4595 from thinkyhead/rc_i2c_slave
Add support for i2c slave address
2016-08-11 12:39:26 -07:00
Scott Lahteine
432e9a1f50 Use configured feedrates, center for DELTA_CALIBRATION_MENU 2016-08-11 12:05:55 -07:00
Scott Lahteine
cd496dd9bd do_blocking_move_to can't be 'inline', takes const ref args 2016-08-11 12:05:55 -07:00
Scott Lahteine
dd75fca4d9 Make M155 / M156 a bit more flexible 2016-08-11 00:52:01 -07:00
Scott Lahteine
30afac64c4 Merge pull request #4594 from thinkyhead/rc_fix_serial_output
Fix serial output for MBL, M303
2016-08-11 00:05:30 -07:00
Scott Lahteine
e3efb04295 Shoehorn EXPERIMENTAL_I2CBUS into Travis test 2016-08-10 23:35:46 -07:00
Scott Lahteine
a99ecf71d8 Add support for i2c slave address 2016-08-10 23:30:35 -07:00
Scott Lahteine
b63d70b186 Fix serial output for MBL, M303 2016-08-10 18:49:52 -07:00
Scott Lahteine
a36a168af2 Use the truly configured middle on Delta 2016-08-10 00:03:22 -07:00
Scott Lahteine
58c8e6cef2 Fixes #4576: Convert filamentUsed to long for display 2016-08-09 23:57:28 -07:00
Scott Lahteine
01f1f779a5 Followup to #4574, specify L for long 2016-08-09 23:43:37 -07:00
Scott Lahteine
fa2467a834 Merge pull request #4578 from Kaibob2/patch-2
Update language_de.h with MSG_MOVE_E1 - E4
2016-08-09 23:04:15 -07:00
Kaibob2
1c7bd17e60 Update language_de.h with MSG_MOVE_E1 - E4
MSG_MOVE_E1 was missing
MSG_MOVE_E2 was missing
MSG_MOVE_E3 was missing
MSG_MOVE_E4 was missing

I assigned "0" to "MSG_MOVE_E1", "1" to "MSG_MOVE_E2" and so on, as this is what i assume to be the standard naming for the first (E0) and second (E1) extruder. This would have to be changed inthe other languages too :(
2016-08-09 20:49:26 +02:00
Scott Lahteine
bd8ea21abe Merge pull request #4574 from thinkyhead/rc_graphical_days
Include days in Graphical LCD print timer
2016-08-08 23:53:31 -07:00
Scott Lahteine
880cdb553b Include days in Graphical LCD print timer 2016-08-08 23:21:36 -07:00
Scott Lahteine
f4ac8c15e3 Merge pull request #4573 from thinkyhead/rc_mintemp_bed_later
Throw MINTEMP BED error only if heating
2016-08-08 23:02:42 -07:00
Scott Lahteine
b7b5b50a84 Throw bed min temp error only if heating 2016-08-08 22:49:22 -07:00
Scott Lahteine
d3ba878f70 Drop intermediate float in HEATER_0_USES_MAX6675 test 2016-08-08 22:49:22 -07:00
Scott Lahteine
3e8f9ecd1c Extend min/max_temp_error for the bed 2016-08-08 22:49:21 -07:00
Scott Lahteine
1f15f0df5f Merge pull request #4572 from thinkyhead/rc_digital_clock_100h
Show up to 99:59 in digital time
2016-08-08 22:28:29 -07:00
Scott Lahteine
b772172c84 Merge pull request #4571 from thinkyhead/rc_proper_delta_calibration
Patch command order in delta calibration menu
2016-08-08 21:50:42 -07:00
Scott Lahteine
8100a4dace Fix a compile error in EMERGENCY_PARSER sanity check 2016-08-08 21:49:57 -07:00
Scott Lahteine
45f67164b6 Simplify the delay in kill() 2016-08-08 21:49:34 -07:00
Scott Lahteine
30b1c731b5 Show up to 99:59 in digital time 2016-08-08 21:26:34 -07:00
Scott Lahteine
3be4511230 Patch command order in delta calibration menu 2016-08-08 21:15:25 -07:00
Scott Lahteine
9afa060ed6 Merge pull request #4570 from thinkyhead/rc_proper_delta_calibration
Make DELTA_CALIBRATION_MENU more universal
2016-08-08 21:11:40 -07:00
Scott Lahteine
46c8862635 Merge pull request #4564 from AnHardt/max-spi-setup
MISO is an input
2016-08-08 21:01:15 -07:00
Scott Lahteine
dad4702e85 Merge pull request #4569 from thinkyhead/rc_disable_slowdown_on_delta
Always disable SLOWDOWN for DELTA/SCARA
2016-08-08 20:58:40 -07:00
Scott Lahteine
88540d8ecf Fix: LCD displays SD status at startup 2016-08-08 20:53:18 -07:00
Scott Lahteine
b16ea09498 Make DELTA_CALIBRATION_MENU more universal 2016-08-08 20:42:58 -07:00
Scott Lahteine
85c4d5d2b5 Include DELTA_CALIBRATION_MENU in DELTA travis test 2016-08-08 20:35:04 -07:00
Scott Lahteine
3a56836ead Always disable SLOWDOWN for DELTA/SCARA 2016-08-08 18:06:46 -07:00
AnHardt
aa9b52b2e7 MISO is an input 2016-08-08 20:09:57 +02:00
Scott Lahteine
67c4acf750 Merge pull request #4562 from thinkyhead/rc_fix_z_dual_endstops
Fix Z_DUAL_ENDSTOPS with Z MIN Homing
2016-08-07 19:23:09 -07:00
Scott Lahteine
1edbea0fcb Merge pull request #4563 from thinkyhead/rc_explain_probe_heights
Explain that Z_PROBE_*_HEIGHT options are nozzle-relative
2016-08-07 19:22:19 -07:00
Scott Lahteine
e113740fa3 Specify that Z_PROBE_*_HEIGHT is nozzle-relative 2016-08-07 17:54:17 -07:00
Scott Lahteine
462e189edd Move pullups after Z_DUAL_ENDSTOPS block 2016-08-07 17:43:02 -07:00
Scott Lahteine
367dad5902 Sanity check Z_DUAL_ENDSTOPS with DELTA 2016-08-07 17:08:41 -07:00
Scott Lahteine
5fca110e0d Fix Z_DUAL_ENDSTOPS with MIN homing 2016-08-07 17:08:41 -07:00
Scott Lahteine
fc11f05c11 Merge pull request #4556 from thinkyhead/rc_all_feedrates_mm_s
Within Marlin, maintain most feed rates in mm/s
2016-08-07 16:14:16 -07:00
Scott Lahteine
7b2abe6fc8 Use steps_to_mm in extruder runout prevent 2016-08-07 00:28:52 -07:00
Scott Lahteine
d320065320 Within Marlin, maintain most feed rates in mm/s 2016-08-07 00:28:52 -07:00
Scott Lahteine
ed0b50ebee Merge pull request #4555 from thinkyhead/rc_mbl_index_rounding
Remove premature int-cast from MBL cell index methods
2016-08-06 23:34:01 -07:00
Scott Lahteine
bad286d52f Save CPU by multiplying by pre-compiled values 2016-08-06 23:24:07 -07:00
Scott Lahteine
dce6026e0e Remove premature cast to int 2016-08-06 23:01:29 -07:00
Scott Lahteine
cffe77c537 Merge pull request #4553 from thinkyhead/rc_lcd_chars_save_ram
Save bytes for custom chars (Hitachi LCD)
2016-08-06 18:29:16 -07:00
Scott Lahteine
0a1a2fea30 Merge pull request #4554 from thinkyhead/rc_anhardt_rep-max6675
Repair SPI-pins, some other pins
2016-08-06 18:10:55 -07:00
Scott Lahteine
42927530fe Explicitly clear the screen in lcd_goto_screen 2016-08-06 18:10:39 -07:00
Scott Lahteine
a6d2c2479f Minor cleanup of lcd_goto_screen calls 2016-08-06 18:10:39 -07:00
Scott Lahteine
e47c8b9829 Save bytes for custom chars (Hitachi LCD) 2016-08-06 18:10:39 -07:00
Scott Lahteine
0ff5005c9b Allow connector flexibility for BQ ZUM Mega 2016-08-06 17:19:12 -07:00
Scott Lahteine
98437bd488 Allow override of CONTROLLERFAN_PIN with RAMPS EFF 2016-08-06 17:19:12 -07:00
Scott Lahteine
93eafa1785 Use DISABLED to check TEENSY pin option 2016-08-06 17:19:12 -07:00
AnHardt
98392abb78 Clean warnings for pins_BQ_ZUM_MEGA_3D.h 2016-08-06 17:19:12 -07:00
AnHardt
1f239ac9a7 Extend travis test to check MAX6675 2016-08-06 17:19:11 -07:00
Scott Lahteine
31cad77ba9 Chmod a+x opt_disable_adv 2016-08-06 17:19:11 -07:00
AnHardt
020cd32d28 Update restore_configs
for travis builds.
2016-08-06 17:19:11 -07:00
AnHardt
98e96feee9 Repair SPI-pins
SCK_PIN can't be defined as DIO[number] they mus be defined as pure number.
So rebuilding the structure of fastio.h in pins.h.
2016-08-06 17:19:11 -07:00
Scott Lahteine
7145bd085d Merge pull request #4551 from thinkyhead/rc_anhardt_rep_stow_allen
Make Allen Key Probe stow
2016-08-06 16:31:51 -07:00
Scott Lahteine
a00783c41f Format probe stowed test code 2016-08-06 14:31:07 -07:00
AnHardt
f37e8a31d7 Make Allen Key Probe stow
by switching off the tests for the probe before the stow move.
2016-08-06 14:30:38 -07:00
Scott Lahteine
5347f39fce Merge pull request #4542 from AnHardt/rep-de
Repair-language.de
2016-08-05 23:50:35 -07:00
Scott Lahteine
5ef4a5577c Merge pull request #4537 from thinkyhead/rc_fix_some_flaws
Patch up some flaws here and there
2016-08-05 23:49:57 -07:00
AnHardt
0d3b67a580 Repair-language.de 2016-08-06 01:00:40 +02:00
Scott Lahteine
938e6d15c4 Patch up some flaws, here and there 2016-08-05 08:17:37 -07:00
Scott Lahteine
3a3984e67a Merge pull request #4535 from thinkyhead/rc_old_symbols_first
Move tests for old symbols to the top of sanity check
2016-08-04 21:24:02 -07:00
Scott Lahteine
d7b882e430 Move tests for old symbols to the top of sanity check 2016-08-04 21:03:55 -07:00
Scott Lahteine
479107d04f Merge pull request #4530 from Kaibob2/patch-1
Added / Update language_de.h
2016-08-04 16:58:50 -07:00
Scott Lahteine
dddaeb3f8c Merge pull request #4528 from thinkyhead/rc_make_it_so
Z-Height options replace Z-Raise options
2016-08-04 13:46:44 -07:00
Kaibob2
1abd7fa670 Update language_de.h
Added german translation for MSG_INFO_PRINT_LONGEST and  MSG_INFO_PRINT_FILAMENT.
MSG_HEATING_COMPLETE changed from "Aufgeheizt" to "Extr. aufgeheizt"
MSG_HEATING changed from "Aufheizen" to "Extr. aufheizen"
2016-08-04 09:40:38 +02:00
Andrea Cimbalo
46196e9ee5 Add working PlatformIO support 2016-07-03 15:33:24 +02:00
542 changed files with 324243 additions and 61580 deletions

20
.gitattributes vendored Normal file
View File

@@ -0,0 +1,20 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Files with Unix line endings
*.c text eol=lf
*.cpp text eol=lf
*.h text eol=lf
*.ino text eol=lf
*.py text eol=lf
*.sh text eol=lf
*.scad text eol=lf
# Files with native line endings
# *.sln text
# Binary files
*.png binary
*.jpg binary
*.fon binary

46
.github/code_of_conduct.md vendored Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [marlinfirmware@github.com](mailto:marlinfirmware@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/

144
.github/contributing.md vendored Normal file
View File

@@ -0,0 +1,144 @@
# Contributing to Marlin
Thanks for your interest in contributing to Marlin Firmware!
The following is a set of guidelines for contributing to Marlin, hosted by the [MarlinFirmware Organization](https://github.com/MarlinFirmware) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a Pull Request.
#### Table Of Contents
[Code of Conduct](#code-of-conduct)
[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
[How Can I Contribute?](#how-can-i-contribute)
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Features or Changes](#suggesting-features-or-changes)
* [Your First Code Contribution](#your-first-code-contribution)
* [Pull Requests](#pull-requests)
[Styleguides](#styleguides)
* [Git Commit Messages](#git-commit-messages)
* [C++ Coding Standards](#c++-coding-standards)
* [Documentation Styleguide](#documentation)
[Additional Notes](#additional-notes)
* [Issue and Pull Request Labels](#issue-and-pull-request-labels)
## Code of Conduct
This project and everyone participating in it is governed by the [Marlin Code of Conduct](code_of_conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [marlinfirmware@github.com](mailto:marlinfirmware@github.com).
## I don't want to read this whole thing I just have a question!!!
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
* [Marlin RepRap forum](http://forums.reprap.org/list.php?415)
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
If chat is more your speed, you can join the MarlinFirmware Slack team:
* Join the Marlin Slack Team
* To obtain group access, please [send a request](http://www.thinkyhead.com/contact/9) to @thinkyhead.
* Even though Slack is a chat service, sometimes it takes several hours for community members to respond &mdash; please be patient!
* Use the `#general` channel for general questions or discussion about Marlin.
* Other channels exist for certain topics. Check the channel list.
## How Can I Contribute?
### Reporting Bugs
This section guides you through submitting a Bug Report for Marlin. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](issue_template.md), the information it asks for helps us resolve issues faster.
> **Note:** Regressions can happen. If you find a **Closed** issue that seems like your issue, go ahead and open a new issue and include a link to the original issue in the body of your new one. All you need to create a link is the issue number, preceded by #. For example, #8888.
#### How Do I Submit A (Good) Bug Report?
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](issue_template.md).
Explain the problem and include additional details to help maintainers reproduce the problem:
* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Marlin, e.g. which command exactly you used in the terminal, or how you started Marlin otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Marlin command, and if so which one?
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets or log output in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
* **Explain which behavior you expected to see instead and why.**
* **Include detailed log output** especially for probing and leveling. See below for usage of `DEBUG_LEVELING_FEATURE`.
* **Include screenshots, links to videos, etc.** which clearly demonstrate the problem.
* **Include G-code** (if relevant) that reliably causes the problem to show itself.
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
Provide more context:
* **Can you reproduce the problem with a minimum of options enabled?**
* **Did the problem start happening recently** (e.g. after updating to a new version of Marlin) or was this always a problem?
* If the problem started happening recently, **can you reproduce the problem in an older version of Marlin?** What's the most recent version in which the problem doesn't happen? You can download older versions of Marlin from [the releases page](https://github.com/MarlinFirmware/Marlin/releases).
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
Include details about your configuration and environment:
* **Which version of Marlin are you using?** Marlin's exact version and build date can be seen in the startup message when a host connects to Marlin, or in the LCD Info menu (if enabled).
* **What kind of 3D Printer and electronics are you using**?
* **What kind of add-ons (probe, filament sensor) do you have**?
* **Include your Configuration files.** Make a ZIP file containing `Configuration.h` and `Configuration_adv.h` and drop it on your reply.
### Suggesting Features or Changes
This section guides you through submitting a suggestion for Marlin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
Before creating a suggestion, please check [this list](#before-submitting-a-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](issue_template.md), including the steps that you imagine you would take if the feature you're requesting existed.
#### Before Submitting a Feature Request
* **Check the [Marlin website](http://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](http://marlinfw.org/docs/configuration/configuration.html).
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
#### How Do I Submit A (Good) Feature Request?
Feature Requests are tracked as [GitHub issues](https://guides.github.com/features/issues/). Please follow these guidelines in your request:
* **Use a clear and descriptive title** for the issue to identify the suggestion.
* **Provide a step-by-step description of the requested feature** in as much detail as possible.
* **Provide specific examples to demonstrate the steps**.
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
* **Include screenshots and links to videos** which demonstrate the feature or point out the part of Marlin to which the request is related.
* **Explain why this feature would be useful** to most Marlin users.
* **Name other firmwares that have this feature, if any.**
### Your First Code Contribution
Unsure where to begin contributing to Marlin? You can start by looking through these `good-first-issue` and `help-wanted` issues:
* [Beginner issues][good-first-issue] - issues which should only require a few lines of code, and a test or two.
* [Help Wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues.
### Pull Requests
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](http://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
* Fill in [the required template](pull_request_template.md).
* Don't include issue numbers in the PR title.
* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed.
* Follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website.
* Document new code with clear and concise comments.
* End all files with a newline.
## Styleguides
### Git Commit Messages
* Use the present tense ("Add feature" not "Added feature").
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
* Limit the first line to 72 characters or fewer.
* Reference issues and Pull Requests liberally after the first line.
### C++ Coding Standards
* Please read and follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
### Documentation
* Guidelines for documentation are still under development. In-general, be clear, concise, and to-the-point.

31
.github/issue_template.md vendored Normal file
View File

@@ -0,0 +1,31 @@
<!--
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/1.1.x/.github/code_of_conduct.md
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use the Marlin Firmware forum at http://forums.reprap.org/list.php?415 or the Marlin Facebook Group https://www.facebook.com/groups/1049718498464482/.
Before filing an issue be sure to test the 1.1 and/or 2.0 "bugfix" branches to see whether the issue is already addressed.
-->
### Description
<!-- Description of the bug or requested feature -->
### Steps to Reproduce
<!-- If this is a Bug Report, please describe the steps needed to reproduce the issue -->
1. [First Step]
2. [Second Step]
3. [and so on...]
**Expected behavior:** [What you expect to happen]
**Actual behavior:** [What actually happens]
#### Additional Information
* Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
* Provide pictures or links to videos that clearly demonstrate the issue.
* See [How Can I Contribute](https://github.com/MarlinFirmware/Marlin/blob/1.1.x/.github/contributing.md#how-can-i-contribute) for additional guidelines.

19
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,19 @@
### Requirements
* Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
### Description
<!--
We must be able to understand your proposed change from this description. If we can't understand what the code will do from this description, the Pull Request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code recently, so please walk us through the concepts.
-->
### Benefits
<!-- What does this fix or improve? -->
### Related Issues
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->

37
.gitignore vendored Normal file → Executable file
View File

@@ -1,6 +1,6 @@
# #
# Marlin 3D Printer Firmware # Marlin 3D Printer Firmware
# Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] # Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
# #
# Based on Sprinter and grbl. # Based on Sprinter and grbl.
# Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm # Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -42,7 +42,7 @@ applet/
*.i *.i
*.ii *.ii
*.swp *.swp
tags
# #
# C++ # C++
@@ -52,6 +52,7 @@ applet/
*.lo *.lo
*.o *.o
*.obj *.obj
*.ino.cpp
# Precompiled Headers # Precompiled Headers
*.gch *.gch
@@ -114,3 +115,35 @@ applet/
# Debug files # Debug files
*.dSYM/ *.dSYM/
*.su *.su
# PlatformIO files/dirs
.pio*
.pioenvs
.piolibdeps
lib/readme.txt
#Visual Studio
*.sln
*.vcxproj
*.vcxproj.user
*.vcxproj.filters
Release/
Debug/
__vm/
.vs/
vc-fileutils.settings
#Visual Studio Code
.vscode
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/*.db
#cmake
CMakeLists.txt
Marlin/CMakeLists.txt
CMakeListsPrivate.txt
#CLion
cmake-build-*

View File

@@ -1,4 +1,6 @@
--- dist: bionic
sudo: true
#
language: c language: c
# #
notifications: notifications:
@@ -11,7 +13,7 @@ before_install:
# #
# Publish the buildroot script folder # Publish the buildroot script folder
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/* - chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
- ln -s ${TRAVIS_BUILD_DIR}/buildroot/bin/ ~/bin - export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${PATH}
# #
# Start fb X server # 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" - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
@@ -20,10 +22,10 @@ before_install:
# #
install: install:
# #
# Install arduino 1.6.9 # Install arduino 1.8.5
- wget http://downloads-02.arduino.cc/arduino-1.6.9-linux64.tar.xz - wget http://downloads.arduino.cc/arduino-1.8.9-linux64.tar.xz
- tar xf arduino-1.6.9-linux64.tar.xz - tar xf arduino-1.8.9-linux64.tar.xz
- sudo mv arduino-1.6.9 /usr/local/share/arduino - sudo mv arduino-1.8.9 /usr/local/share/arduino
- ln -s /usr/local/share/arduino/arduino ${TRAVIS_BUILD_DIR}/buildroot/bin/arduino - ln -s /usr/local/share/arduino/arduino ${TRAVIS_BUILD_DIR}/buildroot/bin/arduino
# #
# Install: LiquidCrystal_I2C library # Install: LiquidCrystal_I2C library
@@ -35,15 +37,28 @@ install:
- sudo mv LiquidTWI2 /usr/local/share/arduino/libraries/LiquidTWI2 - sudo mv LiquidTWI2 /usr/local/share/arduino/libraries/LiquidTWI2
# #
# Install: Monochrome Graphics Library for LCDs and OLEDs # Install: Monochrome Graphics Library for LCDs and OLEDs
- arduino --install-library "U8glib" - 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 # Install: L6470 Stepper Motor Driver library
- git clone https://github.com/ameyer/Arduino-L6470.git # - git clone https://github.com/ameyer/Arduino-L6470.git
- sudo mv Arduino-L6470/L6470 /usr/local/share/arduino/libraries/L6470 # - sudo mv Arduino-L6470/L6470 /usr/local/share/arduino/libraries/L6470
# #
# Install: TMC26X Stepper Motor Controller library # Install: TMC26X Stepper Motor Controller library
- git clone https://github.com/trinamic/TMC26XStepper.git # - git clone https://github.com/trinamic/TMC26XStepper.git
- sudo mv TMC26XStepper /usr/local/share/arduino/libraries/TMC26XStepper # - 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: before_script:
# #
@@ -66,84 +81,94 @@ script:
# #
- build_marlin - build_marlin
# #
# Test heated bed temperature sensor # Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
# # Test a "Fix Mounted" Probe with Safe Homing, some arc options,
- opt_set TEMP_SENSOR_BED 1 # linear bed leveling, M48, leveling debug, and firmware retraction.
- build_marlin
#
# Test 2 extruders on basic RAMPS 1.4
# #
- opt_set MOTHERBOARD BOARD_RAMPS_14_EEB - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
- opt_set EXTRUDERS 2 - opt_set EXTRUDERS 2
- opt_set TEMP_SENSOR_0 -2
- opt_set TEMP_SENSOR_1 1 - 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 - build_marlin
# #
# Test 3 extruders on RUMBA (can use any board with >=3 extruders defined) # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders
# Include a test for LIN_ADVANCE here also
#
- opt_set MOTHERBOARD BOARD_RUMBA
- opt_set EXTRUDERS 3
- opt_set TEMP_SENSOR_2 1
- opt_enable_adv LIN_ADVANCE
- build_marlin
#
# Test PIDTEMPBED
# #
- restore_configs - restore_configs
- opt_enable PIDTEMPBED - 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 - build_marlin
# #
# Test a "Fix Mounted" Probe along with Safe Homing # Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language
# #
- restore_configs - opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE S_CURVE_ACCELERATION
- opt_enable FIX_MOUNTED_PROBE Z_SAFE_HOMING - opt_set LCD_LANGUAGE kana_utf8
- build_marlin - opt_disable SEGMENT_LEVELED_MOVES
# - opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING
# ...with AUTO_BED_LEVELING_FEATURE, Z_MIN_PROBE_REPEATABILITY_TEST, & DEBUG_LEVELING_FEATURE
#
- opt_enable AUTO_BED_LEVELING_FEATURE Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
- build_marlin
#
# Test a Sled Z Probe
#
- restore_configs
- opt_enable Z_PROBE_SLED
- build_marlin
#
# ...with AUTO_BED_LEVELING_FEATURE & DEBUG_LEVELING_FEATURE
#
- opt_enable AUTO_BED_LEVELING_FEATURE DEBUG_LEVELING_FEATURE
- build_marlin - build_marlin
# #
# Test a Servo Probe # 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 - restore_configs
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE - opt_enable NUM_SERVOS Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
- build_marlin - opt_set NUM_SERVOS 1
# - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
# ...with AUTO_BED_LEVELING_FEATURE & DEBUG_LEVELING_FEATURE - opt_enable_adv NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
#
- opt_enable AUTO_BED_LEVELING_FEATURE DEBUG_LEVELING_FEATURE
- build_marlin - build_marlin
# #
# Test MESH_BED_LEVELING feature, with LCD # Test MESH_BED_LEVELING feature, with LCD
# #
- restore_configs - restore_configs
- opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN MANUAL_BED_LEVELING ULTIMAKERCONTROLLER - opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
- build_marlin - build_marlin
# #
# Test EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER, # 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 # INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
# #
- restore_configs - restore_configs
- opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT - 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 - build_marlin
# #
# Mixing Extruder # Mixing Extruder with 5 steppers, Cyrillic
# #
- restore_configs - restore_configs
- opt_enable MIXING_EXTRUDER - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
- opt_set MIXING_STEPPERS 2 - opt_enable MIXING_EXTRUDER CR10_STOCKDISPLAY
- opt_set MIXING_STEPPERS 5
- opt_set LCD_LANGUAGE ru
- build_marlin - build_marlin
# #
# Test DUAL_X_CARRIAGE # Test DUAL_X_CARRIAGE
@@ -158,11 +183,11 @@ script:
# #
# Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER # Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
# #
- restore_configs #- restore_configs
- opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D #- opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D
- opt_set LCD_FEEDBACK_FREQUENCY_DURATION_MS 10 #- opt_set LCD_FEEDBACK_FREQUENCY_DURATION_MS 10
- opt_set LCD_FEEDBACK_FREQUENCY_HZ 100 #- opt_set LCD_FEEDBACK_FREQUENCY_HZ 100
- opt_enable BQ_LCD_SMART_CONTROLLER SPEAKER #- opt_enable BQ_LCD_SMART_CONTROLLER SPEAKER
# #
# Test SWITCHING_EXTRUDER # Test SWITCHING_EXTRUDER
# #
@@ -171,98 +196,46 @@ script:
- opt_set EXTRUDERS 2 - opt_set EXTRUDERS 2
- opt_enable NUM_SERVOS - opt_enable NUM_SERVOS
- opt_set NUM_SERVOS 1 - opt_set NUM_SERVOS 1
- opt_set TEMP_SENSOR_1 1
- opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER - opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
- build_marlin - build_marlin
# #
# Test MINIRAMBO for PWM_MOTOR_CURRENT
#
- restore_configs
- opt_set MOTHERBOARD BOARD_MINIRAMBO
- build_marlin
#
# Test FILAMENT_CHANGE_FEATURE and LCD_INFO_MENU
#
- restore_configs
- opt_enable ULTIMAKERCONTROLLER
- opt_enable_adv FILAMENT_CHANGE_FEATURE LCD_INFO_MENU
- build_marlin
#
# Enable filament sensor
#
- restore_configs
- opt_enable FILAMENT_WIDTH_SENSOR
- build_marlin
#
# Enable filament sensor with LCD display
#
- opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY
- build_marlin
#
# Enable BEZIER_CURVE_SUPPORT
#
- restore_configs
- opt_enable_adv BEZIER_CURVE_SUPPORT
- build_marlin
#
# Enable COREXY # Enable COREXY
# #
- restore_configs #- restore_configs
- opt_enable COREXY #- opt_enable COREXY
- build_marlin #- build_marlin
# #
# Enable COREXZ # Test many less common options
# #
- restore_configs - restore_configs
- opt_enable COREXZ - 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 - build_marlin
# #
# Enable Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS ######## Other Standard LCD/Panels ##############
#
- restore_configs
- opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
- pins_set RAMPS X_MAX_PIN -1
- opt_set_adv Z2_MAX_PIN 2
- build_marlin
#
# Test PRINTCOUNTER
#
- restore_configs
- opt_enable PRINTCOUNTER
- build_marlin
#
# Test NOZZLE_PARK_FEATURE
#
- restore_configs
- opt_enable NOZZLE_PARK_FEATURE
- build_marlin
#
# Test NOZZLE_CLEAN_FEATURE
#
- restore_configs
- opt_enable NOZZLE_CLEAN_FEATURE
- build_marlin
#
#
######## STANDARD LCD/PANELS ##############
# #
# ULTRA_LCD # ULTRA_LCD
# #
- restore_configs #- restore_configs
- opt_enable ULTRA_LCD #- opt_enable ULTRA_LCD
- build_marlin #- build_marlin
# #
# DOGLCD # DOGLCD
# #
- restore_configs #- restore_configs
- opt_enable DOGLCD #- opt_enable DOGLCD
- build_marlin #- build_marlin
#
# ULTIMAKERCONTROLLER
#
- restore_configs
- opt_enable ULTIMAKERCONTROLLER
- build_marlin
# #
# MAKRPANEL # MAKRPANEL
# Needs to use Melzi and Sanguino hardware # Needs to use Melzi and Sanguino hardware
@@ -271,22 +244,33 @@ script:
#- opt_enable MAKRPANEL #- opt_enable MAKRPANEL
#- build_marlin #- build_marlin
# #
# REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, and BABYSTEPPING # REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, BABYSTEPPING, RIGIDBOARD_V2, and DAC_MOTOR_CURRENT_DEFAULT
# #
- restore_configs #- restore_configs
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING #- opt_set MOTHERBOARD BOARD_RIGIDBOARD_V2
- build_marlin #- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
#- build_marlin
# #
# G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
# #
# G3D_PANEL #- 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
# #
- restore_configs # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with LIGHTWEIGHT_UI
- opt_enable G3D_PANEL SDSUPPORT
- build_marlin
#
# REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
# #
- restore_configs - restore_configs
- opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT - 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 - build_marlin
# #
# REPRAPWORLD_KEYPAD # REPRAPWORLD_KEYPAD
@@ -298,9 +282,9 @@ script:
# #
# RA_CONTROL_PANEL # RA_CONTROL_PANEL
# #
- restore_configs #- restore_configs
- opt_enable RA_CONTROL_PANEL #- opt_enable RA_CONTROL_PANEL PINS_DEBUGGING
- build_marlin #- build_marlin
# #
######## I2C LCD/PANELS ############## ######## I2C LCD/PANELS ##############
# #
@@ -308,10 +292,10 @@ script:
# Most I2C configurations are failing at the moment because they require # Most I2C configurations are failing at the moment because they require
# a different Liquid Crystal library "LiquidTWI2". # a different Liquid Crystal library "LiquidTWI2".
# #
# LCD_I2C_SAINSMART_YWROBOT # LCD_SAINSMART_I2C_1602
# #
#- restore_configs #- restore_configs
#- opt_enable LCD_I2C_SAINSMART_YWROBOT #- opt_enable LCD_SAINSMART_I2C_1602
#- build_marlin #- build_marlin
# #
# LCD_I2C_PANELOLU2 # LCD_I2C_PANELOLU2
@@ -328,33 +312,43 @@ script:
# #
# LCM1602 # LCM1602
# #
- restore_configs #- restore_configs
- opt_enable LCM1602 #- opt_enable LCM1602
- build_marlin #- 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 ############## ######## Example Configurations ##############
# #
# BQ Hephestos 2 # BQ Hephestos 2
- restore_configs #- restore_configs
- use_example_configs Hephestos_2 #- use_example_configs Hephestos_2
- build_marlin #- build_marlin
# #
# Delta Config (generic) # Delta Config (generic) + ABL bilinear + PROBE_MANUALLY
- restore_configs
- use_example_configs delta/generic - use_example_configs delta/generic
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
- build_marlin - build_marlin
# #
# Delta Config (generic) + ABL + ALLEN_KEY # Delta Config (generic) + UBL + ALLEN_KEY + OLED_PANEL_TINYBOY2 + EEPROM_SETTINGS
# #
- use_example_configs delta/generic - use_example_configs delta/generic
- opt_disable DISABLE_MIN_ENDSTOPS - opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT
- opt_enable AUTO_BED_LEVELING_FEATURE Z_PROBE_ALLEN_KEY - opt_enable OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
- build_marlin - build_marlin
# #
# Delta Config (Mini Kossel) # Delta Config (FLSUN AC because it's complex)
# #
- use_example_configs delta/kossel_mini - use_example_configs delta/FLSUN/auto_calibrate
- build_marlin - build_marlin
# #
# Makibox Config need to check board type for Teensy++ 2.0 # Makibox Config need to check board type for Teensy++ 2.0
@@ -362,10 +356,25 @@ script:
#- use_example_configs makibox #- use_example_configs makibox
#- build_marlin #- build_marlin
# #
# SCARA Config # SCARA with TMC2130
# #
- use_example_configs SCARA - use_example_configs SCARA
- opt_enable AUTO_BED_LEVELING_FEATURE FIX_MOUNTED_PROBE USE_ZMIN_PLUG - 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 - build_marlin
# #
# tvrrug Config need to check board type for sanguino atmega644p # tvrrug Config need to check board type for sanguino atmega644p

View File

@@ -22,7 +22,7 @@
/** /**
* Conditionals_LCD.h * Conditionals_LCD.h
* LCD Defines that depend on configuration but are not editable. * 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 #ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first
@@ -31,22 +31,41 @@
#define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT)) #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
#if ENABLED(CARTESIO_UI) #if ENABLED(CARTESIO_UI)
#define DOGLCD #define DOGLCD
#define ULTIPANEL #define ULTIPANEL
#define NEWPANEL
#define DEFAULT_LCD_CONTRAST 90 #define DEFAULT_LCD_CONTRAST 90
#define LCD_CONTRAST_MIN 60 #define LCD_CONTRAST_MIN 60
#define LCD_CONTRAST_MAX 140 #define LCD_CONTRAST_MAX 140
#endif
#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL) #elif ENABLED(MAKRPANEL)
#define DOGLCD
#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 #define ULTIPANEL
#define NEWPANEL
#define DEFAULT_LCD_CONTRAST 17
#endif
#if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) // 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 ULTRA_LCD //general LCD support, also 16x2
#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
@@ -55,8 +74,12 @@
#define LCD_CONTRAST_MIN 75 #define LCD_CONTRAST_MIN 75
#define LCD_CONTRAST_MAX 115 #define LCD_CONTRAST_MAX 115
#define DEFAULT_LCD_CONTRAST 95 #define DEFAULT_LCD_CONTRAST 95
#define U8GLIB_ST7565_64128N
#elif ENABLED(VIKI2) #elif ENABLED(VIKI2)
#define DEFAULT_LCD_CONTRAST 40 #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) #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define LCD_CONTRAST_MIN 90 #define LCD_CONTRAST_MIN 90
#define LCD_CONTRAST_MAX 130 #define LCD_CONTRAST_MAX 130
@@ -65,40 +88,90 @@
#define SD_DETECT_INVERTED #define SD_DETECT_INVERTED
#endif #endif
#ifndef ENCODER_PULSES_PER_STEP #elif ENABLED(OLED_PANEL_TINYBOY2)
#define ENCODER_PULSES_PER_STEP 4
#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 #endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM #ifndef ST7920_DELAY_2
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define ST7920_DELAY_2 DELAY_NS(125)
#endif #endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif #endif
// Generic support for SSD1306 / SH1106 OLED based LCDs. #elif ENABLED(MKS_12864OLED)
#if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
#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 ULTRA_LCD //general LCD support, also 16x2
#define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family) #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SSD1309 / SH1106 graphic Display Family)
#endif #endif
#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
#define ULTIMAKERCONTROLLER #define ULTIMAKERCONTROLLER
#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define LCD_WIDTH 16
#define LCD_HEIGHT 2
#endif #endif
#if ENABLED(BQ_LCD_SMART_CONTROLLER) #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER)
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 4
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#ifndef LONG_FILENAME_HOST_SUPPORT
#define LONG_FILENAME_HOST_SUPPORT
#endif
#endif
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define DOGLCD #define DOGLCD
#define U8GLIB_ST7920 #define U8GLIB_ST7920
#define REPRAP_DISCOUNT_SMART_CONTROLLER #define REPRAP_DISCOUNT_SMART_CONTROLLER
@@ -108,75 +181,90 @@
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
|| ENABLED(G3D_PANEL) \ || ENABLED(G3D_PANEL) \
|| ENABLED(RIGIDBOT_PANEL) \ || ENABLED(RIGIDBOT_PANEL) \
|| ENABLED(REPRAPWORLD_KEYPAD) || ENABLED(ULTI_CONTROLLER)
#define ULTIPANEL #define ULTIPANEL
#define NEWPANEL
#endif #endif
#if ENABLED(RA_CONTROL_PANEL) #if ENABLED(REPRAPWORLD_KEYPAD)
#define LCD_I2C_TYPE_PCA8574
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define ULTIPANEL
#define NEWPANEL #define NEWPANEL
#if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP)
#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
#endif #endif
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define DOGLCD
#define U8GLIB_ST7920
#define ULTIPANEL
#define NEWPANEL
#endif #endif
/** /**
* I2C PANELS * I2C PANELS
*/ */
#if ENABLED(LCD_I2C_SAINSMART_YWROBOT) #if ENABLED(LCD_SAINSMART_I2C_1602) || ENABLED(LCD_SAINSMART_I2C_2004)
// This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
// Make sure it is placed in the Arduino libraries directory.
#define LCD_I2C_TYPE_PCF8575 #define LCD_I2C_TYPE_PCF8575
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define ULTIPANEL #define ULTRA_LCD
#define NEWPANEL
#if ENABLED(LCD_SAINSMART_I2C_2004)
#define LCD_WIDTH 20
#define LCD_HEIGHT 4
#endif #endif
#elif ENABLED(LCD_I2C_PANELOLU2)
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
#if ENABLED(LCD_I2C_PANELOLU2)
#define LCD_I2C_TYPE_MCP23017 #define LCD_I2C_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 4
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#define ULTIPANEL #define ULTIPANEL
#define NEWPANEL
#endif
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs #elif ENABLED(LCD_I2C_VIKI)
#if ENABLED(LCD_I2C_VIKI)
// 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. * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
// 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) * 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_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
#define ULTIPANEL #define ULTIPANEL
#define NEWPANEL
#define ENCODER_FEEDRATE_DEADZONE 4 #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 #ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 1 #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
#endif #endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM #ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 2 #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
#endif #endif
#ifndef ENCODER_FEEDRATE_DEADZONE
#define ENCODER_FEEDRATE_DEADZONE 6
#endif #endif
// Shift register panels // Shift register panels
@@ -187,20 +275,27 @@
#if ENABLED(SAV_3DLCD) #if ENABLED(SAV_3DLCD)
#define SR_LCD_2W_NL // Non latching 2 wire shift register #define SR_LCD_2W_NL // Non latching 2 wire shift register
#define ULTIPANEL #define ULTIPANEL
#define NEWPANEL
#endif #endif
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
#ifndef LCD_WIDTH #ifndef LCD_WIDTH
#ifdef LCD_WIDTH_OVERRIDE
#define LCD_WIDTH LCD_WIDTH_OVERRIDE
#else
#define LCD_WIDTH 22 #define LCD_WIDTH 22
#endif #endif
#endif
#ifndef LCD_HEIGHT #ifndef LCD_HEIGHT
#define LCD_HEIGHT 5 #define LCD_HEIGHT 5
#endif #endif
#endif #endif
#if ENABLED(NO_LCD_MENUS)
#undef ULTIPANEL
#endif
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
#define NEWPANEL //enable this if you have a click-encoder panel #define NEWPANEL // Disable this if you actually have no click-encoder panel
#define ULTRA_LCD #define ULTRA_LCD
#ifndef LCD_WIDTH #ifndef LCD_WIDTH
#define LCD_WIDTH 20 #define LCD_WIDTH 20
@@ -208,8 +303,7 @@
#ifndef LCD_HEIGHT #ifndef LCD_HEIGHT
#define LCD_HEIGHT 4 #define LCD_HEIGHT 4
#endif #endif
#else //no panel but just LCD #elif ENABLED(ULTRA_LCD) // no panel but just LCD
#if ENABLED(ULTRA_LCD)
#ifndef LCD_WIDTH #ifndef LCD_WIDTH
#define LCD_WIDTH 16 #define LCD_WIDTH 16
#endif #endif
@@ -217,7 +311,6 @@
#define LCD_HEIGHT 2 #define LCD_HEIGHT 2
#endif #endif
#endif #endif
#endif
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
/* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */ /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
@@ -233,18 +326,22 @@
#define LCD_STR_DEGREE "\x09" #define LCD_STR_DEGREE "\x09"
#define LCD_STR_SPECIAL_MAX '\x09' #define LCD_STR_SPECIAL_MAX '\x09'
// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin. // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. // 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 #else
/* Custom characters defined in the first 8 characters of the LCD */ // Custom characters defined in the first 8 characters of the LCD
#define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string! #define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string!
#define LCD_STR_DEGREE "\x01" #define LCD_DEGREE_CHAR 0x01
#define LCD_STR_THERMOMETER "\x02" #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
#define LCD_STR_UPLEVEL "\x03" #define LCD_UPLEVEL_CHAR 0x03
#define LCD_STR_REFRESH "\x04" #define LCD_STR_REFRESH "\x04"
#define LCD_STR_FOLDER "\x05" #define LCD_STR_FOLDER "\x05"
#define LCD_STR_FEEDRATE "\x06" #define LCD_FEEDRATE_CHAR 0x06
#define LCD_STR_CLOCK "\x07" #define LCD_CLOCK_CHAR 0x07
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */ #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
#endif #endif
@@ -274,10 +371,15 @@
#endif #endif
#endif #endif
#ifndef BOOTSCREEN_TIMEOUT // Boot screens
#if DISABLED(ULTRA_LCD)
#undef SHOW_BOOTSCREEN
#elif !defined(BOOTSCREEN_TIMEOUT)
#define BOOTSCREEN_TIMEOUT 2500 #define BOOTSCREEN_TIMEOUT 2500
#endif #endif
#define HAS_DEBUG_MENU (ENABLED(ULTIPANEL) && ENABLED(LCD_PROGRESS_BAR_TEST))
/** /**
* Extruders have some combination of stepper motors and hotends * Extruders have some combination of stepper motors and hotends
* so we separate these concepts into the defines: * so we separate these concepts into the defines:
@@ -285,35 +387,176 @@
* EXTRUDERS - Number of Selectable Tools * EXTRUDERS - Number of Selectable Tools
* HOTENDS - Number of hotends, whether connected or separate * HOTENDS - Number of hotends, whether connected or separate
* E_STEPPERS - Number of actual E stepper motors * E_STEPPERS - Number of actual E stepper motors
* TOOL_E_INDEX - Index to use when getting/setting the tool state * E_MANUAL - Number of E steppers for LCD move options
* *
*/ */
#if ENABLED(SINGLENOZZLE) // One hotend, multi-extruder #if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
#define HOTENDS 1 #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_STEPPERS EXTRUDERS
#define E_MANUAL EXTRUDERS #define E_MANUAL EXTRUDERS
#define TOOL_E_INDEX current_block->active_extruder #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 TEMP_SENSOR_1_AS_REDUNDANT
#undef HOTEND_OFFSET_X #undef HOTEND_OFFSET_X
#undef HOTEND_OFFSET_Y #undef HOTEND_OFFSET_Y
#elif ENABLED(SWITCHING_EXTRUDER) // One E stepper, unified E axis, two hotends
#define HOTENDS EXTRUDERS
#define E_STEPPERS 1
#define E_MANUAL 1
#define TOOL_E_INDEX 0
#ifndef HOTEND_OFFSET_Z
#define HOTEND_OFFSET_Z { 0 }
#endif
#elif ENABLED(MIXING_EXTRUDER) // Multi-stepper, unified E axis, one hotend
#define HOTENDS 1
#define E_STEPPERS MIXING_STEPPERS
#define E_MANUAL 1
#define TOOL_E_INDEX 0
#else // One stepper, E axis, and hotend per tool
#define HOTENDS EXTRUDERS
#define E_STEPPERS EXTRUDERS
#define E_MANUAL EXTRUDERS
#define TOOL_E_INDEX current_block->active_extruder
#endif #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 #endif // CONDITIONALS_LCD_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,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

337
Marlin/HAL.h Normal file
View File

@@ -0,0 +1,337 @@
/* **************************************************************************
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/>.
****************************************************************************/
/**
* Description: HAL for __AVR__
*/
#ifndef _HAL_AVR_H_
#define _HAL_AVR_H_
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "fastio.h"
#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>
// --------------------------------------------------------------------------
// 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
#endif
#define ISRS_ENABLED() TEST(SREG, SREG_I)
#define ENABLE_ISRS() sei()
#define DISABLE_ISRS() cli()
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
typedef uint16_t hal_timer_t;
#define HAL_TIMER_TYPE_MAX 0xFFFF
typedef int8_t pin_t;
#define HAL_SERVO_LIB Servo
// --------------------------------------------------------------------------
// Public Variables
// --------------------------------------------------------------------------
//extern uint8_t MCUSR;
// --------------------------------------------------------------------------
// Public functions
// --------------------------------------------------------------------------
//void cli(void);
//void _delay_ms(const int delay);
inline void HAL_clear_reset_source(void) { MCUSR = 0; }
inline uint8_t HAL_get_reset_source(void) { return MCUSR; }
// 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
#define STEP_TIMER_NUM 1
#define TEMP_TIMER_NUM 0
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
#define STEPPER_TIMER_PRESCALE 8
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
#define STEPPER_ISR_ENABLED() TEST(TIMSK1, OCIE1A)
#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B)
#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 frequency) {
UNUSED(frequency);
switch (timer_num) {
case STEP_TIMER_NUM:
// waveform generation = 0100 = CTC
SET_WGM(1, CTC_OCRnA);
// output mode = 00 (disconnected)
SET_COMA(1, NORMAL);
// Set the timer pre-scaler
// Generally we use a divider of 8, resulting in a 2MHz timer
// frequency on a 16MHz MCU. If you are going to change this, be
// sure to regenerate speed_lookuptable.h with
// create_speed_lookuptable.py
SET_CS(1, PRESCALER_8); // CS 2 = 1/8 prescaler
// Init Stepper ISR to 122 Hz for quick starting
// (F_CPU) / (STEPPER_TIMER_PRESCALE) / frequency
OCR1A = 0x4000;
TCNT1 = 0;
break;
case TEMP_TIMER_NUM:
// Use timer0 for temperature measurement
// Interleave temperature interrupt with millies interrupt
OCR0B = 128;
break;
}
}
#define TIMER_OCR_1 OCR1A
#define TIMER_COUNTER_1 TCNT1
#define TIMER_OCR_0 OCR0A
#define TIMER_COUNTER_0 TCNT0
#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)
/**
* On AVR there is no hardware prioritization and preemption of
* interrupts, so this emulates it. The UART has first priority
* (otherwise, characters will be lost due to UART overflow).
* Then: Stepper, Endstops, Temperature, and -finally- all others.
*/
#define HAL_timer_isr_prologue(TIMER_NUM)
#define HAL_timer_isr_epilogue(TIMER_NUM)
/* 18 cycles maximum latency */
#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 */ \
A("push r16") /* 2 Save SREG into stack */ \
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
A("push r16") /* 2 Save TIMSK0 into the stack */ \
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
A("sts %[timsk0], r16") /* 2 And set the new value */ \
A("lds r16, %[timsk1]") /* 2 Load into R0 the stepper timer Interrupt mask register [TIMSK1] */ \
A("andi r16,~%[msk1]") /* 1 Disable the stepper ISR */ \
A("sts %[timsk1], r16") /* 2 And set the new value */ \
A("push r16") /* 2 Save TIMSK1 into stack */ \
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
A("push r16") /* 2 Save RAMPZ into stack */ \
A("in r16, 0x3C") /* 1 Get EIND register */ \
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
A("push r1") \
A("push r18") \
A("push r19") \
A("push r20") \
A("push r21") \
A("push r22") \
A("push r23") \
A("push r24") \
A("push r25") \
A("push r26") \
A("push r27") \
A("push r30") \
A("push r31") \
A("clr r1") /* C runtime expects this register to be 0 */ \
A("call TIMER1_COMPA_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
A("pop r31") \
A("pop r30") \
A("pop r27") \
A("pop r26") \
A("pop r25") \
A("pop r24") \
A("pop r23") \
A("pop r22") \
A("pop r21") \
A("pop r20") \
A("pop r19") \
A("pop r18") \
A("pop r1") \
A("pop r0") \
A("out 0x3C, r16") /* 1 Restore EIND register */ \
A("pop r16") /* 2 Get the original RAMPZ register value */ \
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
A("pop r16") /* 2 Get the original TIMSK1 value but with stepper ISR disabled */ \
A("ori r16,%[msk1]") /* 1 Reenable the stepper ISR */ \
A("cli") /* 1 Disable global interrupts - Reenabling Stepper ISR can reenter amd temperature can reenter, and we want that, if it happens, after this ISR has ended */ \
A("sts %[timsk1], r16") /* 2 And restore the old value - This reenables the stepper ISR */ \
A("pop r16") /* 2 Get the temperature timer Interrupt mask register [TIMSK0] */ \
A("sts %[timsk0], r16") /* 2 And restore the old value - This reenables the temperature ISR */ \
A("pop r16") /* 2 Get the old SREG value */ \
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
A("pop r16") /* 2 Restore R16 value */ \
A("reti") /* 4 Return from interrupt */ \
: \
: [timsk0] "i" ((uint16_t)&TIMSK0), \
[timsk1] "i" ((uint16_t)&TIMSK1), \
[msk0] "M" ((uint8_t)(1<<OCIE0B)),\
[msk1] "M" ((uint8_t)(1<<OCIE1A)) \
: \
); \
} \
void TIMER1_COMPA_vect_bottom(void)
/* 14 cycles maximum latency */
#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 */ \
A("push r16") /* 2 Save SREG into stack */ \
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
A("sts %[timsk0], r16") /* 2 And set the new value */ \
A("sei") /* 1 Enable global interrupts - It is safe, as the temperature ISR is disabled, so we cannot reenter it */ \
A("push r16") /* 2 Save TIMSK0 into stack */ \
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
A("push r16") /* 2 Save RAMPZ into stack */ \
A("in r16, 0x3C") /* 1 Get EIND register */ \
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
A("push r1") \
A("push r18") \
A("push r19") \
A("push r20") \
A("push r21") \
A("push r22") \
A("push r23") \
A("push r24") \
A("push r25") \
A("push r26") \
A("push r27") \
A("push r30") \
A("push r31") \
A("clr r1") /* C runtime expects this register to be 0 */ \
A("call TIMER0_COMPB_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
A("pop r31") \
A("pop r30") \
A("pop r27") \
A("pop r26") \
A("pop r25") \
A("pop r24") \
A("pop r23") \
A("pop r22") \
A("pop r21") \
A("pop r20") \
A("pop r19") \
A("pop r18") \
A("pop r1") \
A("pop r0") \
A("out 0x3C, r16") /* 1 Restore EIND register */ \
A("pop r16") /* 2 Get the original RAMPZ register value */ \
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
A("pop r16") /* 2 Get the original TIMSK0 value but with temperature ISR disabled */ \
A("ori r16,%[msk0]") /* 1 Enable temperature ISR */ \
A("cli") /* 1 Disable global interrupts - We must do this, as we will reenable the temperature ISR, and we don't want to reenter this handler until the current one is done */ \
A("sts %[timsk0], r16") /* 2 And restore the old value */ \
A("pop r16") /* 2 Get the old SREG */ \
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
A("pop r16") /* 2 Restore R16 */ \
A("reti") /* 4 Return from interrupt */ \
: \
: [timsk0] "i"((uint16_t)&TIMSK0), \
[msk0] "M" ((uint8_t)(1<<OCIE0B)) \
: \
); \
} \
void TIMER0_COMPB_vect_bottom(void)
// ADC
#ifdef DIDR2
#define HAL_ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin & 0x07); }while(0)
#else
#define HAL_ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0)
#endif
inline void HAL_adc_init(void) {
ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07;
DIDR0 = 0;
#ifdef DIDR2
DIDR2 = 0;
#endif
}
#define SET_ADMUX_ADCSRA(pin) ADMUX = _BV(REFS0) | (pin & 0x07); SBI(ADCSRA, ADSC)
#ifdef MUX5
#define HAL_START_ADC(pin) if (pin > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#else
#define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#endif
#define HAL_READ_ADC() ADC
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
#define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
#define HAL_SENSITIVE_PINS 0, 1
#endif // _HAL_AVR_H_

File diff suppressed because it is too large Load Diff

342
Marlin/I2CPositionEncoder.h Normal file
View File

@@ -0,0 +1,342 @@
/**
* 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 I2CPOSENC_H
#define I2CPOSENC_H
#include "MarlinConfig.h"
#if ENABLED(I2C_POSITION_ENCODERS)
#include "enum.h"
#include "macros.h"
#include "types.h"
#include <Wire.h>
//=========== Advanced / Less-Common Encoder Configuration Settings ==========
#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_DEBUG // enable encoder-related debug serial echos
#define I2CPE_REBOOT_TIME 5000 // time we wait for an encoder module to reboot
// after changing address.
#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_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_LED_PAR_MODE 10
#define I2CPE_LED_PAR_BRT 11
#define I2CPE_LED_PAR_RATE 14
#define I2CPE_REPORT_DISTANCE 0
#define I2CPE_REPORT_STRENGTH 1
#define I2CPE_REPORT_VERSION 2
// 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_DEF_AXIS X_AXIS
#define I2CPE_DEF_ADDR I2CPE_PRESET_ADDR_X
// 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
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
#define I2CPE_ERR_ARRAY_SIZE 32
#define I2CPE_ERR_PRST_ARRAY_SIZE 10
#endif
// Error Correction Methods
#define I2CPE_ECM_NONE 0
#define I2CPE_ECM_MICROSTEP 1
#define I2CPE_ECM_PLANNER 2
#define I2CPE_ECM_STALLDETECT 3
// Encoder types
#define I2CPE_ENC_TYPE_ROTARY 0
#define I2CPE_ENC_TYPE_LINEAR 1
// Parser
#define I2CPE_PARSE_ERR 1
#define I2CPE_PARSE_OK 0
#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)
typedef union {
volatile int32_t val = 0;
uint8_t bval[4];
} i2cLong;
class I2CPositionEncoder {
private:
AxisEnum encoderAxis = I2CPE_DEF_AXIS;
uint8_t i2cAddress = I2CPE_DEF_ADDR,
ecMethod = I2CPE_DEF_EC_METHOD,
type = I2CPE_DEF_TYPE,
H = I2CPE_MAG_SIG_NF; // Magnetic field strength
int encoderTicksPerUnit = I2CPE_DEF_ENC_TICKS_UNIT,
stepperTicks = I2CPE_DEF_TICKS_REV,
errorCount = 0,
errorPrev = 0;
float ecThreshold = I2CPE_DEF_EC_THRESH;
bool homed = false,
trusted = false,
initialised = false,
active = false,
invert = false,
ec = true;
int32_t zeroOffset = 0,
lastPosition = 0,
position;
millis_t lastPositionTime = 0,
nextErrorCountTime = 0,
lastErrorTime;
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
uint8_t errIdx = 0, errPrstIdx = 0;
int err[I2CPE_ERR_ARRAY_SIZE] = { 0 },
errPrst[I2CPE_ERR_PRST_ARRAY_SIZE] = { 0 };
#endif
public:
void init(const uint8_t address, const AxisEnum axis);
void reset();
void update();
void set_homed();
int32_t get_raw_count();
FORCE_INLINE float mm_from_count(const int32_t count) {
switch (type) {
default: return -1;
case I2CPE_ENC_TYPE_LINEAR:
return count / encoderTicksPerUnit;
case I2CPE_ENC_TYPE_ROTARY:
return (count * stepperTicks) / (encoderTicksPerUnit * planner.axis_steps_per_mm[encoderAxis]);
}
}
FORCE_INLINE float get_position_mm() { return mm_from_count(get_position()); }
FORCE_INLINE int32_t get_position() { return get_raw_count() - zeroOffset; }
int32_t get_axis_error_steps(const bool report);
float get_axis_error_mm(const bool report);
void calibrate_steps_mm(const uint8_t iter);
bool passes_test(const bool report);
bool test_axis(void);
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(void) { return active; }
FORCE_INLINE void set_active(const bool a) { active = a; }
FORCE_INLINE void set_inverted(const bool i) { invert = i; }
FORCE_INLINE AxisEnum get_axis() { return encoderAxis; }
FORCE_INLINE bool get_ec_enabled() { return ec; }
FORCE_INLINE void set_ec_enabled(const bool enabled) { ec = enabled; }
FORCE_INLINE uint8_t get_ec_method() { return ecMethod; }
FORCE_INLINE void set_ec_method(const byte method) { ecMethod = method; }
FORCE_INLINE float get_ec_threshold() { return ecThreshold; }
FORCE_INLINE void set_ec_threshold(const float newThreshold) { ecThreshold = newThreshold; }
FORCE_INLINE int get_encoder_ticks_mm() {
switch (type) {
default: return 0;
case I2CPE_ENC_TYPE_LINEAR:
return encoderTicksPerUnit;
case I2CPE_ENC_TYPE_ROTARY:
return (int)((encoderTicksPerUnit / stepperTicks) * planner.axis_steps_per_mm[encoderAxis]);
}
}
FORCE_INLINE int get_ticks_unit() { return encoderTicksPerUnit; }
FORCE_INLINE void set_ticks_unit(const int ticks) { encoderTicksPerUnit = ticks; }
FORCE_INLINE uint8_t get_type() { return type; }
FORCE_INLINE void set_type(const byte newType) { type = newType; }
FORCE_INLINE int get_stepper_ticks() { return stepperTicks; }
FORCE_INLINE void set_stepper_ticks(const int ticks) { stepperTicks = ticks; }
};
class I2CPositionEncodersMgr {
private:
static bool I2CPE_anyaxis;
static uint8_t I2CPE_addr, I2CPE_idx;
public:
static void init(void);
// consider only updating one endoder per call / tick if encoders become too time intensive
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 report_position(const int8_t idx, const bool units, const bool noOffset);
static void report_status(const int8_t idx) {
CHECK_IDX();
SERIAL_ECHOPAIR("Encoder ",idx);
SERIAL_ECHOPGM(": ");
encoders[idx].get_raw_count();
encoders[idx].passes_test(true);
}
static void report_error(const int8_t idx) {
CHECK_IDX();
encoders[idx].get_axis_error_steps(true);
}
static void test_axis(const int8_t idx) {
CHECK_IDX();
encoders[idx].test_axis();
}
static void calibrate_steps_mm(const int8_t idx, const int iterations) {
CHECK_IDX();
encoders[idx].calibrate_steps_mm(iterations);
}
static void change_module_address(const uint8_t oldaddr, const uint8_t newaddr);
static void report_module_firmware(const uint8_t address);
static void report_error_count(const int8_t idx, const AxisEnum axis) {
CHECK_IDX();
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_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_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_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_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) {
LOOP_PE(i)
if (encoders[i].get_axis() == axis) return i;
return -1;
}
static int8_t idx_from_addr(const uint8_t addr) {
LOOP_PE(i)
if (encoders[i].get_address() == addr) return i;
return -1;
}
static int8_t parse();
static void M860();
static void M861();
static void M862();
static void M863();
static void M864();
static void M865();
static void M866();
static void M867();
static void M868();
static void M869();
static I2CPositionEncoder encoders[I2CPE_ENCODER_CNT];
};
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

@@ -27,222 +27,306 @@
* This memory block is initialized and watched via the M100 command. * This memory block is initialized and watched via the M100 command.
* *
* M100 I Initializes the free memory block and prints vitals statistics about the area * M100 I Initializes the free memory block and prints vitals statistics about the area
*
* M100 F Identifies how much of the free memory block remains free and unused. It also * M100 F Identifies how much of the free memory block remains free and unused. It also
* detects and reports any corruption within the free memory block that may have * detects and reports any corruption within the free memory block that may have
* happened due to errant firmware. * happened due to errant firmware.
*
* M100 D Does a hex display of the free memory block along with a flag for any errant * M100 D Does a hex display of the free memory block along with a flag for any errant
* data that does not match the expected value. * data that does not match the expected value.
*
* M100 C x Corrupts x locations within the free memory block. This is useful to check the * M100 C x Corrupts x locations within the free memory block. This is useful to check the
* correctness of the M100 F and M100 D commands. * correctness of the M100 F and M100 D commands.
* *
* Initial version by Roxy-3DPrintBoard * Also, there are two support functions that can be called from a developer's C code.
*
* 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
*/ */
#define M100_FREE_MEMORY_DUMPER // Comment out to remove Dump sub-command
#define M100_FREE_MEMORY_CORRUPTOR // Comment out to remove Corrupt sub-command
#include "Marlin.h" #include "MarlinConfig.h"
#if ENABLED(M100_FREE_MEMORY_WATCHER) #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)
extern char* __brkval; extern char* __brkval;
extern size_t __heap_start, __heap_end, __flp; extern size_t __heap_start, __heap_end, __flp;
extern char __bss_end; extern char __bss_end;
// //
// Utility functions used by M100 to get its work done. // Utility functions
// //
char* top_of_stack(); #define END_OF_HEAP() (__brkval ? __brkval : &__bss_end)
void prt_hex_nibble(unsigned int); int check_for_free_memory_corruption(const char * const title);
void prt_hex_byte(unsigned int);
void prt_hex_word(unsigned int);
int how_many_E5s_are_here(char*);
void gcode_M100() {
static bool m100_not_initialized = true;
char* sp, *ptr;
int i, j, n;
//
// M100 D dumps 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 0xE5's indicate nothing has
// used that memory yet. There should not be anything but 0xE5's within
// the block of 0xE5's. If there is, that would indicate memory corruption
// probably caused by bad pointers. Any unexpected values will be flagged in
// the right hand column to help spotting them.
//
#if ENABLED(M100_FREE_MEMORY_DUMPER) // Disable to remove Dump sub-command
if (code_seen('D')) {
ptr = __brkval ? __brkval : &__bss_end;
//
// We want to start and end the dump on a nice 16 byte boundry even though
// the values we are using are not 16 byte aligned.
//
SERIAL_ECHOPGM("\nbss_end : ");
prt_hex_word((unsigned int) ptr);
ptr = (char*)((unsigned long) ptr & 0xfff0);
sp = top_of_stack();
SERIAL_ECHOPGM("\nStack Pointer : ");
prt_hex_word((unsigned int) sp);
SERIAL_EOL;
sp = (char*)((unsigned long) sp | 0x000f);
n = sp - ptr;
//
// This is the main loop of the Dump command.
//
while (ptr < sp) {
prt_hex_word((unsigned int) ptr); // Print the address
SERIAL_CHAR(':');
for (i = 0; i < 16; i++) { // and 16 data bytes
prt_hex_byte(*(ptr + i));
SERIAL_CHAR(' ');
}
SERIAL_CHAR('|'); // now show where non 0xE5's are
for (i = 0; i < 16; i++) {
if (*(ptr + i) == (char)0xe5)
SERIAL_CHAR(' ');
else
SERIAL_CHAR('?');
}
SERIAL_EOL;
ptr += 16;
}
return;
}
#endif
//
// M100 F requests the code to return the number of free bytes in the memory pool along with
// other vital statistics that define the memory pool.
//
if (code_seen('F')) {
#if 0
int max_addr = (int) __brkval ? __brkval : &__bss_end;
int max_cnt = 0;
#endif
int block_cnt = 0;
ptr = __brkval ? __brkval : &__bss_end;
sp = top_of_stack();
n = sp - ptr;
// Scan through the range looking for the biggest block of 0xE5's we can find
for (i = 0; i < n; i++) {
if (*(ptr + i) == (char)0xe5) {
j = how_many_E5s_are_here(ptr + i);
if (j > 8) {
SERIAL_ECHOPAIR("Found ", j);
SERIAL_ECHOPGM(" bytes free at 0x");
prt_hex_word((int) ptr + i);
SERIAL_EOL;
i += j;
block_cnt++;
}
#if 0
if (j > max_cnt) { // We don't do anything with this information yet
max_cnt = j; // but we do know where the biggest free memory block is.
max_addr = (int) ptr + i;
}
#endif
}
}
if (block_cnt > 1)
SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
return;
}
//
// M100 C x Corrupts x locations in the free memory pool and reports the locations of the corruption.
// This is useful to check the correctness of the M100 D and the M100 F commands.
//
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
if (code_seen('C')) {
int x = code_value_int(); // x gets the # of locations to corrupt within the memory pool
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
ptr = __brkval ? __brkval : &__bss_end;
SERIAL_ECHOPAIR("\nbss_end : ", ptr);
ptr += 8;
sp = top_of_stack();
SERIAL_ECHOPAIR("\nStack Pointer : ", sp);
SERIAL_ECHOLNPGM("\n");
n = sp - ptr - 64; // -64 just to keep us from finding interrupt activity that
// has altered the stack.
j = n / (x + 1);
for (i = 1; i <= x; i++) {
*(ptr + (i * j)) = i;
SERIAL_ECHOPGM("\nCorrupting address: 0x");
prt_hex_word((unsigned int)(ptr + (i * j)));
}
SERIAL_ECHOLNPGM("\n");
return;
}
#endif
//
// M100 I Initializes the free memory pool so it can be watched and prints vital
// statistics that define the free memory pool.
//
if (m100_not_initialized || code_seen('I')) { // If no sub-command is specified, the first time
SERIAL_ECHOLNPGM("Initializing free memory block.\n"); // this happens, it will Initialize.
ptr = __brkval ? __brkval : &__bss_end; // Repeated M100 with no sub-command will not destroy the
SERIAL_ECHOPAIR("\nbss_end : ", ptr); // state of the initialized free memory pool.
ptr += 8;
sp = top_of_stack();
SERIAL_ECHOPAIR("\nStack Pointer : ", sp);
SERIAL_ECHOLNPGM("\n");
n = sp - ptr - 64; // -64 just to keep us from finding interrupt activity that
// has altered the stack.
SERIAL_ECHO(n);
SERIAL_ECHOLNPGM(" bytes of memory initialized.\n");
for (i = 0; i < n; i++)
*(ptr + i) = (char)0xe5;
for (i = 0; i < n; i++) {
if (*(ptr + i) != (char)0xe5) {
SERIAL_ECHOPAIR("? address : ", ptr + i);
SERIAL_ECHOPAIR("=", *(ptr + i));
SERIAL_ECHOLNPGM("\n");
}
}
m100_not_initialized = false;
return;
}
return;
}
// top_of_stack() returns the location of a variable on its stack frame. The value returned is above
// the stack once the function returns to the caller.
// 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() { char* top_of_stack() {
char x; char x;
return &x + 1; // x is pulled on return; return &x + 1; // x is pulled on return;
} }
// // Count the number of test bytes at the specified location.
// 3 support routines to print hex numbers. We can print a nibble, byte and word 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;
void prt_hex_nibble(unsigned int n) {
if (n <= 9)
SERIAL_ECHO(n);
else
SERIAL_ECHO((char)('A' + n - 10));
}
void prt_hex_byte(unsigned int b) {
prt_hex_nibble((b & 0xf0) >> 4);
prt_hex_nibble(b & 0x0f);
}
void prt_hex_word(unsigned int w) {
prt_hex_byte((w & 0xff00) >> 8);
prt_hex_byte(w & 0x0ff);
}
// how_many_E5s_are_here() is a utility function to easily find out how many 0xE5's are
// at the specified location. Having this logic as a function simplifies the search code.
//
int how_many_E5s_are_here(char* p) {
int n;
for (n = 0; n < 32000; n++) {
if (*(p + n) != (char)0xe5)
return n - 1;
}
return -1; return -1;
} }
//
// M100 sub-commands
//
#if ENABLED(M100_FREE_MEMORY_DUMPER)
/**
* M100 D
* 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.
*/
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).
//
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 (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(ptr[i]);
SERIAL_CHAR(' ');
}
safe_delay(25);
SERIAL_CHAR('|'); // Point out non test bytes
for (uint8_t i = 0; i < 16; i++) {
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();
ptr += 16;
safe_delay(25);
idle();
}
}
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
/**
* M100 F
* Return the number of free bytes in the memory pool,
* with other vital statistics defining the pool.
*/
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 (int16_t i = 0; i < size; i++) {
char *addr = ptr + i;
if (*addr == TEST_BYTE) {
const int16_t j = count_test_bytes(addr);
if (j > 8) {
SERIAL_ECHOPAIR("Found ", j);
SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr));
if (j > max_cnt) {
max_cnt = j;
max_addr = addr;
}
i += j;
block_cnt++;
}
}
}
if (block_cnt > 1) {
SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
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("M100 F "));
}
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
/**
* M100 C<num>
* 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.
*/
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 (uint16_t i = 1; i <= size; i++) {
char * const addr = ptr + i * j;
*addr = i;
SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
}
SERIAL_EOL();
}
#endif // M100_FREE_MEMORY_CORRUPTOR
/**
* M100 I
* Init memory for the M100 tests. (Automatically applied on the first M100.)
*/
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.
if (size < 0) {
SERIAL_ECHOLNPGM("Unable to initialize.\n");
return;
}
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(ptr, TEST_BYTE, size);
SERIAL_ECHO(size);
SERIAL_ECHOLNPGM(" bytes of memory initialized.\n");
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();
}
}
}
/**
* M100: Free Memory Check
*/
void gcode_M100() {
SERIAL_ECHOPAIR("\n__brkval : ", hex_address(__brkval));
SERIAL_ECHOPAIR("\n__bss_end : ", hex_address(&__bss_end));
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(ptr, sp - ptr);
}
#if ENABLED(M100_FREE_MEMORY_DUMPER)
if (parser.seen('D'))
return dump_free_memory(ptr, sp);
#endif #endif
if (parser.seen('F'))
return free_memory_pool_report(ptr, sp - ptr);
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
if (parser.seen('C'))
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

View File

@@ -1,4 +1,4 @@
# Sprinter Arduino Project Makefile # Marlin Firmware Arduino Project Makefile
# #
# Makefile Based on: # Makefile Based on:
# Arduino 0011 Makefile # Arduino 0011 Makefile
@@ -33,10 +33,29 @@
# 5. Type "make upload", reset your Arduino board, and press enter to # 5. Type "make upload", reset your Arduino board, and press enter to
# upload your program to the Arduino board. # upload your program to the Arduino board.
# #
# Note that all settings are set with ?=, this means you can override them # Note that all settings at the top of this file can be overriden from
# from the commandline with "make HARDWARE_MOTHERBOARD=71" for example # the command line with, for example, "make HARDWARE_MOTHERBOARD=71"
#
# To compile for RAMPS (atmega2560) with Arduino 1.6.9 at root/arduino you would use...
#
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
# HARDWARE_MOTHERBOARD=33 ARDUINO_INSTALL_DIR=/root/arduino
#
# To compile and upload simply add "upload" to the end of the line...
#
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
# HARDWARE_MOTHERBOARD=33 ARDUINO_INSTALL_DIR=/root/arduino upload
#
# If uploading doesn't work try adding the parameter "AVRDUDE_PROGRAMMER=wiring" or
# start upload manually (using stk500) like so:
#
# avrdude -C /root/arduino/hardware/tools/avr/etc/avrdude.conf -v -p m2560 -c stk500 \
# -U flash:w:applet/Marlin.hex:i -P /dev/ttyUSB0
#
# Or, try disconnecting USB to power down and then reconnecting before running avrdude.
#
# This defined the board you are compiling for (see boards.h for the options) # This defines the board to compile for (see boards.h for your board's ID)
HARDWARE_MOTHERBOARD ?= 11 HARDWARE_MOTHERBOARD ?= 11
# Arduino source install directory, and version number # Arduino source install directory, and version number
@@ -63,6 +82,13 @@ LIQUID_TWI2 ?= 0
# this defines if Wire is needed # this defines if Wire is needed
WIRE ?= 0 WIRE ?= 0
# this defines if U8GLIB is needed (may require RELOC_WORKAROUND)
U8GLIB ?= 1
# this defines whether to add a workaround for the avr-gcc relocation bug
# https://www.stix.id.au/wiki/AVR_relocation_truncations_workaround
RELOC_WORKAROUND ?= 1
############################################################################ ############################################################################
# Below here nothing should be changed... # Below here nothing should be changed...
@@ -70,152 +96,296 @@ WIRE ?= 0
# HARDWARE_VARIANT = "arduino", "Sanguino", "Gen7", ... # HARDWARE_VARIANT = "arduino", "Sanguino", "Gen7", ...
# MCU = "atmega1280", "Mega2560", "atmega2560", "atmega644p", ... # MCU = "atmega1280", "Mega2560", "atmega2560", "atmega644p", ...
#Gen7 ifeq ($(HARDWARE_MOTHERBOARD),0)
ifeq ($(HARDWARE_MOTHERBOARD),10)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644
F_CPU ?= 20000000
else ifeq ($(HARDWARE_MOTHERBOARD),11)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644p
F_CPU ?= 20000000
else ifeq ($(HARDWARE_MOTHERBOARD),12)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644p
F_CPU ?= 20000000
else ifeq ($(HARDWARE_MOTHERBOARD),13)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega1284p
F_CPU ?= 20000000
#RAMPS # No motherboard selected
#
# RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
#
# MEGA/RAMPS up to 1.2
else ifeq ($(HARDWARE_MOTHERBOARD),3) else ifeq ($(HARDWARE_MOTHERBOARD),3)
HARDWARE_VARIANT ?= arduino
MCU ?= atmega2560 # RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),33) else ifeq ($(HARDWARE_MOTHERBOARD),33)
HARDWARE_VARIANT ?= arduino # RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),34) else ifeq ($(HARDWARE_MOTHERBOARD),34)
HARDWARE_VARIANT ?= arduino # RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),35) else ifeq ($(HARDWARE_MOTHERBOARD),35)
HARDWARE_VARIANT ?= arduino # RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),36) else ifeq ($(HARDWARE_MOTHERBOARD),36)
HARDWARE_VARIANT ?= arduino # RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),38) else ifeq ($(HARDWARE_MOTHERBOARD),38)
HARDWARE_VARIANT ?= arduino
MCU ?= atmega2560 # RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),43) else ifeq ($(HARDWARE_MOTHERBOARD),43)
HARDWARE_VARIANT ?= arduino # RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),44) else ifeq ($(HARDWARE_MOTHERBOARD),44)
HARDWARE_VARIANT ?= arduino # RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),45) else ifeq ($(HARDWARE_MOTHERBOARD),45)
HARDWARE_VARIANT ?= arduino # RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),46) else ifeq ($(HARDWARE_MOTHERBOARD),46)
HARDWARE_VARIANT ?= arduino # RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),48) else ifeq ($(HARDWARE_MOTHERBOARD),48)
HARDWARE_VARIANT ?= arduino
MCU ?= atmega2560
#Gen6 # RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
else ifeq ($(HARDWARE_MOTHERBOARD),5) else ifeq ($(HARDWARE_MOTHERBOARD),143)
HARDWARE_VARIANT ?= Gen6 # RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
MCU ?= atmega644p else ifeq ($(HARDWARE_MOTHERBOARD),144)
else ifeq ($(HARDWARE_MOTHERBOARD),51) # RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
HARDWARE_VARIANT ?= Gen6 else ifeq ($(HARDWARE_MOTHERBOARD),145)
MCU ?= atmega644p # RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),146)
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
else ifeq ($(HARDWARE_MOTHERBOARD),148)
#Sanguinololu #
# RAMPS Derivatives - ATmega1280, ATmega2560
#
# 3Drag Controller
else ifeq ($(HARDWARE_MOTHERBOARD),77)
# Velleman K8200 Controller (derived from 3Drag Controller)
else ifeq ($(HARDWARE_MOTHERBOARD),78)
# Velleman K8400 Controller (derived from 3Drag Controller)
else ifeq ($(HARDWARE_MOTHERBOARD),79)
# 2PrintBeta BAM&DICE with STK drivers
else ifeq ($(HARDWARE_MOTHERBOARD),401)
# 2PrintBeta BAM&DICE Due with STK drivers
else ifeq ($(HARDWARE_MOTHERBOARD),402)
# MKS BASE v1.0
else ifeq ($(HARDWARE_MOTHERBOARD),40)
# MKS v1.5 with Allegro A4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),405)
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
else ifeq ($(HARDWARE_MOTHERBOARD),41)
# MKS GEN v1.3 or 1.4
else ifeq ($(HARDWARE_MOTHERBOARD),47)
# MKS GEN L
else ifeq ($(HARDWARE_MOTHERBOARD),53)
# zrib V2.0 control board (Chinese knock off RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),504)
# Felix 2.0+ Electronics Board (RAMPS like)
else ifeq ($(HARDWARE_MOTHERBOARD),37)
# Invent-A-Part RigidBoard
else ifeq ($(HARDWARE_MOTHERBOARD),42)
# Invent-A-Part RigidBoard V2
else ifeq ($(HARDWARE_MOTHERBOARD),52)
# Sainsmart 2-in-1 board
else ifeq ($(HARDWARE_MOTHERBOARD),49)
# Ultimaker
else ifeq ($(HARDWARE_MOTHERBOARD),7)
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
else ifeq ($(HARDWARE_MOTHERBOARD),71)
MCU ?= atmega1280
# Azteeg X3
else ifeq ($(HARDWARE_MOTHERBOARD),67)
# Azteeg X3 Pro
else ifeq ($(HARDWARE_MOTHERBOARD),68)
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
else ifeq ($(HARDWARE_MOTHERBOARD),72)
# Rumba
else ifeq ($(HARDWARE_MOTHERBOARD),80)
# bq ZUM Mega 3D
else ifeq ($(HARDWARE_MOTHERBOARD),503)
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
else ifeq ($(HARDWARE_MOTHERBOARD),431)
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),343)
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
else ifeq ($(HARDWARE_MOTHERBOARD),443)
# Creality: Ender-4, CR-8
else ifeq ($(HARDWARE_MOTHERBOARD),243)
#
# Other ATmega1280, ATmega2560
#
# Cartesio CN Controls V11
else ifeq ($(HARDWARE_MOTHERBOARD),111)
# Cartesio CN Controls V12
else ifeq ($(HARDWARE_MOTHERBOARD),112)
# Cheaptronic v1.0
else ifeq ($(HARDWARE_MOTHERBOARD),2)
# Cheaptronic v2.0
else ifeq ($(HARDWARE_MOTHERBOARD),21)
# Makerbot Mightyboard Revision E
else ifeq ($(HARDWARE_MOTHERBOARD),200)
# Megatronics
else ifeq ($(HARDWARE_MOTHERBOARD),70)
# Megatronics v2.0
else ifeq ($(HARDWARE_MOTHERBOARD),701)
# Megatronics v3.0
else ifeq ($(HARDWARE_MOTHERBOARD),703)
# Megatronics v3.1
else ifeq ($(HARDWARE_MOTHERBOARD),704)
# Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),301)
# Mini-Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),302)
# Mini-Rambo 1.0a
else ifeq ($(HARDWARE_MOTHERBOARD),303)
# Einsy Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),304)
# Einsy Retro
else ifeq ($(HARDWARE_MOTHERBOARD),305)
# Elefu Ra Board (v3)
else ifeq ($(HARDWARE_MOTHERBOARD),21)
# Leapfrog
else ifeq ($(HARDWARE_MOTHERBOARD),999)
# Mega controller
else ifeq ($(HARDWARE_MOTHERBOARD),310)
# abee Scoovo X9H
else ifeq ($(HARDWARE_MOTHERBOARD),321)
# Geeetech GT2560 Rev. A
else ifeq ($(HARDWARE_MOTHERBOARD),74)
# Geeetech GT2560 Rev. A+ (with auto level probe)
else ifeq ($(HARDWARE_MOTHERBOARD),75)
#
# ATmega1281, ATmega2561
#
else ifeq ($(HARDWARE_MOTHERBOARD),702)
MCU ?= atmega1281
else ifeq ($(HARDWARE_MOTHERBOARD),25)
MCU ?= atmega1281
#
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
#
# Sanguinololu < 1.2
else ifeq ($(HARDWARE_MOTHERBOARD),6) else ifeq ($(HARDWARE_MOTHERBOARD),6)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p MCU ?= atmega644p
# Sanguinololu 1.2 and above
else ifeq ($(HARDWARE_MOTHERBOARD),62) else ifeq ($(HARDWARE_MOTHERBOARD),62)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p MCU ?= atmega644p
# Melzi
else ifeq ($(HARDWARE_MOTHERBOARD),63) else ifeq ($(HARDWARE_MOTHERBOARD),63)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p MCU ?= atmega644p
else ifeq ($(HARDWARE_MOTHERBOARD),65) # Melzi with ATmega1284 (MaKr3d version)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
else ifeq ($(HARDWARE_MOTHERBOARD),66) else ifeq ($(HARDWARE_MOTHERBOARD),66)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# Melzi Creality3D board (for CR-10 etc)
else ifeq ($(HARDWARE_MOTHERBOARD),89)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Melzi Malyan M150 board
else ifeq ($(HARDWARE_MOTHERBOARD),92)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Tronxy X5S
else ifeq ($(HARDWARE_MOTHERBOARD),505)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# STB V1.1
else ifeq ($(HARDWARE_MOTHERBOARD),64)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Azteeg X1
else ifeq ($(HARDWARE_MOTHERBOARD),65)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Anet 1.0 (Melzi clone)
else ifeq ($(HARDWARE_MOTHERBOARD),69) else ifeq ($(HARDWARE_MOTHERBOARD),69)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
#Ultimaker #
else ifeq ($(HARDWARE_MOTHERBOARD),7) # Other ATmega644P, ATmega644, ATmega1284P
HARDWARE_VARIANT ?= arduino #
MCU ?= atmega2560
else ifeq ($(HARDWARE_MOTHERBOARD),71)
HARDWARE_VARIANT ?= arduino
MCU ?= atmega1280
#Teensylu
else ifeq ($(HARDWARE_MOTHERBOARD),8)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
else ifeq ($(HARDWARE_MOTHERBOARD),81)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
else ifeq ($(HARDWARE_MOTHERBOARD),811)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
else ifeq ($(HARDWARE_MOTHERBOARD),82)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb646
else ifeq ($(HARDWARE_MOTHERBOARD),83)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
else ifeq ($(HARDWARE_MOTHERBOARD),84)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
#Gen3+
else ifeq ($(HARDWARE_MOTHERBOARD),9)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
# Gen3 Monolithic Electronics # Gen3 Monolithic Electronics
else ifeq ($(HARDWARE_MOTHERBOARD),22) else ifeq ($(HARDWARE_MOTHERBOARD),22)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p MCU ?= atmega644p
# Gen3+
#Megatronics else ifeq ($(HARDWARE_MOTHERBOARD),9)
else ifeq ($(HARDWARE_MOTHERBOARD),70) HARDWARE_VARIANT ?= Sanguino
HARDWARE_VARIANT ?= arduino MCU ?= atmega644p
MCU ?= atmega2560 # Gen6
else ifeq ($(HARDWARE_MOTHERBOARD),5)
HARDWARE_VARIANT ?= Gen6
MCU ?= atmega644p
# Gen6 deluxe
else ifeq ($(HARDWARE_MOTHERBOARD),51)
HARDWARE_VARIANT ?= Gen6
MCU ?= atmega644p
# Gen7 custom (Alfons3 Version)
else ifeq ($(HARDWARE_MOTHERBOARD),10)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644
F_CPU ?= 20000000
# Gen7 v1.1, v1.2
else ifeq ($(HARDWARE_MOTHERBOARD),11)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644p
F_CPU ?= 20000000
# Gen7 v1.3
else ifeq ($(HARDWARE_MOTHERBOARD),12)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644p
F_CPU ?= 20000000
# Gen7 v1.4
else ifeq ($(HARDWARE_MOTHERBOARD),13)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega1284p
F_CPU ?= 20000000
# Alpha OMCA board # Alpha OMCA board
else ifeq ($(HARDWARE_MOTHERBOARD),90) else ifeq ($(HARDWARE_MOTHERBOARD),90)
HARDWARE_VARIANT ?= SanguinoA HARDWARE_VARIANT ?= SanguinoA
MCU ?= atmega644 MCU ?= atmega644
# Final OMCA board # Final OMCA board
else ifeq ($(HARDWARE_MOTHERBOARD),91) else ifeq ($(HARDWARE_MOTHERBOARD),91)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p MCU ?= atmega644p
# Sethi 3D_1
else ifeq ($(HARDWARE_MOTHERBOARD),20)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
#Rambo #
else ifeq ($(HARDWARE_MOTHERBOARD),301) # Teensyduino - AT90USB1286, AT90USB1286P
HARDWARE_VARIANT ?= arduino #
MCU ?= atmega2560
# Azteeg # Teensylu
else ifeq ($(HARDWARE_MOTHERBOARD),67) else ifeq ($(HARDWARE_MOTHERBOARD),8)
HARDWARE_VARIANT ?= arduino HARDWARE_VARIANT ?= Teensy
MCU ?= atmega2560 MCU ?= at90usb1286
else ifeq ($(HARDWARE_MOTHERBOARD),68) # Printrboard (AT90USB1286)
HARDWARE_VARIANT ?= arduino else ifeq ($(HARDWARE_MOTHERBOARD),81)
MCU ?= atmega2560 HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# Printrboard Revision F (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),811)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# Brainwave (AT90USB646)
else ifeq ($(HARDWARE_MOTHERBOARD),82)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb646
# Brainwave Pro (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),83)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# SAV Mk-I (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),84)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make
else ifeq ($(HARDWARE_MOTHERBOARD),85)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# 5DPrint D8 Driver Board
else ifeq ($(HARDWARE_MOTHERBOARD),88)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
endif endif
@@ -224,20 +394,14 @@ endif
# Set to 16Mhz if not yet set. # Set to 16Mhz if not yet set.
F_CPU ?= 16000000 F_CPU ?= 16000000
# Set to arduino, ATmega2560 if not yet set.
HARDWARE_VARIANT ?= arduino
MCU ?= atmega2560
# Arduino contained the main source code for the Arduino # Arduino contained the main source code for the Arduino
# Libraries, the "hardware variant" are for boards # Libraries, the "hardware variant" are for boards
# that derives from that, and their source are present in # that derives from that, and their source are present in
# the main Marlin source directory # the main Marlin source directory
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Sanguino))
HARDWARE_DIR = $(ARDUINO_INSTALL_DIR)/hardware
else
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
HARDWARE_DIR = ../ArduinoAddons/Arduino_1.x.x
else
HARDWARE_DIR = ../ArduinoAddons/Arduino_0.xx
endif
endif
HARDWARE_SRC = $(HARDWARE_DIR)/marlin/avr/cores/arduino
TARGET = $(notdir $(CURDIR)) TARGET = $(notdir $(CURDIR))
@@ -247,10 +411,11 @@ TARGET = $(notdir $(CURDIR))
VPATH = . VPATH = .
VPATH += $(BUILD_DIR) VPATH += $(BUILD_DIR)
VPATH += $(HARDWARE_SRC) VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/LiquidCrystal/src VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/SPI VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
ifeq ($(LIQUID_TWI2), 1) ifeq ($(LIQUID_TWI2), 1)
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
@@ -260,22 +425,17 @@ ifeq ($(WIRE), 1)
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
endif endif
else ifeq ($(NEOPIXEL), 1)
VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
VPATH += $(HARDWARE_DIR)/libraries/SPI
ifeq ($(LIQUID_TWI2), 1)
VPATH += $(HARDWARE_DIR)/libraries/Wire
VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2
endif
ifeq ($(WIRE), 1)
VPATH += $(HARDWARE_DIR)/libraries/Wire
VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
endif endif
ifeq ($(U8GLIB), 1)
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/utility
endif endif
ifeq ($(HARDWARE_VARIANT), arduino) ifeq ($(HARDWARE_VARIANT), arduino)
HARDWARE_SUB_VARIANT ?= mega HARDWARE_SUB_VARIANT ?= mega
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/$(HARDWARE_SUB_VARIANT) VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
else else
ifeq ($(HARDWARE_VARIANT), Sanguino) ifeq ($(HARDWARE_VARIANT), Sanguino)
VPATH += $(HARDWARE_DIR)/marlin/avr/variants/sanguino VPATH += $(HARDWARE_DIR)/marlin/avr/variants/sanguino
@@ -292,12 +452,11 @@ ifeq ($(HARDWARE_VARIANT), Teensy)
SRC = wiring.c SRC = wiring.c
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
endif endif
CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \ CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp Tone.cpp
MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \ CXXSRC += $(wildcard *.cpp)
SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \ ifeq ($(NEOPIXEL), 1)
temperature.cpp cardreader.cpp configuration_store.cpp \ CXXSRC += Adafruit_NeoPixel.cpp
watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \ endif
dac_mcp4728.cpp vector_3.cpp qr_solve.cpp buzzer.cpp
ifeq ($(LIQUID_TWI2), 0) ifeq ($(LIQUID_TWI2), 0)
CXXSRC += LiquidCrystal.cpp CXXSRC += LiquidCrystal.cpp
else else
@@ -310,6 +469,15 @@ SRC += twi.c
CXXSRC += Wire.cpp CXXSRC += Wire.cpp
endif endif
ifeq ($(U8GLIB), 1)
SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c u8g_font_data.c
endif
ifeq ($(RELOC_WORKAROUND), 1)
LD_PREFIX=-nodefaultlibs
LD_SUFFIX=-lm -lgcc -lc -lgcc -L$(ARDUINO_INSTALL_DIR)/hardware/tools/avr/avr/lib/avr6 -l$(MCU)
endif
#Check for Arduino 1.0.0 or higher and use the correct source files for that version #Check for Arduino 1.0.0 or higher and use the correct source files for that version
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
CXXSRC += main.cpp CXXSRC += main.cpp
@@ -357,25 +525,22 @@ endif
CINCS = ${addprefix -I ,${VPATH}} CINCS = ${addprefix -I ,${VPATH}}
CXXINCS = ${addprefix -I ,${VPATH}} CXXINCS = ${addprefix -I ,${VPATH}}
# Compiler flag to set the C Standard level. # Compiler flag to set the C/CPP Standard level.
# c89 - "ANSI" C CSTANDARD = -std=gnu99
# gnu89 - c89 plus GCC extensions CXXSTANDARD = -std=gnu++11
# c99 - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
#CSTANDARD = -std=gnu99
CDEBUG = -g$(DEBUG) CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes CWARN = -Wall -Wstrict-prototypes
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct \ CTUNING = -w -fsigned-char -funsigned-bitfields -fpack-struct \
-fshort-enums -w -ffunction-sections -fdata-sections \ -fshort-enums -ffunction-sections -fdata-sections -flto \
-DARDUINO=$(ARDUINO_VERSION) -DARDUINO=$(ARDUINO_VERSION)
ifneq ($(HARDWARE_MOTHERBOARD),) ifneq ($(HARDWARE_MOTHERBOARD),)
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD} CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
endif endif
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst) #CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
CEXTRA = -fno-use-cxa-atexit CEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD)
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) $(CXXSTANDARD)
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs #ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
LDFLAGS = -lm LDFLAGS = -lm
@@ -490,7 +655,7 @@ extcoff: $(TARGET).elf
# Link: create ELF output file from library. # Link: create ELF output file from library.
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h $(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
$(Pecho) " CXX $@" $(Pecho) " CXX $@"
$P $(CC) $(ALL_CXXFLAGS) -Wl,--gc-sections -o $@ -L. $(OBJ) $(LDFLAGS) $P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -Wl,--gc-sections,--relax -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE) $(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
$(Pecho) " CC $<" $(Pecho) " CC $<"

View File

@@ -29,129 +29,66 @@
#include <inttypes.h> #include <inttypes.h>
#include <util/delay.h> #include <util/delay.h>
#include <avr/pgmspace.h>
#include <avr/eeprom.h> #include <avr/eeprom.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include "MarlinConfig.h" #include "MarlinConfig.h"
#ifdef DEBUG_GCODE_PARSER
#include "parser.h"
#endif
#include "enum.h" #include "enum.h"
#include "types.h" #include "types.h"
#include "fastio.h" #include "fastio.h"
#include "utility.h" #include "utility.h"
#include "serial.h"
#ifdef USBCON
#include "HardwareSerial.h"
#if ENABLED(BLUETOOTH)
#define MYSERIAL bluetoothSerial
#else
#define MYSERIAL Serial
#endif // BLUETOOTH
#else
#include "MarlinSerial.h"
#define MYSERIAL customizedSerial
#endif
#include "WString.h"
#if ENABLED(PRINTCOUNTER)
#include "printcounter.h"
#else
#include "stopwatch.h"
#endif
#define SERIAL_CHAR(x) MYSERIAL.write(x)
#define SERIAL_EOL SERIAL_CHAR('\n')
#define SERIAL_PROTOCOLCHAR(x) SERIAL_CHAR(x)
#define SERIAL_PROTOCOL(x) MYSERIAL.print(x)
#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y)
#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x))
#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x); SERIAL_EOL; }while(0)
#define SERIAL_PROTOCOLLNPGM(x) do{ serialprintPGM(PSTR(x "\n")); }while(0)
#define SERIAL_PROTOCOLPAIR(name, value) SERIAL_ECHOPAIR(name, value)
extern const char errormagic[] PROGMEM;
extern const char echomagic[] PROGMEM;
#define SERIAL_ERROR_START serialprintPGM(errormagic)
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x)
#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
#define SERIAL_ECHO_START serialprintPGM(echomagic)
#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x)
#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)
#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
#define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value)))
void serial_echopair_P(const char* s_P, char v);
void serial_echopair_P(const char* s_P, int v);
void serial_echopair_P(const char* s_P, long v);
void serial_echopair_P(const char* s_P, float v);
void serial_echopair_P(const char* s_P, double v);
void serial_echopair_P(const char* s_P, unsigned long v);
FORCE_INLINE void serial_echopair_P(const char* s_P, uint8_t v) { serial_echopair_P(s_P, (int)v); }
FORCE_INLINE void serial_echopair_P(const char* s_P, uint16_t v) { serial_echopair_P(s_P, (int)v); }
FORCE_INLINE void serial_echopair_P(const char* s_P, bool v) { serial_echopair_P(s_P, (int)v); }
FORCE_INLINE void serial_echopair_P(const char* s_P, void *v) { serial_echopair_P(s_P, (unsigned long)v); }
// Things to write to serial from Program memory. Saves 400 to 2k of RAM.
FORCE_INLINE void serialprintPGM(const char* str) {
char ch;
while ((ch = pgm_read_byte(str))) {
MYSERIAL.write(ch);
str++;
}
}
void idle( void idle(
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
bool no_stepper_sleep = false // pass true to keep steppers from disabling on timeout bool no_stepper_sleep = false // pass true to keep steppers from disabling on timeout
#endif #endif
); );
void manage_inactivity(bool ignore_stepper_queue = false); 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) #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
extern bool extruder_duplication_enabled; extern bool extruder_duplication_enabled;
#endif #endif
#if HAS_X2_ENABLE #if HAS_X2_ENABLE
#define enable_x() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0) #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); axis_known_position[X_AXIS] = false; }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 #elif HAS_X_ENABLE
#define enable_x() X_ENABLE_WRITE( X_ENABLE_ON) #define enable_X() X_ENABLE_WRITE( X_ENABLE_ON)
#define disable_x() do{ X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0) #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); CBI(axis_known_position, X_AXIS); }while(0)
#else #else
#define enable_x() NOOP #define enable_X() NOOP
#define disable_x() NOOP #define disable_X() NOOP
#endif #endif
#if HAS_Y2_ENABLE #if HAS_Y2_ENABLE
#define enable_y() do{ Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }while(0) #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); axis_known_position[Y_AXIS] = false; }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 #elif HAS_Y_ENABLE
#define enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON) #define enable_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
#define disable_y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0) #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); CBI(axis_known_position, Y_AXIS); }while(0)
#else #else
#define enable_y() NOOP #define enable_Y() NOOP
#define disable_y() NOOP #define disable_Y() NOOP
#endif #endif
#if HAS_Z2_ENABLE #if HAS_Z2_ENABLE
#define enable_z() do{ Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }while(0) #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); axis_known_position[Z_AXIS] = false; }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 #elif HAS_Z_ENABLE
#define enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON) #define enable_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
#define disable_z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0) #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); CBI(axis_known_position, Z_AXIS); }while(0)
#else #else
#define enable_z() NOOP #define enable_Z() NOOP
#define disable_z() NOOP #define disable_Z() NOOP
#endif #endif
#if ENABLED(MIXING_EXTRUDER) #if ENABLED(MIXING_EXTRUDER)
@@ -159,79 +96,135 @@ void manage_inactivity(bool ignore_stepper_queue = false);
/** /**
* Mixing steppers synchronize their enable (and direction) together * Mixing steppers synchronize their enable (and direction) together
*/ */
#if MIXING_STEPPERS > 3 #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); } #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); } #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 #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 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); } #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); }
#else #else
#define enable_e0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); } #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); } #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); }
#endif #endif
#define enable_e1() NOOP #define enable_E1() NOOP
#define disable_e1() NOOP #define disable_E1() NOOP
#define enable_e2() NOOP #define enable_E2() NOOP
#define disable_e2() NOOP #define disable_E2() NOOP
#define enable_e3() NOOP #define enable_E3() NOOP
#define disable_e3() NOOP #define disable_E3() NOOP
#define enable_E4() NOOP
#define disable_E4() NOOP
#else // !MIXING_EXTRUDER #else // !MIXING_EXTRUDER
#if HAS_E0_ENABLE #if HAS_E0_ENABLE
#define enable_e0() E0_ENABLE_WRITE( E_ENABLE_ON) #define enable_E0() E0_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON) #define disable_E0() E0_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e0() NOOP #define enable_E0() NOOP
#define disable_e0() NOOP #define disable_E0() NOOP
#endif #endif
#if E_STEPPERS > 1 && HAS_E1_ENABLE #if E_STEPPERS > 1 && HAS_E1_ENABLE
#define enable_e1() E1_ENABLE_WRITE( E_ENABLE_ON) #define enable_E1() E1_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON) #define disable_E1() E1_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e1() NOOP #define enable_E1() NOOP
#define disable_e1() NOOP #define disable_E1() NOOP
#endif #endif
#if E_STEPPERS > 2 && HAS_E2_ENABLE #if E_STEPPERS > 2 && HAS_E2_ENABLE
#define enable_e2() E2_ENABLE_WRITE( E_ENABLE_ON) #define enable_E2() E2_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON) #define disable_E2() E2_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e2() NOOP #define enable_E2() NOOP
#define disable_e2() NOOP #define disable_E2() NOOP
#endif #endif
#if E_STEPPERS > 3 && HAS_E3_ENABLE #if E_STEPPERS > 3 && HAS_E3_ENABLE
#define enable_e3() E3_ENABLE_WRITE( E_ENABLE_ON) #define enable_E3() E3_ENABLE_WRITE( E_ENABLE_ON)
#define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON) #define disable_E3() E3_ENABLE_WRITE(!E_ENABLE_ON)
#else #else
#define enable_e3() NOOP #define enable_E3() NOOP
#define disable_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
#endif // !MIXING_EXTRUDER #endif // !MIXING_EXTRUDER
/** #if ENABLED(HANGPRINTER)
* The axis order in all axis related arrays is X, Y, Z, E
*/ #define enable_A() enable_X()
#define _AXIS(AXIS) AXIS ##_AXIS #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 enable_all_steppers();
void disable_e_stepper(const uint8_t e);
void disable_e_steppers();
void disable_all_steppers(); void disable_all_steppers();
void FlushSerialRequestResend(); 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 ok_to_send();
void reset_bed_level();
void kill(const char*); void kill(const char*);
void quickstop_stepper(); void quickstop_stepper();
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
void handle_filament_runout();
#endif
extern uint8_t marlin_debug_flags; extern uint8_t marlin_debug_flags;
#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F)) #define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
@@ -239,160 +232,416 @@ extern bool Running;
inline bool IsRunning() { return Running; } inline bool IsRunning() { return Running; }
inline bool IsStopped() { return !Running; } inline bool IsStopped() { return !Running; }
bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); //put a single ASCII command at the end of the current buffer or return false when it is full 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_command_now(const char* cmd); // enqueue now, only return when the command has been enqueued 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 enqueue_and_echo_commands_P(const char* cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
void clear_command_queue(); void clear_command_queue();
void clamp_to_software_endstops(float target[3]); #if ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(POWER_LOSS_RECOVERY)
extern char command_queue[BUFSIZE][MAX_CMD_SIZE];
extern millis_t previous_cmd_ms;
inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
#if ENABLED(FAST_PWM_FAN)
void setPwmFrequency(uint8_t pin, int val);
#endif #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 * Feedrate scaling and conversion
*/ */
extern int feedrate_percentage; extern float feedrate_mm_s;
extern int16_t feedrate_percentage;
#define MMM_TO_MMS(MM_M) ((MM_M)/60.0) #define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01f)
#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
#define MMM_SCALED(MM_M) ((MM_M)*feedrate_percentage*0.01) extern bool axis_relative_modes[XYZE];
#define MMS_SCALED(MM_S) MMM_SCALED(MM_S)
#define MMM_TO_MMS_SCALED(MM_M) (MMS_SCALED(MMM_TO_MMS(MM_M))) 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 bool axis_relative_modes[];
extern bool volumetric_enabled;
extern int extruder_multiplier[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
extern bool axis_known_position[3]; // axis[n].is_known
extern bool axis_homed[3]; // axis[n].is_homed
extern volatile bool wait_for_heatup; extern volatile bool wait_for_heatup;
extern float current_position[NUM_AXIS]; #if HAS_RESUME_CONTINUE
extern float position_shift[3]; extern volatile bool wait_for_user;
extern float home_offset[3]; #endif
extern float sw_endstop_min[3];
extern float sw_endstop_max[3];
#define LOGICAL_POSITION(POS, AXIS) (POS + home_offset[AXIS] + position_shift[AXIS]) #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
#define RAW_POSITION(POS, AXIS) (POS - home_offset[AXIS] - position_shift[AXIS]) extern bool suspend_auto_report;
#define LOGICAL_X_POSITION(POS) LOGICAL_POSITION(POS, X_AXIS) #endif
#define LOGICAL_Y_POSITION(POS) LOGICAL_POSITION(POS, Y_AXIS)
#define LOGICAL_Z_POSITION(POS) LOGICAL_POSITION(POS, Z_AXIS)
#define RAW_X_POSITION(POS) RAW_POSITION(POS, X_AXIS)
#define RAW_Y_POSITION(POS) RAW_POSITION(POS, Y_AXIS)
#define RAW_Z_POSITION(POS) RAW_POSITION(POS, Z_AXIS)
#define RAW_CURRENT_POSITION(AXIS) RAW_POSITION(current_position[AXIS], AXIS)
// GCode support for external objects extern float current_position[XYZE], destination[XYZE];
bool code_seen(char);
int code_value_int(); /**
float code_value_temp_abs(); * Workspace offsets
float code_value_temp_diff(); */
#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) #if ENABLED(DELTA)
extern float delta[3]; extern float delta_height,
extern float endstop_adj[3]; // axis[n].endstop_adj delta_endstop_adj[ABC],
extern float delta_radius; delta_radius,
extern float delta_diagonal_rod; delta_tower_angle_trim[ABC],
extern float delta_segments_per_second; delta_tower[ABC][2],
extern float delta_diagonal_rod_trim_tower_1; delta_diagonal_rod,
extern float delta_diagonal_rod_trim_tower_2; delta_calibration_radius,
extern float delta_diagonal_rod_trim_tower_3; delta_diagonal_rod_2_tower[ABC],
void inverse_kinematics(const float cartesian[3]); delta_segments_per_second,
void recalc_delta_settings(float radius, float diagonal_rod); delta_clip_start_height;
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
extern int delta_grid_spacing[2]; void recalc_delta_settings();
void adjust_delta(float cartesian[3]); float delta_safe_distance_from_top();
#endif
#elif ENABLED(SCARA) // Macro to obtain the Z position of an individual tower
extern float delta[3]; #define DELTA_Z(V,T) V[Z_AXIS] + SQRT( \
extern float axis_scaling[3]; // Build size scaling delta_diagonal_rod_2_tower[T] - HYPOT2( \
void inverse_kinematics(const float cartesian[3]); delta_tower[T][X_AXIS] - V[X_AXIS], \
void forward_kinematics_SCARA(float f_scara[3]); 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 #endif
#if ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(G26_MESH_VALIDATION)
extern float z_endstop_adj; 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 #endif
#if HAS_BED_PROBE #if HAS_BED_PROBE
extern float zprobe_zoffset; 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 #endif
#if ENABLED(HOST_KEEPALIVE_FEATURE) #if ENABLED(HOST_KEEPALIVE_FEATURE)
extern uint8_t host_keepalive_interval; extern MarlinBusyState busy_state;
#define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
#else
#define KEEPALIVE_STATE(n) NOOP
#endif #endif
#if FAN_COUNT > 0 #if FAN_COUNT > 0
extern int fanSpeeds[FAN_COUNT]; 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 #endif
#if ENABLED(BARICUDA) #if ENABLED(BARICUDA)
extern int baricuda_valve_pressure; extern uint8_t baricuda_valve_pressure, baricuda_e_to_p_pressure;
extern int baricuda_e_to_p_pressure;
#endif #endif
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
extern float filament_width_nominal; //holds the theoretical filament diameter i.e., 3.00 or 1.75 extern bool filament_sensor; // Flag that filament sensor readings should control extrusion
extern bool filament_sensor; //indicates that filament sensor readings should control extrusion extern float filament_width_nominal, // Theoretical filament diameter i.e., 3.00 or 1.75
extern float filament_width_meas; //holds the filament diameter as accurately measured filament_width_meas; // Measured filament diameter
extern int8_t measurement_delay[]; //ring buffer to delay measurement extern uint8_t meas_delay_cm; // Delay distance
extern int filwidth_delay_index1, filwidth_delay_index2; //ring buffer index. used by planner, temperature, and main code extern int8_t measurement_delay[MAX_MEASUREMENT_DELAY + 1], // Ring buffer to delay measurement
extern int meas_delay_cm; //delay distance filwidth_delay_index[2]; // Ring buffer indexes. Used by planner, temperature, and main code
#endif #endif
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
extern FilamentChangeMenuResponse filament_change_menu_response; 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 #endif
#if ENABLED(PID_EXTRUSION_SCALING) #if HAS_POWER_SWITCH
extern int lpq_len; extern bool powersupply_on;
#endif #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)
#if ENABLED(FWRETRACT)
extern bool autoretract_enabled;
extern bool retracted[EXTRUDERS]; // extruder[n].retracted
extern float retract_length, retract_length_swap, retract_feedrate_mm_s, retract_zlift;
extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate_mm_s;
#endif
// Print job timer
#if ENABLED(PRINTCOUNTER)
extern PrintCounter print_job_timer;
#else
extern Stopwatch print_job_timer;
#endif #endif
// Handling multiple extruders pins // Handling multiple extruders pins
extern uint8_t active_extruder; extern uint8_t active_extruder;
#if HAS_TEMP_HOTEND || HAS_TEMP_BED
void print_heaterstates();
#endif
#if ENABLED(MIXING_EXTRUDER) #if ENABLED(MIXING_EXTRUDER)
extern float mixing_factor[MIXING_STEPPERS]; extern float mixing_factor[MIXING_STEPPERS];
#endif #endif
void calculate_volumetric_multipliers(); inline void set_current_from_destination() { COPY(current_position, destination); }
inline void set_destination_from_current() { COPY(destination, current_position); }
// Buzzer void prepare_move_to_destination();
#if HAS_BUZZER && PIN_EXISTS(BEEPER)
#include "buzzer.h"
#endif
/** /**
* Blocking movement and shorthand functions * Blocking movement and shorthand functions
*/ */
inline void do_blocking_move_to(float x, float y, float z, float fr_mm_m=0.0); void do_blocking_move_to(const float rx, const float ry, const float rz, const float &fr_mm_s=0);
inline void do_blocking_move_to_x(float x, float fr_mm_m=0.0); void do_blocking_move_to_x(const float &rx, const float &fr_mm_s=0);
inline void do_blocking_move_to_z(float z, float fr_mm_m=0.0); void do_blocking_move_to_z(const float &rz, const float &fr_mm_s=0);
inline void do_blocking_move_to_xy(float x, float y, float fr_mm_m=0.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 #endif // MARLIN_H

View File

@@ -1,73 +1,53 @@
/** /*
* Marlin 3D Printer Firmware ================================================================================
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Marlin Firmware
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm (c) 2011-2018 MarlinFirmware
* Portions of Marlin are (c) by their respective authors.
* This program is free software: you can redistribute it and/or modify All code complies with GPLv2 and/or GPLv3
* 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.
* Greetings! Thank you for choosing Marlin as your 3D printer firmware.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of To configure Marlin you must edit Configuration.h and Configuration_adv.h
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the located in the root 'Marlin' folder. Check the example_configurations folder to
* GNU General Public License for more details. see if there's a more suitable starting-point for your specific hardware.
*
* You should have received a copy of the GNU General Public License Before diving in, we recommend the following essential links:
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Marlin Firmware Official Website
- http://marlinfw.org/
The official Marlin Firmware website contains the most up-to-date
documentation. Contributions are always welcome!
Configuration
- https://www.youtube.com/watch?v=3gwWVFtdg-4
A good 20-minute overview of Marlin configuration by Tom Sanladerer.
(Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
- http://marlinfw.org/docs/configuration/configuration.html
Marlin's configuration options are explained in more detail here.
Getting Help
- http://forums.reprap.org/list.php?415
The Marlin Discussion Forum is a great place to get help from other Marlin
users who may have experienced similar issues to your own.
- https://github.com/MarlinFirmware/Marlin/issues
With a free GitHub account you can provide us with feedback, bug reports,
and feature requests via the Marlin Issue Queue.
Contributing
- http://marlinfw.org/docs/development/contributing.html
If you'd like to contribute to Marlin, read this first!
- http://marlinfw.org/docs/development/coding_standards.html
Before submitting code get to know the Coding Standards.
*/ */
/**
* About Marlin
*
* This firmware is a mashup between Sprinter and grbl.
* - https://github.com/kliment/Sprinter
* - https://github.com/simen/grbl/tree
*
* It has preliminary support for Matthew Roberts advance algorithm
* - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
*/
/* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */
/* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */
#include "MarlinConfig.h"
#if ENABLED(ULTRA_LCD)
#if ENABLED(LCD_I2C_TYPE_PCF8575)
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#elif ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008)
#include <Wire.h>
#include <LiquidTWI2.h>
#elif ENABLED(LCM1602)
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#elif ENABLED(DOGLCD)
#include <U8glib.h> // library for graphics LCD by Oli Kraus (https://github.com/olikraus/U8glib_Arduino)
#else
#include <LiquidCrystal.h> // library for character LCD
#endif
#endif
#if HAS_DIGIPOTSS
#include <SPI.h>
#endif
#if ENABLED(DIGIPOT_I2C)
#include <Wire.h>
#endif
#if ENABLED(HAVE_TMCDRIVER)
#include <SPI.h>
#include <TMC26XStepper.h>
#endif
#if ENABLED(HAVE_L6470DRIVER)
#include <SPI.h>
#include <L6470.h>
#endif

View File

@@ -23,19 +23,26 @@
#ifndef MARLIN_CONFIG_H #ifndef MARLIN_CONFIG_H
#define MARLIN_CONFIG_H #define MARLIN_CONFIG_H
#include "fastio.h"
#include "macros.h"
#include "boards.h" #include "boards.h"
#include "macros.h"
#include "Version.h" #include "Version.h"
#include "Configuration.h" #include "Configuration.h"
#include "Conditionals_LCD.h" #include "Conditionals_LCD.h"
#include "drivers.h"
#include "Configuration_adv.h" #include "Configuration_adv.h"
#include "pins.h"
#ifndef USBCON #if USE_MARLINSERIAL
#define HardwareSerial_h // trick to disable the standard HWserial #define HardwareSerial_h // trick to disable the standard HWserial
#endif #endif
#include "Arduino.h"
#include "types.h"
#include "HAL.h"
#include "pins.h"
#include "Conditionals_post.h" #include "Conditionals_post.h"
#include "SanityCheck.h" #include "SanityCheck.h"
#include "enum.h"
#include "language.h"
#include "utility.h"
#include "serial.h"
#endif // MARLIN_CONFIG_H #endif // MARLIN_CONFIG_H

57
Marlin/MarlinSPI.h Normal file
View File

@@ -0,0 +1,57 @@
/**
* 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_SPI_H__
#define __MARLIN_SPI_H__
#include <stdint.h>
#include "softspi.h"
template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
class SPI {
static SoftSPI<MisoPin, MosiPin, SckPin> softSPI;
public:
FORCE_INLINE static void init() { softSPI.begin(); }
FORCE_INLINE static void send(uint8_t data) { softSPI.send(data); }
FORCE_INLINE static uint8_t receive() { return softSPI.receive(); }
};
// Hardware SPI
template<>
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(MISO_PIN);
WRITE(MISO_PIN, HIGH);
}
FORCE_INLINE static uint8_t receive() {
SPDR = 0;
while (!TEST(SPSR, SPIF)) { /* nada */ }
return SPDR;
}
};
#endif // __MARLIN_SPI_H__

View File

@@ -21,108 +21,370 @@
*/ */
/** /**
MarlinSerial.cpp - Hardware serial library for Wiring * MarlinSerial.cpp - Hardware serial library for Wiring
Copyright (c) 2006 Nicholas Zambetti. All right reserved. * Copyright (c) 2006 Nicholas Zambetti. All right reserved.
*
Modified 23 November 2006 by David A. Mellis * Modified 23 November 2006 by David A. Mellis
Modified 28 September 2010 by Mark Sproul * Modified 28 September 2010 by Mark Sproul
Modified 14 February 2016 by Andreas Hardtung (added tx buffer) * 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)
*/ */
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
#include "MarlinConfig.h"
#if USE_MARLINSERIAL && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#include "MarlinSerial.h" #include "MarlinSerial.h"
#include "stepper.h"
#include "Marlin.h" #include "Marlin.h"
#ifndef USBCON struct ring_buffer_r {
// this next line disables the entire HardwareSerial.cpp, unsigned char buffer[RX_BUFFER_SIZE];
// this is so I can support Attiny series and any other chip without a UART volatile ring_buffer_pos_t head, tail;
#if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H) };
#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) #if UART_PRESENT(SERIAL_PORT)
ring_buffer_r rx_buffer = { { 0 }, 0, 0 }; ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
#if TX_BUFFER_SIZE > 0 #if TX_BUFFER_SIZE > 0
ring_buffer_t tx_buffer = { { 0 }, 0, 0 }; ring_buffer_t tx_buffer = { { 0 }, 0, 0 };
#endif
static bool _written; static bool _written;
#endif #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 #endif
#if ENABLED(SERIAL_STATS_DROPPED_RX)
uint8_t rx_dropped_bytes = 0;
#endif
FORCE_INLINE void store_char(unsigned char c) { #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
CRITICAL_SECTION_START; uint8_t rx_buffer_overruns = 0;
uint8_t h = rx_buffer.head; #endif
uint8_t i = (uint8_t)(h + 1) & (RX_BUFFER_SIZE - 1);
// if we should be storing the received character into the location #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
// just before the tail (meaning that the head would advance to the uint8_t rx_framing_errors = 0;
// current location of the tail), we're about to overflow the buffer #endif
// and so we don't write the character or advance the head.
if (i != rx_buffer.tail) { #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
rx_buffer.buffer[h] = c; ring_buffer_pos_t rx_max_enqueued = 0;
rx_buffer.head = i; #endif
}
CRITICAL_SECTION_END; // A SW memory barrier, to ensure GCC does not overoptimize loops
#define sw_barrier() asm volatile("": : :"memory");
#if ENABLED(EMERGENCY_PARSER) #if ENABLED(EMERGENCY_PARSER)
emergency_parser(c); #include "emergency_parser.h"
#endif #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!
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
// than successive reads of a variable, so 2 consecutive reads with
// the same value means no interrupt updated it.
ring_buffer_pos_t vold, vnew = rx_buffer.head;
sw_barrier();
do {
vold = vnew;
vnew = rx_buffer.head;
sw_barrier();
} while (vold != vnew);
return vnew;
#else
// With an 8bit index, reads are always atomic. No need for special handling
return rx_buffer.head;
#endif
}
#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 -
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();
// Flag we are about to change the true value
rx_tail_value_not_stable = true;
sw_barrier();
// Store the new value
rx_buffer.tail = value;
sw_barrier();
// Signal the new value is completely stored into the value
rx_tail_value_not_stable = false;
sw_barrier();
#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 -
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)
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.
const ring_buffer_pos_t t = atomic_read_rx_tail();
// Get the head pointer - This ISR is the only one that modifies its value, so it's safe to read here
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)(RX_BUFFER_SIZE - 1);
// 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 = M_UDRx;
#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
// full, so don't write the character or advance the head.
if (i != t) {
rx_buffer.buffer[h] = c;
h = i;
}
#if ENABLED(SERIAL_STATS_DROPPED_RX)
else if (!++rx_dropped_bytes) --rx_dropped_bytes;
#endif
#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)(RX_BUFFER_SIZE - 1);
// Keep track of the maximum count of enqueued bytes
NOLESS(rx_max_enqueued, rx_count);
#endif
#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)(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 >= (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
// to be in the middle of trying to disable the RX interrupt in the main program, eventually the
// enabling of the TX interrupt could be undone. The ONLY reliable thing this can do to ensure
// the sending of the XOFF char is to send it HERE AND NOW.
// About to send the XOFF char
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
// 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 (!TEST(M_UCSRxA, M_UDREx)) {
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)(RX_BUFFER_SIZE - 1);
// Read the character from the USART
c = M_UDRx;
#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
// full, so don't write the character or advance the head.
if (i != t) {
rx_buffer.buffer[h] = c;
h = i;
}
#if ENABLED(SERIAL_STATS_DROPPED_RX)
else if (!++rx_dropped_bytes) --rx_dropped_bytes;
#endif
}
sw_barrier();
}
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
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
// wait to be empty TX buffer loop and the actual write of the character. Since
// the TX buffer is full because it's sending the XOFF char, the only way to be
// 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 (!TEST(M_UCSRxA, M_UDREx)) {
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)(RX_BUFFER_SIZE - 1);
// Read the character from the USART
c = M_UDRx;
#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
// full, so don't write the character or advance the head.
if (i != t) {
rx_buffer.buffer[h] = c;
h = i;
}
#if ENABLED(SERIAL_STATS_DROPPED_RX)
else if (!++rx_dropped_bytes) --rx_dropped_bytes;
#endif
}
sw_barrier();
}
// At this point everything is ready. The write() function won't
// 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;
} }
#if TX_BUFFER_SIZE > 0 #if TX_BUFFER_SIZE > 0
FORCE_INLINE void _tx_udr_empty_irq(void)
{
// If interrupts are enabled, there must be more data in the output
// buffer. Send the next byte
uint8_t t = tx_buffer.tail;
uint8_t c = tx_buffer.buffer[t];
tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
M_UDRx = c; // (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 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
M_UDRx = XON_CHAR;
// clear the TXC bit -- "can be cleared by writing a one to its bit // 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 // location". This makes sure flush() won't return until the bytes
// actually got written // actually got written
SBI(M_UCSRxA, M_TXCx); SBI(M_UCSRxA, M_TXCx);
if (tx_buffer.head == tx_buffer.tail) { // Remember we sent it.
// Buffer empty, so disable interrupts xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
CBI(M_UCSRxB, M_UDRIEx);
}
}
#if defined(M_USARTx_UDRE_vect) // If nothing else to transmit, just disable TX interrupts.
ISR(M_USARTx_UDRE_vect) { if (h == t) CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
_tx_udr_empty_irq();
return;
} }
#endif #endif
#endif // If nothing to transmit, just disable TX interrupts. This could
// happen as the result of the non atomicity of the disabling of RX
#if defined(M_USARTx_RX_vect) // interrupts that could end reenabling TX interrupts as a side effect.
ISR(M_USARTx_RX_vect) { if (h == t) {
unsigned char c = M_UDRx; CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
store_char(c); return;
} }
// There is something to TX, Send the next byte
const uint8_t c = tx_buffer.buffer[t];
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/
SBI(M_UCSRxA, M_TXCx);
// Disable interrupts if there is nothing to transmit following this byte
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
// Constructors //////////////////////////////////////////////////////////////// #endif // TX_BUFFER_SIZE
MarlinSerial::MarlinSerial() { } #ifdef M_USARTx_RX_vect
ISR(M_USARTx_RX_vect) { store_rxd_char(); }
#endif
// Public Methods ////////////////////////////////////////////////////////////// // Public Methods
void MarlinSerial::begin(long baud) { void MarlinSerial::begin(const long baud) {
uint16_t baud_setting; uint16_t baud_setting;
bool useU2X = true; bool useU2X = true;
#if F_CPU == 16000000UL && SERIAL_PORT == 0 #if F_CPU == 16000000UL && SERIAL_PORT == 0
// hard-coded exception for compatibility with the bootloader shipped // Hard-coded exception for compatibility with the bootloader shipped
// with the Duemilanove and previous boards and the firmware on the 8U2 // with the Duemilanove and previous boards, and the firmware on the
// on the Uno and Mega 2560. // 8U2 on the Uno and Mega 2560.
if (baud == 57600) { if (baud == 57600) useU2X = false;
useU2X = false;
}
#endif #endif
if (useU2X) { if (useU2X) {
@@ -143,8 +405,8 @@ void MarlinSerial::begin(long baud) {
SBI(M_UCSRxB, M_RXCIEx); SBI(M_UCSRxB, M_RXCIEx);
#if TX_BUFFER_SIZE > 0 #if TX_BUFFER_SIZE > 0
CBI(M_UCSRxB, M_UDRIEx); CBI(M_UCSRxB, M_UDRIEx);
_written = false;
#endif #endif
_written = false;
} }
void MarlinSerial::end() { void MarlinSerial::end() {
@@ -154,145 +416,184 @@ void MarlinSerial::end() {
CBI(M_UCSRxB, M_UDRIEx); CBI(M_UCSRxB, M_UDRIEx);
} }
void MarlinSerial::checkRx(void) {
if (TEST(M_UCSRxA, M_RXCx)) {
uint8_t c = M_UDRx;
store_char(c);
}
}
int MarlinSerial::peek(void) { int MarlinSerial::peek(void) {
int v; const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
CRITICAL_SECTION_START; return h == t ? -1 : rx_buffer.buffer[t];
uint8_t t = rx_buffer.tail;
if (rx_buffer.head == t) {
v = -1;
}
else {
v = rx_buffer.buffer[t];
}
CRITICAL_SECTION_END;
return v;
} }
int MarlinSerial::read(void) { int MarlinSerial::read(void) {
int v; const ring_buffer_pos_t h = atomic_read_rx_head();
CRITICAL_SECTION_START;
uint8_t t = rx_buffer.tail;
if (rx_buffer.head == t) {
v = -1;
}
else {
v = rx_buffer.buffer[t];
rx_buffer.tail = (uint8_t)(t + 1) & (RX_BUFFER_SIZE - 1);
}
CRITICAL_SECTION_END;
return v;
}
uint8_t MarlinSerial::available(void) { // Read the tail. Main thread owns it, so it is safe to directly read it
CRITICAL_SECTION_START; ring_buffer_pos_t t = rx_buffer.tail;
uint8_t h = rx_buffer.head;
uint8_t t = rx_buffer.tail;
CRITICAL_SECTION_END;
return (uint8_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
}
void MarlinSerial::flush(void) { // If nothing to read, return now
// RX if (h == t) return -1;
// don't reverse this or there may be problems if the RX interrupt
// occurs after reading the value of rx_buffer_head but before writing
// the value to rx_buffer_tail; the previous value of rx_buffer_head
// may be written to rx_buffer_tail, making it appear as if the buffer
// were full, not empty.
CRITICAL_SECTION_START;
rx_buffer.head = rx_buffer.tail;
CRITICAL_SECTION_END;
}
// Get the next char
const int v = rx_buffer.buffer[t];
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 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)(RX_BUFFER_SIZE - 1);
if (rx_count < (RX_BUFFER_SIZE) / 10) {
#if TX_BUFFER_SIZE > 0 #if TX_BUFFER_SIZE > 0
uint8_t MarlinSerial::availableForWrite(void) { // Signal we want an XON character to be sent.
CRITICAL_SECTION_START; xon_xoff_state = XON_CHAR;
uint8_t h = tx_buffer.head; // Enable TX ISR. Non atomic, but it will eventually enable them
uint8_t t = tx_buffer.tail;
CRITICAL_SECTION_END;
return (uint8_t)(TX_BUFFER_SIZE + h - t) & (TX_BUFFER_SIZE - 1);
}
void MarlinSerial::write(uint8_t c) {
_written = true;
CRITICAL_SECTION_START;
bool emty = (tx_buffer.head == tx_buffer.tail);
CRITICAL_SECTION_END;
// If the buffer and the data register is empty, just write the byte
// to the data register and be done. This shortcut helps
// significantly improve the effective datarate at high (>
// 500kbit/s) bitrates, where interrupt overhead becomes a slowdown.
if (emty && TEST(M_UCSRxA, M_UDREx)) {
CRITICAL_SECTION_START;
M_UDRx = c;
SBI(M_UCSRxA, M_TXCx);
CRITICAL_SECTION_END;
return;
}
uint8_t i = (tx_buffer.head + 1) & (TX_BUFFER_SIZE - 1);
// If the output buffer is full, there's nothing for it other than to
// wait for the interrupt handler to empty it a bit
while (i == tx_buffer.tail) {
if (!TEST(SREG, SREG_I)) {
// Interrupts are disabled, so we'll have to poll the data
// register empty flag ourselves. If it is set, pretend an
// interrupt has happened and call the handler to free up
// space for us.
if (TEST(M_UCSRxA, M_UDREx))
_tx_udr_empty_irq();
} else {
// nop, the interrupt handler will free up space for us
}
}
tx_buffer.buffer[tx_buffer.head] = c;
{ CRITICAL_SECTION_START;
tx_buffer.head = i;
SBI(M_UCSRxB, M_UDRIEx); SBI(M_UCSRxB, M_UDRIEx);
CRITICAL_SECTION_END;
}
return;
}
void MarlinSerial::flushTX(void) {
// TX
// If we have never written a byte, no need to flush. This special
// case is needed since there is no way to force the TXC (transmit
// complete) bit to 1 during initialization
if (!_written)
return;
while (TEST(M_UCSRxB, M_UDRIEx) || !TEST(M_UCSRxA, M_TXCx)) {
if (!TEST(SREG, SREG_I) && TEST(M_UCSRxB, M_UDRIEx))
// Interrupts are globally disabled, but the DR empty
// interrupt should be enabled, so poll the DR empty flag to
// prevent deadlock
if (TEST(M_UCSRxA, M_UDREx))
_tx_udr_empty_irq();
}
// If we get here, nothing is queued anymore (DRIE is disabled) and
// the hardware finished tranmission (TXC is set).
}
#else #else
void MarlinSerial::write(uint8_t c) { // If not using TX interrupts, we must send the XON char now
while (!TEST(M_UCSRxA, M_UDREx)) xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
; while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
M_UDRx = c; M_UDRx = XON_CHAR;
#endif
}
} }
#endif #endif
// end NEW return v;
}
/// imports from print.h 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)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
}
void MarlinSerial::flush(void) {
// Set the tail to the head:
// - Read the RX head index in a safe way. (See atomic_read_rx_head.)
// - Set the tail, making sure the RX ISR will always get a stable value, even
// if it interrupts the writing of the value of that variable in the middle.
atomic_set_rx_tail(atomic_read_rx_head());
#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 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.
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 (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();
M_UDRx = XON_CHAR;
#endif
}
#endif
}
#if TX_BUFFER_SIZE > 0
void MarlinSerial::write(const uint8_t c) {
_written = true;
// If the TX interrupts are disabled and the data register
// is empty, just write the byte to the data register and
// be done. This shortcut helps significantly improve the
// effective datarate at high (>500kbit/s) bitrates, where
// 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 (!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
SBI(M_UCSRxA, M_TXCx);
return;
}
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()) {
// Make room by polling if it is possible to transmit, and do so!
while (i == tx_buffer.tail) {
// If we can transmit another byte, do it.
if (TEST(M_UCSRxA, M_UDREx)) _tx_udr_empty_irq();
// Make sure compiler rereads tx_buffer.tail
sw_barrier();
}
}
else {
// Interrupts are enabled, just wait until there is space
while (i == tx_buffer.tail) { sw_barrier(); }
}
// Store new char. head is always safe to move
tx_buffer.buffer[tx_buffer.head] = c;
tx_buffer.head = i;
// Enable TX ISR - Non atomic, but it will eventually enable TX ISR
SBI(M_UCSRxB, M_UDRIEx);
}
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;
// If global interrupts are disabled (as the result of being called from an ISR)...
if (!ISRS_ENABLED()) {
// Wait until everything was transmitted - We must do polling, as interrupts are disabled
while (tx_buffer.head != tx_buffer.tail || !TEST(M_UCSRxA, M_TXCx)) {
// If there is more space, send an extra character
if (TEST(M_UCSRxA, M_UDREx))
_tx_udr_empty_irq();
sw_barrier();
}
}
else {
// Wait until everything was transmitted
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
*/
void MarlinSerial::print(char c, int base) { void MarlinSerial::print(char c, int base) {
print((long)c, base); print((long)c, base);
@@ -311,20 +612,14 @@ void MarlinSerial::print(unsigned int n, int base) {
} }
void MarlinSerial::print(long n, int base) { void MarlinSerial::print(long n, int base) {
if (base == 0) { if (base == 0) write(n);
write(n);
}
else if (base == 10) { else if (base == 10) {
if (n < 0) { if (n < 0) { print('-'); n = -n; }
print('-');
n = -n;
}
printNumber(n, 10); printNumber(n, 10);
} }
else { else
printNumber(n, base); printNumber(n, base);
} }
}
void MarlinSerial::print(unsigned long n, int base) { void MarlinSerial::print(unsigned long n, int base) {
if (base == 0) write(n); if (base == 0) write(n);
@@ -385,26 +680,21 @@ void MarlinSerial::println(double n, int digits) {
println(); println();
} }
// Private Methods ///////////////////////////////////////////////////////////// // Private Methods
void MarlinSerial::printNumber(unsigned long n, uint8_t base) { void MarlinSerial::printNumber(unsigned long n, uint8_t base) {
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars. if (n) {
unsigned long i = 0; unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
int8_t i = 0;
if (n == 0) { while (n) {
print('0');
return;
}
while (n > 0) {
buf[i++] = n % base; buf[i++] = n % base;
n /= base; n /= base;
} }
while (i--)
for (; i > 0; i--) print((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10)));
print((char)(buf[i - 1] < 10 ? }
'0' + buf[i - 1] : else
'A' + buf[i - 1] - 10)); print('0');
} }
void MarlinSerial::printFloat(double number, uint8_t digits) { void MarlinSerial::printFloat(double number, uint8_t digits) {
@@ -417,7 +707,7 @@ void MarlinSerial::printFloat(double number, uint8_t digits) {
// Round correctly so that print(1.999, 2) prints as "2.00" // Round correctly so that print(1.999, 2) prints as "2.00"
double rounding = 0.5; double rounding = 0.5;
for (uint8_t i = 0; i < digits; ++i) for (uint8_t i = 0; i < digits; ++i)
rounding /= 10.0; rounding *= 0.1;
number += rounding; number += rounding;
@@ -427,113 +717,24 @@ void MarlinSerial::printFloat(double number, uint8_t digits) {
print(int_part); print(int_part);
// Print the decimal point, but only if there are digits beyond // Print the decimal point, but only if there are digits beyond
if (digits > 0) print('.'); if (digits) {
print('.');
// Extract digits from the remainder one at a time // Extract digits from the remainder one at a time
while (digits-- > 0) { while (digits--) {
remainder *= 10.0; remainder *= 10.0;
int toPrint = int(remainder); int toPrint = int(remainder);
print(toPrint); print(toPrint);
remainder -= toPrint; remainder -= toPrint;
} }
} }
// Preinstantiate Objects ////////////////////////////////////////////////////// }
// Preinstantiate
MarlinSerial customizedSerial; MarlinSerial customizedSerial;
#endif // whole file #endif // USE_MARLINSERIAL && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
#endif // !USBCON
// For AT90USB targets use the UART for BT interfacing // For AT90USB targets use the UART for BT interfacing
#if defined(USBCON) && ENABLED(BLUETOOTH) #if !USE_MARLINSERIAL && ENABLED(BLUETOOTH)
HardwareSerial bluetoothSerial; HardwareSerial bluetoothSerial;
#endif #endif
#if ENABLED(EMERGENCY_PARSER)
// Currently looking for: M108, M112, M410
// If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
FORCE_INLINE void emergency_parser(unsigned char c) {
static e_parser_state state = state_RESET;
switch (state) {
case state_RESET:
switch (c) {
case ' ': break;
case 'N': state = state_N; break;
case 'M': state = state_M; break;
default: state = state_IGNORE;
}
break;
case state_N:
switch (c) {
case '0': case '1': case '2':
case '3': case '4': case '5':
case '6': case '7': case '8':
case '9': case '-': case ' ': break;
case 'M': state = state_M; break;
default: state = state_IGNORE;
}
break;
case state_M:
switch (c) {
case ' ': break;
case '1': state = state_M1; break;
case '4': state = state_M4; break;
default: state = state_IGNORE;
}
break;
case state_M1:
switch (c) {
case '0': state = state_M10; break;
case '1': state = state_M11; break;
default: state = state_IGNORE;
}
break;
case state_M10:
state = (c == '8') ? state_M108 : state_IGNORE;
break;
case state_M11:
state = (c == '2') ? state_M112 : state_IGNORE;
break;
case state_M4:
state = (c == '1') ? state_M41 : state_IGNORE;
break;
case state_M41:
state = (c == '0') ? state_M410 : state_IGNORE;
break;
case state_IGNORE:
if (c == '\n') state = state_RESET;
break;
default:
if (c == '\n') {
switch (state) {
case state_M108:
wait_for_heatup = false;
break;
case state_M112:
kill(PSTR(MSG_KILLED));
break;
case state_M410:
quickstop_stepper();
break;
default:
break;
}
state = state_RESET;
}
}
}
#endif

View File

@@ -21,16 +21,16 @@
*/ */
/** /**
MarlinSerial.h - Hardware serial library for Wiring * MarlinSerial.h - Hardware serial library for Wiring
Copyright (c) 2006 Nicholas Zambetti. All right reserved. * Copyright (c) 2006 Nicholas Zambetti. All right reserved.
*
Modified 28 September 2010 by Mark Sproul * Modified 28 September 2010 by Mark Sproul
Modified 14 February 2016 by Andreas Hardtung (added tx buffer) * Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
*/ */
#ifndef MarlinSerial_h #ifndef _MARLINSERIAL_H_
#define MarlinSerial_h #define _MARLINSERIAL_H_
#include "MarlinConfig.h" #include "MarlinConfig.h"
@@ -52,8 +52,7 @@
#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix
#endif #endif
// Registers used by MarlinSerial class (these are expanded // Registers used by MarlinSerial class (expanded depending on selected serial port)
// 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_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_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,B)
#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,) #define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)
@@ -61,6 +60,9 @@
#define M_TXCx SERIAL_REGNAME(TXC,SERIAL_PORT,) #define M_TXCx SERIAL_REGNAME(TXC,SERIAL_PORT,)
#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,) #define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)
#define M_UDREx SERIAL_REGNAME(UDRE,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_UDRIEx SERIAL_REGNAME(UDRIE,SERIAL_PORT,)
#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,) #define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)
#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H) #define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H)
@@ -70,112 +72,113 @@
#define M_U2Xx SERIAL_REGNAME(U2X,SERIAL_PORT,) #define M_U2Xx SERIAL_REGNAME(U2X,SERIAL_PORT,)
#define M_USARTx_UDRE_vect SERIAL_REGNAME(USART,SERIAL_PORT,_UDRE_vect) #define M_USARTx_UDRE_vect SERIAL_REGNAME(USART,SERIAL_PORT,_UDRE_vect)
#define DEC 10 #define DEC 10
#define HEX 16 #define HEX 16
#define OCT 8 #define OCT 8
#define BIN 2 #define BIN 2
#define BYTE 0 #define BYTE 0
// Define constants and variables for buffering serial data.
#ifndef USBCON // Use only 0 or powers of 2 greater than 1
// Define constants and variables for buffering incoming serial data. We're // : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
// using a ring buffer (I think), in which rx_buffer_head is the index of the
// location to which to write the next incoming character and rx_buffer_tail
// is the index of the location from which to read.
// 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
#ifndef RX_BUFFER_SIZE #ifndef RX_BUFFER_SIZE
#define RX_BUFFER_SIZE 128 #define RX_BUFFER_SIZE 128
#endif #endif
// 256 is the max TX buffer limit due to uint8_t head and tail.
#ifndef TX_BUFFER_SIZE #ifndef TX_BUFFER_SIZE
#define TX_BUFFER_SIZE 32 #define TX_BUFFER_SIZE 32
#endif #endif
#if !((RX_BUFFER_SIZE == 256) ||(RX_BUFFER_SIZE == 128) ||(RX_BUFFER_SIZE == 64) ||(RX_BUFFER_SIZE == 32) ||(RX_BUFFER_SIZE == 16) ||(RX_BUFFER_SIZE == 8) ||(RX_BUFFER_SIZE == 4) ||(RX_BUFFER_SIZE == 2))
#error "RX_BUFFER_SIZE has to be a power of 2 and >= 2" #if USE_MARLINSERIAL
#endif
#if !((TX_BUFFER_SIZE == 256) ||(TX_BUFFER_SIZE == 128) ||(TX_BUFFER_SIZE == 64) ||(TX_BUFFER_SIZE == 32) ||(TX_BUFFER_SIZE == 16) ||(TX_BUFFER_SIZE == 8) ||(TX_BUFFER_SIZE == 4) ||(TX_BUFFER_SIZE == 2) ||(TX_BUFFER_SIZE == 0)) #if RX_BUFFER_SIZE > 256
#error TX_BUFFER_SIZE has to be a power of 2 or 0 typedef uint16_t ring_buffer_pos_t;
#else
typedef uint8_t ring_buffer_pos_t;
#endif #endif
struct ring_buffer_r { #if ENABLED(SERIAL_STATS_DROPPED_RX)
unsigned char buffer[RX_BUFFER_SIZE]; extern uint8_t rx_dropped_bytes;
volatile uint8_t head;
volatile uint8_t tail;
};
#if TX_BUFFER_SIZE > 0
struct ring_buffer_t {
unsigned char buffer[TX_BUFFER_SIZE];
volatile uint8_t head;
volatile uint8_t tail;
};
#endif #endif
#if UART_PRESENT(SERIAL_PORT) #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
extern ring_buffer_r rx_buffer; extern uint8_t rx_buffer_overruns;
#if TX_BUFFER_SIZE > 0
extern ring_buffer_t tx_buffer;
#endif
#endif #endif
#if ENABLED(EMERGENCY_PARSER) #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
#include "language.h" extern uint8_t rx_framing_errors;
void emergency_parser(unsigned char c);
#endif #endif
class MarlinSerial { //: public Stream #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
extern ring_buffer_pos_t rx_max_enqueued;
#endif
class MarlinSerial {
public: public:
MarlinSerial(); MarlinSerial() {};
void begin(long); static void begin(const long);
void end(); static void end();
int peek(void); static int peek(void);
int read(void); static int read(void);
void flush(void); static void flush(void);
uint8_t available(void); static ring_buffer_pos_t available(void);
void checkRx(void); static void write(const uint8_t c);
void write(uint8_t c); static void flushTX(void);
#if TX_BUFFER_SIZE > 0
uint8_t availableForWrite(void); #if ENABLED(SERIAL_STATS_DROPPED_RX)
void flushTX(void); FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
#endif #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: private:
void printNumber(unsigned long, uint8_t); static void printNumber(unsigned long, const uint8_t);
void printFloat(double, uint8_t); static void printFloat(double, uint8_t);
public:
FORCE_INLINE void write(const char* str) { while (*str) write(*str++); }
FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
FORCE_INLINE void print(const char* str) { write(str); }
void print(char, int = BYTE);
void print(unsigned char, int = BYTE);
void print(int, int = DEC);
void print(unsigned int, int = DEC);
void print(long, int = DEC);
void print(unsigned long, int = DEC);
void print(double, int = 2);
void println(const String& s);
void println(const char[]);
void println(char, int = BYTE);
void println(unsigned char, int = BYTE);
void println(int, int = DEC);
void println(unsigned int, int = DEC);
void println(long, int = DEC);
void println(unsigned long, int = DEC);
void println(double, int = 2);
void println(void);
}; };
extern MarlinSerial customizedSerial; extern MarlinSerial customizedSerial;
#endif // !USBCON
#endif // USE_MARLINSERIAL
// Use the UART for Bluetooth in AT90USB configurations // Use the UART for Bluetooth in AT90USB configurations
#if defined(USBCON) && ENABLED(BLUETOOTH) #if !USE_MARLINSERIAL && ENABLED(BLUETOOTH)
extern HardwareSerial bluetoothSerial; extern HardwareSerial bluetoothSerial;
#endif #endif
#endif #endif // _MARLINSERIAL_H_

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,593 @@
/**
* 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/>.
*
*/
/**
* This module is off by default, but can be enabled to facilitate the display of
* extra debug information during code development.
*
* Just connect up 5V and GND to give it power, then connect up the pins assigned
* in Configuration_adv.h. For example, on the Re-ARM you could use:
*
* #define MAX7219_CLK_PIN 77
* #define MAX7219_DIN_PIN 78
* #define MAX7219_LOAD_PIN 79
*
* send() is called automatically at startup, and then there are a number of
* support functions available to control the LEDs in the 8x8 grid.
*/
#include "MarlinConfig.h"
#if ENABLED(MAX7219_DEBUG)
#define MAX7219_ERRORS // Disable to save 406 bytes of Program Memory
#include "Max7219_Debug_LEDs.h"
#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)
#elif _ROT == 90 || _ROT == 270
#define LED_IND(X,Y) _LED_IND(Y,X)
#define LED_BIT(X,Y) _LED_BIT(Y)
#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)
#define BIT_7219(X,Y) TEST(led_line[LED_IND(X,Y)], LED_BIT(X,Y))
#ifdef CPU_32_BIT
#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
#else
#define SIG_DELAY() DELAY_NS(188) // Delay for 0.1875µs (16MHz AVR) or 0.15µs (20MHz AVR)
#endif
void Max7219::error(const char * const func, const int32_t v1, const int32_t v2/*=-1*/) {
#if ENABLED(MAX7219_ERRORS)
SERIAL_ECHOPGM("??? Max7219::");
serialprintPGM(func);
SERIAL_CHAR('(');
SERIAL_ECHO(v1);
if (v2 > 0) SERIAL_ECHOPAIR(", ", v2);
SERIAL_CHAR(')');
SERIAL_EOL();
#else
UNUSED(func); UNUSED(v1); UNUSED(v2);
#endif
}
/**
* Flip the lowest n_bytes of the supplied bits:
* flipped(x, 1) flips the low 8 bits of x.
* flipped(x, 2) flips the low 16 bits of x.
* flipped(x, 3) flips the low 24 bits of x.
* flipped(x, 4) flips the low 32 bits of x.
*/
inline uint32_t flipped(const uint32_t bits, const uint8_t n_bytes) {
uint32_t mask = 1, outbits = 0;
for (uint8_t b = 0; b < n_bytes * 8; b++) {
outbits <<= 1;
if (bits & mask) outbits |= 1;
mask <<= 1;
}
return outbits;
}
void Max7219::noop() {
CRITICAL_SECTION_START;
SIG_DELAY();
WRITE(MAX7219_DIN_PIN, LOW);
for (uint8_t i = 16; i--;) {
SIG_DELAY();
WRITE(MAX7219_CLK_PIN, LOW);
SIG_DELAY();
SIG_DELAY();
WRITE(MAX7219_CLK_PIN, HIGH);
SIG_DELAY();
}
CRITICAL_SECTION_END;
}
void Max7219::putbyte(uint8_t data) {
CRITICAL_SECTION_START;
for (uint8_t i = 8; i--;) {
SIG_DELAY();
WRITE(MAX7219_CLK_PIN, LOW); // tick
SIG_DELAY();
WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW); // send 1 or 0 based on data bit
SIG_DELAY();
WRITE(MAX7219_CLK_PIN, HIGH); // tock
SIG_DELAY();
data <<= 1;
}
CRITICAL_SECTION_END;
}
void Max7219::pulse_load() {
SIG_DELAY();
WRITE(MAX7219_LOAD_PIN, LOW); // tell the chip to load the data
SIG_DELAY();
WRITE(MAX7219_LOAD_PIN, HIGH);
SIG_DELAY();
}
void Max7219::send(const uint8_t reg, const uint8_t data) {
SIG_DELAY();
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 all units
void Max7219::refresh_line(const uint8_t line) {
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_line(line);
}
#if ENABLED(MAX7219_NUMERIC)
// Draw an integer with optional leading zeros and optional decimal point
void Max7219::print(const uint8_t start, int16_t value, uint8_t size, const bool leadzero=false, bool dec=false) {
constexpr uint8_t led_numeral[10] = { 0x7E, 0x60, 0x6D, 0x79, 0x63, 0x5B, 0x5F, 0x70, 0x7F, 0x7A },
led_decimal = 0x80, led_minus = 0x01;
bool blank = false, neg = value < 0;
if (neg) value *= -1;
while (size--) {
const bool minus = neg && blank;
if (minus) neg = false;
send(
max7219_reg_digit0 + start + size,
minus ? led_minus : blank ? 0x00 : led_numeral[value % 10] | (dec ? led_decimal : 0x00)
);
pulse_load(); // tell the chips to load the clocked out data
value /= 10;
if (!value && !leadzero) blank = true;
dec = false;
}
}
// Draw a float with a decimal point and optional digits
void Max7219::print(const uint8_t start, const float value, const uint8_t pre_size, const uint8_t post_size, const bool leadzero=false) {
if (pre_size) print(start, value, pre_size, leadzero, !!post_size);
if (post_size) {
const int16_t after = ABS(value) * (10 ^ post_size);
print(start + pre_size, after, post_size, true);
}
}
#endif // MAX7219_NUMERIC
// 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 - 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_line(LED_IND(x, y));
}
void Max7219::led_on(const uint8_t x, const uint8_t 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 - 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 - 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
refresh_line(LED_IND(0, row));
#else
UNUSED(row);
refresh();
#endif
}
void Max7219::send_column(const uint8_t col) {
#if _ROT == 90 || _ROT == 270
refresh_line(LED_IND(col, 0));
#else
UNUSED(col);
refresh();
#endif
}
void Max7219::clear() {
ZERO(led_line);
refresh();
}
void Max7219::fill() {
memset(led_line, 0xFF, sizeof(led_line));
refresh();
}
void Max7219::clear_row(const uint8_t row) {
if (row >= MAX7219_Y_LEDS) return error(PSTR("clear_row"), row);
for (uint8_t x = 0; x < MAX7219_X_LEDS; x++) CLR_7219(x, row);
send_row(row);
}
void Max7219::clear_column(const uint8_t col) {
if (col >= MAX7219_X_LEDS) return error(PSTR("set_column"), col);
for (uint8_t y = 0; y < MAX7219_Y_LEDS; y++) CLR_7219(col, y);
send_column(col);
}
/**
* Plot the low order bits of val to the specified row of the matrix.
* With 4 Max7219 units in the chain, it's possible to set 32 bits at once with
* one call to the function (if rotated 90° or 180°).
*/
void Max7219::set_row(const uint8_t row, const uint32_t val) {
if (row >= MAX7219_Y_LEDS) return error(PSTR("set_row"), row);
uint32_t mask = _BV32(MAX7219_X_LEDS - 1);
for (uint8_t x = 0; x < MAX7219_X_LEDS; x++) {
if (val & mask) SET_7219(x, row); else CLR_7219(x, row);
mask >>= 1;
}
send_row(row);
}
/**
* Plot the low order bits of val to the specified column of the matrix.
* With 4 Max7219 units in the chain, it's possible to set 32 bits at once with
* one call to the function (if rotated 90° or 180°).
*/
void Max7219::set_column(const uint8_t col, const uint32_t val) {
if (col >= MAX7219_X_LEDS) return error(PSTR("set_column"), col);
uint32_t mask = _BV32(MAX7219_Y_LEDS - 1);
for (uint8_t y = 0; y < MAX7219_Y_LEDS; y++) {
if (val & mask) SET_7219(col, y); else CLR_7219(col, y);
mask >>= 1;
}
send_column(col);
}
void Max7219::set_rows_16bits(const uint8_t y, uint32_t val) {
#if MAX7219_X_LEDS == 8
if (y > MAX7219_Y_LEDS - 2) return error(PSTR("set_rows_16bits"), y, val);
set_row(y + 1, val); val >>= 8;
set_row(y + 0, val);
#else // at least 16 bits on each row
if (y > MAX7219_Y_LEDS - 1) return error(PSTR("set_rows_16bits"), y, val);
set_row(y, val);
#endif
}
void Max7219::set_rows_32bits(const uint8_t y, uint32_t val) {
#if MAX7219_X_LEDS == 8
if (y > MAX7219_Y_LEDS - 4) return error(PSTR("set_rows_32bits"), y, val);
set_row(y + 3, val); val >>= 8;
set_row(y + 2, val); val >>= 8;
set_row(y + 1, val); val >>= 8;
set_row(y + 0, val);
#elif MAX7219_X_LEDS == 16
if (y > MAX7219_Y_LEDS - 2) return error(PSTR("set_rows_32bits"), y, val);
set_row(y + 1, val); val >>= 16;
set_row(y + 0, val);
#else // at least 24 bits on each row. In the 3 matrix case, just display the low 24 bits
if (y > MAX7219_Y_LEDS - 1) return error(PSTR("set_rows_32bits"), y, val);
set_row(y, val);
#endif
}
void Max7219::set_columns_16bits(const uint8_t x, uint32_t val) {
#if MAX7219_Y_LEDS == 8
if (x > MAX7219_X_LEDS - 2) return error(PSTR("set_columns_16bits"), x, val);
set_column(x + 0, val); val >>= 8;
set_column(x + 1, val);
#else // at least 16 bits in each column
if (x > MAX7219_X_LEDS - 1) return error(PSTR("set_columns_16bits"), x, val);
set_column(x, val);
#endif
}
void Max7219::set_columns_32bits(const uint8_t x, uint32_t val) {
#if MAX7219_Y_LEDS == 8
if (x > MAX7219_X_LEDS - 4) return error(PSTR("set_rows_32bits"), x, val);
set_column(x + 3, val); val >>= 8;
set_column(x + 2, val); val >>= 8;
set_column(x + 1, val); val >>= 8;
set_column(x + 0, val);
#elif MAX7219_Y_LEDS == 16
if (x > MAX7219_X_LEDS - 2) return error(PSTR("set_rows_32bits"), x, val);
set_column(x + 1, val); val >>= 16;
set_column(x + 0, val);
#else // at least 24 bits on each row. In the 3 matrix case, just display the low 24 bits
if (x > MAX7219_X_LEDS - 1) return error(PSTR("set_rows_32bits"), x, val);
set_column(x, val);
#endif
}
// Initialize the Max7219
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
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
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
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
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
}
#ifdef MAX7219_INIT_TEST
#if MAX7219_INIT_TEST == 2
void Max7219::spiral(const bool on, const uint16_t del) {
constexpr int8_t way[] = { 1, 0, 0, 1, -1, 0, 0, -1 };
int8_t px = 0, py = 0, dir = 0;
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], 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;
for (uint8_t i = MAX7219_X_LEDS; i--; x += dir) {
set_column(x, on ? 0xFFFFFFFF : 0x00000000);
delay(ms);
}
}
#endif
#endif // MAX7219_INIT_TEST
void Max7219::init() {
SET_OUTPUT(MAX7219_DIN_PIN);
SET_OUTPUT(MAX7219_CLK_PIN);
OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
delay(1);
register_setup();
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
}
#ifdef MAX7219_INIT_TEST
#if MAX7219_INIT_TEST == 2
spiral(true, 8);
delay(150);
spiral(false, 8);
#else
// Do an aesthetically-pleasing pattern to fully test the Max7219 module and LEDs.
// Light up and turn off columns, both forward and backward.
sweep(1, 20, true);
sweep(1, 20, false);
delay(150);
sweep(-1, 20, true);
sweep(-1, 20, false);
#endif
#endif
}
/**
* This code demonstrates some simple debugging using a single 8x8 LED Matrix. If your feature could
* benefit from matrix display, add its code here. Very little processing is required, so the 7219 is
* ideal for debugging when realtime feedback is important but serial output can't be used.
*/
// Apply changes to update a marker
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
#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);
#endif
}
// Apply changes to update a quantity
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
#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;
#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;
#endif
#if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
static uint8_t refresh_cnt; // = 0
constexpr uint16_t refresh_limit = 5;
static millis_t next_blink = 0;
const millis_t ms = millis();
const bool do_blink = ELAPSED(ms, next_blink);
#else
static uint16_t refresh_cnt; // = 0
constexpr bool do_blink = true;
constexpr uint16_t refresh_limit = 50000;
#endif
// Some Max7219 units are vulnerable to electrical noise, especially
// with long wires next to high current wires. If the display becomes
// corrupted, this will fix it within a couple seconds.
if (do_blink && ++refresh_cnt >= refresh_limit) {
refresh_cnt = 0;
register_setup();
}
#if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
if (do_blink) {
led_toggle(MAX7219_X_LEDS - 1, MAX7219_Y_LEDS - 1);
next_blink = ms + 1000;
}
#endif
#if defined(MAX7219_DEBUG_PLANNER_HEAD) && defined(MAX7219_DEBUG_PLANNER_TAIL) && MAX7219_DEBUG_PLANNER_HEAD == MAX7219_DEBUG_PLANNER_TAIL
static int16_t last_head_cnt = 0xF, last_tail_cnt = 0xF;
if (last_head_cnt != head || last_tail_cnt != tail) {
range16(MAX7219_DEBUG_PLANNER_HEAD, last_tail_cnt, tail, last_head_cnt, head);
last_head_cnt = head;
last_tail_cnt = tail;
}
#else
#ifdef MAX7219_DEBUG_PLANNER_HEAD
static int16_t last_head_cnt = 0x1;
if (last_head_cnt != head) {
mark16(MAX7219_DEBUG_PLANNER_HEAD, last_head_cnt, head);
last_head_cnt = head;
}
#endif
#ifdef MAX7219_DEBUG_PLANNER_TAIL
static int16_t last_tail_cnt = 0x1;
if (last_tail_cnt != tail) {
mark16(MAX7219_DEBUG_PLANNER_TAIL, last_tail_cnt, tail);
last_tail_cnt = tail;
}
#endif
#endif
#ifdef MAX7219_DEBUG_PLANNER_QUEUE
static int16_t last_depth = 0;
const int16_t current_depth = (head - tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1) & 0xF;
if (current_depth != last_depth) {
quantity16(MAX7219_DEBUG_PLANNER_QUEUE, last_depth, current_depth);
last_depth = current_depth;
}
#endif
}
#endif // MAX7219_DEBUG

154
Marlin/Max7219_Debug_LEDs.h Normal file
View File

@@ -0,0 +1,154 @@
/**
* 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/>.
*
*/
/**
* This module is off by default, but can be enabled to facilitate the display of
* extra debug information during code development.
*
* Just connect up 5V and GND to give it power, then connect up the pins assigned
* in Configuration_adv.h. For example, on the Re-ARM you could use:
*
* #define MAX7219_CLK_PIN 77
* #define MAX7219_DIN_PIN 78
* #define MAX7219_LOAD_PIN 79
*
* max7219.init() is called automatically at startup, and then there are a number of
* support functions available to control the LEDs in the 8x8 grid.
*
* If you are using the Max7219 matrix for firmware debug purposes in time sensitive
* areas of the code, please be aware that the orientation (rotation) of the display can
* affect the speed. The Max7219 can update a single column fairly fast. It is much
* 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)
#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
//
#define max7219_reg_noop 0x00
#define max7219_reg_digit0 0x01
#define max7219_reg_digit1 0x02
#define max7219_reg_digit2 0x03
#define max7219_reg_digit3 0x04
#define max7219_reg_digit4 0x05
#define max7219_reg_digit5 0x06
#define max7219_reg_digit6 0x07
#define max7219_reg_digit7 0x08
#define max7219_reg_decodeMode 0x09
#define max7219_reg_intensity 0x0A
#define max7219_reg_scanLimit 0x0B
#define max7219_reg_shutdown 0x0C
#define max7219_reg_displayTest 0x0F
class Max7219 {
public:
static uint8_t led_line[MAX7219_LINES];
Max7219() { }
static void init();
static void register_setup();
static void putbyte(uint8_t data);
static void pulse_load();
// Set a single register (e.g., a whole native row)
static void send(const uint8_t reg, const uint8_t data);
// Refresh all units
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);
// Update a single native line on just one unit
static void refresh_unit_line(const uint8_t line);
// Set a single LED by XY coordinate
static void led_set(const uint8_t x, const uint8_t y, const bool on);
static void led_on(const uint8_t x, const uint8_t y);
static void led_off(const uint8_t x, const uint8_t y);
static void led_toggle(const uint8_t x, const uint8_t y);
// Set all LEDs in a single column
static void set_column(const uint8_t col, const uint32_t val);
static void clear_column(const uint8_t col);
// Set all LEDs in a single row
static void set_row(const uint8_t row, const uint32_t val);
static void clear_row(const uint8_t row);
// 16 and 32 bit versions of Row and Column functions
// Multiple rows and columns will be used to display the value if
// the array of matrix LED's is too narrow to accomplish the goal
static void set_rows_16bits(const uint8_t y, uint32_t val);
static void set_rows_32bits(const uint8_t y, uint32_t val);
static void set_columns_16bits(const uint8_t x, uint32_t val);
static void set_columns_32bits(const uint8_t x, uint32_t val);
// Quickly clear the whole matrix
static void clear();
// Quickly fill the whole matrix
static void fill();
// Apply custom code to update the matrix
static void idle_tasks();
private:
static void error(const char * const func, const int32_t v1, const int32_t v2=-1);
static void noop();
static void set(const uint8_t line, const uint8_t bits);
static void send_row(const uint8_t row);
static void send_column(const uint8_t col);
static void mark16(const uint8_t y, const uint8_t v1, const uint8_t v2);
static void range16(const uint8_t y, const uint8_t ot, const uint8_t nt, const uint8_t oh, const uint8_t nh);
static void quantity16(const uint8_t y, const uint8_t ov, const uint8_t nv);
#ifdef MAX7219_INIT_TEST
#if MAX7219_INIT_TEST == 2
static void spiral(const bool on, const uint16_t del);
#else
static void sweep(const int8_t dir, const uint16_t ms, const bool on);
#endif
#endif
};
extern Max7219 max7219;

File diff suppressed because it is too large Load Diff

View File

@@ -26,15 +26,19 @@
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #include "MarlinConfig.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "Sd2Card.h" #include "Sd2Card.h"
//------------------------------------------------------------------------------ #if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
#endif
#if DISABLED(SOFTWARE_SPI) #if DISABLED(SOFTWARE_SPI)
// functions for hardware SPI // functions for hardware SPI
//------------------------------------------------------------------------------
// make sure SPCR rate is in expected bits // make sure SPCR rate is in expected bits
#if (SPR0 != 0 || SPR1 != 1) #if (SPR0 != 0 || SPR1 != 1)
#error "unexpected SPCR bits" #error "unexpected SPCR bits"
@@ -48,34 +52,34 @@
SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1); SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X); SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
} }
//------------------------------------------------------------------------------
/** SPI receive a byte */ /** SPI receive a byte */
static uint8_t spiRec() { static uint8_t spiRec() {
SPDR = 0XFF; SPDR = 0xFF;
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
return SPDR; return SPDR;
} }
//------------------------------------------------------------------------------
/** SPI read data - only one call so force inline */ /** SPI read data - only one call so force inline */
static inline __attribute__((always_inline)) static inline __attribute__((always_inline))
void spiRead(uint8_t* buf, uint16_t nbyte) { void spiRead(uint8_t* buf, uint16_t nbyte) {
if (nbyte-- == 0) return; if (nbyte-- == 0) return;
SPDR = 0XFF; SPDR = 0xFF;
for (uint16_t i = 0; i < nbyte; i++) { for (uint16_t i = 0; i < nbyte; i++) {
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
buf[i] = SPDR; buf[i] = SPDR;
SPDR = 0XFF; SPDR = 0xFF;
} }
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
buf[nbyte] = SPDR; buf[nbyte] = SPDR;
} }
//------------------------------------------------------------------------------
/** SPI send a byte */ /** SPI send a byte */
static void spiSend(uint8_t b) { static void spiSend(uint8_t b) {
SPDR = b; SPDR = b;
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
} }
//------------------------------------------------------------------------------
/** SPI send block - only one call so force inline */ /** SPI send block - only one call so force inline */
static inline __attribute__((always_inline)) static inline __attribute__((always_inline))
void spiSendBlock(uint8_t token, const uint8_t* buf) { void spiSendBlock(uint8_t token, const uint8_t* buf) {
@@ -91,15 +95,16 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#else // SOFTWARE_SPI #else // SOFTWARE_SPI
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** nop to tune soft SPI timing */ /** nop to tune soft SPI timing */
#define nop asm volatile ("nop\n\t") #define nop asm volatile ("nop\n\t")
//------------------------------------------------------------------------------
/** Soft SPI receive byte */ /** Soft SPI receive byte */
static uint8_t spiRec() { static uint8_t spiRec() {
uint8_t data = 0; uint8_t data = 0;
// no interrupts during byte receive - about 8 us // no interrupts during byte receive - about 8 us
cli(); cli();
// output pin high - like sending 0XFF // output pin high - like sending 0xFF
WRITE(SPI_MOSI_PIN, HIGH); WRITE(SPI_MOSI_PIN, HIGH);
for (uint8_t i = 0; i < 8; i++) { for (uint8_t i = 0; i < 8; i++) {
@@ -119,13 +124,13 @@
sei(); sei();
return data; return data;
} }
//------------------------------------------------------------------------------
/** Soft SPI read data */ /** Soft SPI read data */
static void spiRead(uint8_t* buf, uint16_t nbyte) { static void spiRead(uint8_t* buf, uint16_t nbyte) {
for (uint16_t i = 0; i < nbyte; i++) for (uint16_t i = 0; i < nbyte; i++)
buf[i] = spiRec(); buf[i] = spiRec();
} }
//------------------------------------------------------------------------------
/** Soft SPI send byte */ /** Soft SPI send byte */
static void spiSend(uint8_t data) { static void spiSend(uint8_t data) {
// no interrupts during byte send - about 8 us // no interrupts during byte send - about 8 us
@@ -133,7 +138,7 @@
for (uint8_t i = 0; i < 8; i++) { for (uint8_t i = 0; i < 8; i++) {
WRITE(SPI_SCK_PIN, LOW); WRITE(SPI_SCK_PIN, LOW);
WRITE(SPI_MOSI_PIN, data & 0X80); WRITE(SPI_MOSI_PIN, data & 0x80);
data <<= 1; data <<= 1;
@@ -149,7 +154,7 @@
// enable interrupts // enable interrupts
sei(); sei();
} }
//------------------------------------------------------------------------------
/** Soft SPI send block */ /** Soft SPI send block */
void spiSendBlock(uint8_t token, const uint8_t* buf) { void spiSendBlock(uint8_t token, const uint8_t* buf) {
spiSend(token); spiSend(token);
@@ -157,7 +162,7 @@
spiSend(buf[i]); spiSend(buf[i]);
} }
#endif // SOFTWARE_SPI #endif // SOFTWARE_SPI
//------------------------------------------------------------------------------
// send command and return error code. Return zero for OK // send command and return error code. Return zero for OK
uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) { uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
// select card // select card
@@ -173,19 +178,19 @@ uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
for (int8_t s = 24; s >= 0; s -= 8) spiSend(arg >> s); for (int8_t s = 24; s >= 0; s -= 8) spiSend(arg >> s);
// send CRC // send CRC
uint8_t crc = 0XFF; uint8_t crc = 0xFF;
if (cmd == CMD0) crc = 0X95; // correct crc for CMD0 with arg 0 if (cmd == CMD0) crc = 0x95; // correct crc for CMD0 with arg 0
if (cmd == CMD8) crc = 0X87; // correct crc for CMD8 with arg 0X1AA if (cmd == CMD8) crc = 0x87; // correct crc for CMD8 with arg 0x1AA
spiSend(crc); spiSend(crc);
// skip stuff byte for stop read // skip stuff byte for stop read
if (cmd == CMD12) spiRec(); if (cmd == CMD12) spiRec();
// wait for response // wait for response
for (uint8_t i = 0; ((status_ = spiRec()) & 0X80) && i != 0XFF; i++) { /* Intentionally left empty */ } for (uint8_t i = 0; ((status_ = spiRec()) & 0x80) && i != 0xFF; i++) { /* Intentionally left empty */ }
return status_; return status_;
} }
//------------------------------------------------------------------------------
/** /**
* Determine the size of an SD flash memory card. * Determine the size of an SD flash memory card.
* *
@@ -213,19 +218,20 @@ uint32_t Sd2Card::cardSize() {
return 0; return 0;
} }
} }
//------------------------------------------------------------------------------
void Sd2Card::chipSelectHigh() { void Sd2Card::chipSelectHigh() {
digitalWrite(chipSelectPin_, HIGH); digitalWrite(chipSelectPin_, HIGH);
} }
//------------------------------------------------------------------------------
void Sd2Card::chipSelectLow() { void Sd2Card::chipSelectLow() {
#if DISABLED(SOFTWARE_SPI) #if DISABLED(SOFTWARE_SPI)
spiInit(spiRate_); spiInit(spiRate_);
#endif // SOFTWARE_SPI #endif // SOFTWARE_SPI
digitalWrite(chipSelectPin_, LOW); digitalWrite(chipSelectPin_, LOW);
} }
//------------------------------------------------------------------------------
/** Erase a range of blocks. /**
* Erase a range of blocks.
* *
* \param[in] firstBlock The address of the first block in the range. * \param[in] firstBlock The address of the first block in the range.
* \param[in] lastBlock The address of the last block in the range. * \param[in] lastBlock The address of the last block in the range.
@@ -235,12 +241,11 @@ void Sd2Card::chipSelectLow() {
* either 0 or 1, depends on the card vendor. The card must support * either 0 or 1, depends on the card vendor. The card must support
* single block erase. * single block erase.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) { bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
csd_t csd; csd_t csd;
if (!readCSD(&csd)) goto fail; if (!readCSD(&csd)) goto FAIL;
// check for single block erase // check for single block erase
if (!csd.v1.erase_blk_en) { if (!csd.v1.erase_blk_en) {
// erase size mask // erase size mask
@@ -248,7 +253,7 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
if ((firstBlock & m) != 0 || ((lastBlock + 1) & m) != 0) { if ((firstBlock & m) != 0 || ((lastBlock + 1) & m) != 0) {
// error card can't erase specified area // error card can't erase specified area
error(SD_CARD_ERROR_ERASE_SINGLE_BLOCK); error(SD_CARD_ERROR_ERASE_SINGLE_BLOCK);
goto fail; goto FAIL;
} }
} }
if (type_ != SD_CARD_TYPE_SDHC) { if (type_ != SD_CARD_TYPE_SDHC) {
@@ -259,59 +264,65 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
|| cardCommand(CMD33, lastBlock) || cardCommand(CMD33, lastBlock)
|| cardCommand(CMD38, 0)) { || cardCommand(CMD38, 0)) {
error(SD_CARD_ERROR_ERASE); error(SD_CARD_ERROR_ERASE);
goto fail; goto FAIL;
} }
if (!waitNotBusy(SD_ERASE_TIMEOUT)) { if (!waitNotBusy(SD_ERASE_TIMEOUT)) {
error(SD_CARD_ERROR_ERASE_TIMEOUT); error(SD_CARD_ERROR_ERASE_TIMEOUT);
goto fail; goto FAIL;
} }
chipSelectHigh(); chipSelectHigh();
return true; return true;
fail: FAIL:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------
/** Determine if card supports single block erase. /**
* Determine if card supports single block erase.
* *
* \return The value one, true, is returned if single block erase is supported. * \return true if single block erase is supported.
* The value zero, false, is returned if single block erase is not supported. * false if single block erase is not supported.
*/ */
bool Sd2Card::eraseSingleBlockEnable() { bool Sd2Card::eraseSingleBlockEnable() {
csd_t csd; csd_t csd;
return readCSD(&csd) ? csd.v1.erase_blk_en : false; return readCSD(&csd) ? csd.v1.erase_blk_en : false;
} }
//------------------------------------------------------------------------------
/** /**
* Initialize an SD flash memory card. * Initialize an SD flash memory card.
* *
* \param[in] sckRateID SPI clock rate selector. See setSckRate(). * \param[in] sckRateID SPI clock rate selector. See setSckRate().
* \param[in] chipSelectPin SD chip select pin number. * \param[in] chipSelectPin SD chip select pin number.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure. The reason for failure * The reason for failure can be determined by calling errorCode() and errorData().
* can be determined by calling errorCode() and errorData().
*/ */
bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) { bool Sd2Card::init(uint8_t sckRateID, pin_t chipSelectPin) {
errorCode_ = type_ = 0; errorCode_ = type_ = 0;
chipSelectPin_ = chipSelectPin; chipSelectPin_ = chipSelectPin;
// 16-bit init start time allows over a minute // 16-bit init start time allows over a minute
uint16_t t0 = (uint16_t)millis(); uint16_t t0 = (uint16_t)millis();
uint32_t arg; uint32_t arg;
// 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 // set pin modes
pinMode(chipSelectPin_, OUTPUT); pinMode(chipSelectPin_, OUTPUT);
chipSelectHigh(); chipSelectHigh();
pinMode(SPI_MISO_PIN, INPUT); SET_INPUT(SPI_MISO_PIN);
pinMode(SPI_MOSI_PIN, OUTPUT); SET_OUTPUT(SPI_MOSI_PIN);
pinMode(SPI_SCK_PIN, OUTPUT); SET_OUTPUT(SPI_SCK_PIN);
#if DISABLED(SOFTWARE_SPI) #if DISABLED(SOFTWARE_SPI)
// SS must be in output mode even it is not chip select // SS must be in output mode even it is not chip select
pinMode(SS_PIN, OUTPUT); SET_OUTPUT(SS_PIN);
// set SS high - may be chip select for another SPI device // set SS high - may be chip select for another SPI device
#if SET_SPI_SS_HIGH #if SET_SPI_SS_HIGH
digitalWrite(SS_PIN, HIGH); WRITE(SS_PIN, HIGH);
#endif // SET_SPI_SS_HIGH #endif // SET_SPI_SS_HIGH
// set SCK rate for initialization commands // set SCK rate for initialization commands
spiRate_ = SPI_SD_INIT_RATE; spiRate_ = SPI_SD_INIT_RATE;
@@ -319,13 +330,13 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
#endif // SOFTWARE_SPI #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); for (uint8_t i = 0; i < 10; i++) spiSend(0xFF);
// command to go idle in SPI mode // command to go idle in SPI mode
while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) { while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) {
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
error(SD_CARD_ERROR_CMD0); error(SD_CARD_ERROR_CMD0);
goto fail; goto FAIL;
} }
} }
// check SD version // check SD version
@@ -335,29 +346,29 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
else { else {
// only need last byte of r7 response // only need last byte of r7 response
for (uint8_t i = 0; i < 4; i++) status_ = spiRec(); for (uint8_t i = 0; i < 4; i++) status_ = spiRec();
if (status_ != 0XAA) { if (status_ != 0xAA) {
error(SD_CARD_ERROR_CMD8); error(SD_CARD_ERROR_CMD8);
goto fail; goto FAIL;
} }
type(SD_CARD_TYPE_SD2); type(SD_CARD_TYPE_SD2);
} }
// 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; arg = type() == SD_CARD_TYPE_SD2 ? 0x40000000 : 0;
while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) { while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) {
// check for timeout // check for timeout
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
error(SD_CARD_ERROR_ACMD41); error(SD_CARD_ERROR_ACMD41);
goto fail; 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 (type() == SD_CARD_TYPE_SD2) {
if (cardCommand(CMD58, 0)) { if (cardCommand(CMD58, 0)) {
error(SD_CARD_ERROR_CMD58); error(SD_CARD_ERROR_CMD58);
goto fail; goto FAIL;
} }
if ((spiRec() & 0XC0) == 0XC0) type(SD_CARD_TYPE_SDHC); 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(); for (uint8_t i = 0; i < 3; i++) spiRec();
} }
@@ -370,18 +381,17 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
return true; return true;
#endif // SOFTWARE_SPI #endif // SOFTWARE_SPI
fail: FAIL:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------
/** /**
* Read a 512 byte block from an SD card. * Read a 512 byte block from an SD card.
* *
* \param[in] blockNumber Logical block to be read. * \param[in] blockNumber Logical block to be read.
* \param[out] dst Pointer to the location that will receive the data. * \param[out] dst Pointer to the location that will receive the data.
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) { bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
// use address if not SDHC card // use address if not SDHC card
@@ -389,36 +399,36 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
#if ENABLED(SD_CHECK_AND_RETRY) #if ENABLED(SD_CHECK_AND_RETRY)
uint8_t retryCnt = 3; uint8_t retryCnt = 3;
do { for (;;) {
if (!cardCommand(CMD17, blockNumber)) {
if (readData(dst, 512)) return true;
}
else
error(SD_CARD_ERROR_CMD17);
if (--retryCnt) break;
chipSelectHigh();
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
errorCode_ = 0;
} while (true);
#else
if (cardCommand(CMD17, blockNumber)) if (cardCommand(CMD17, blockNumber))
error(SD_CARD_ERROR_CMD17); error(SD_CARD_ERROR_CMD17);
else else if (readData(dst, 512))
return readData(dst, 512); return true;
#endif
chipSelectHigh();
if (!--retryCnt) break;
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
errorCode_ = 0;
}
return false;
#else
if (cardCommand(CMD17, blockNumber)) {
error(SD_CARD_ERROR_CMD17);
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------ else
/** Read one data block in a multiple block read sequence return readData(dst, 512);
#endif
}
/**
* Read one data block in a multiple block read sequence
* *
* \param[in] dst Pointer to the location for the data to be read. * \param[in] dst Pointer to the location for the data to be read.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::readData(uint8_t* dst) { bool Sd2Card::readData(uint8_t* dst) {
chipSelectLow(); chipSelectLow();
@@ -463,25 +473,24 @@ static const uint16_t crctab[] PROGMEM = {
static uint16_t CRC_CCITT(const uint8_t* data, size_t n) { static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
uint16_t crc = 0; uint16_t crc = 0;
for (size_t i = 0; i < n; i++) { for (size_t i = 0; i < n; i++) {
crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0XFF]) ^ (crc << 8); crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
} }
return crc; return crc;
} }
#endif #endif // SD_CHECK_AND_RETRY
//------------------------------------------------------------------------------
bool Sd2Card::readData(uint8_t* dst, uint16_t count) { bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
// wait for start block token // wait for start block token
uint16_t t0 = millis(); uint16_t t0 = millis();
while ((status_ = spiRec()) == 0XFF) { while ((status_ = spiRec()) == 0XFF) {
if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) { if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) {
error(SD_CARD_ERROR_READ_TIMEOUT); error(SD_CARD_ERROR_READ_TIMEOUT);
goto fail; goto FAIL;
} }
} }
if (status_ != DATA_START_BLOCK) { if (status_ != DATA_START_BLOCK) {
error(SD_CARD_ERROR_READ); error(SD_CARD_ERROR_READ);
goto fail; goto FAIL;
} }
// transfer data // transfer data
spiRead(dst, count); spiRead(dst, count);
@@ -493,7 +502,7 @@ bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
recvCrc |= spiRec(); recvCrc |= spiRec();
if (calcCrc != recvCrc) { if (calcCrc != recvCrc) {
error(SD_CARD_ERROR_CRC); error(SD_CARD_ERROR_CRC);
goto fail; goto FAIL;
} }
} }
#else #else
@@ -505,67 +514,61 @@ bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
// Send an additional dummy byte, required by Toshiba Flash Air SD Card // Send an additional dummy byte, required by Toshiba Flash Air SD Card
spiSend(0XFF); spiSend(0XFF);
return true; return true;
fail: FAIL:
chipSelectHigh(); chipSelectHigh();
// Send an additional dummy byte, required by Toshiba Flash Air SD Card // Send an additional dummy byte, required by Toshiba Flash Air SD Card
spiSend(0XFF); spiSend(0XFF);
return false; return false;
} }
//------------------------------------------------------------------------------
/** read CID or CSR register */ /** read CID or CSR register */
bool Sd2Card::readRegister(uint8_t cmd, void* buf) { bool Sd2Card::readRegister(uint8_t cmd, void* buf) {
uint8_t* dst = reinterpret_cast<uint8_t*>(buf); uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
if (cardCommand(cmd, 0)) { if (cardCommand(cmd, 0)) {
error(SD_CARD_ERROR_READ_REG); error(SD_CARD_ERROR_READ_REG);
goto fail;
}
return readData(dst, 16);
fail:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------ return readData(dst, 16);
/** Start a read multiple blocks sequence. }
/**
* Start a read multiple blocks sequence.
* *
* \param[in] blockNumber Address of first block in sequence. * \param[in] blockNumber Address of first block in sequence.
* *
* \note This function is used with readData() and readStop() for optimized * \note This function is used with readData() and readStop() for optimized
* multiple block reads. SPI chipSelect must be low for the entire sequence. * multiple block reads. SPI chipSelect must be low for the entire sequence.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::readStart(uint32_t blockNumber) { bool Sd2Card::readStart(uint32_t blockNumber) {
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
if (cardCommand(CMD18, blockNumber)) { if (cardCommand(CMD18, blockNumber)) {
error(SD_CARD_ERROR_CMD18); error(SD_CARD_ERROR_CMD18);
goto fail;
}
chipSelectHigh();
return true;
fail:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------ chipSelectHigh();
/** End a read multiple blocks sequence. return true;
}
/**
* End a read multiple blocks sequence.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::readStop() { bool Sd2Card::readStop() {
chipSelectLow(); chipSelectLow();
if (cardCommand(CMD12, 0)) { if (cardCommand(CMD12, 0)) {
error(SD_CARD_ERROR_CMD12); error(SD_CARD_ERROR_CMD12);
goto fail;
}
chipSelectHigh();
return true;
fail:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------ chipSelectHigh();
return true;
}
/** /**
* Set the SPI clock rate. * Set the SPI clock rate.
* *
@@ -586,89 +589,84 @@ bool Sd2Card::setSckRate(uint8_t sckRateID) {
spiRate_ = sckRateID; spiRate_ = sckRateID;
return true; return true;
} }
//------------------------------------------------------------------------------
// wait for card to go not busy // wait for card to go not busy
bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) { bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) {
uint16_t t0 = millis(); uint16_t t0 = millis();
while (spiRec() != 0XFF) { while (spiRec() != 0XFF)
if (((uint16_t)millis() - t0) >= timeoutMillis) goto fail; if (((uint16_t)millis() - t0) >= timeoutMillis) return false;
}
return true; return true;
fail:
return false;
} }
//------------------------------------------------------------------------------
/** /**
* Writes 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] blockNumber Logical block to be written.
* \param[in] src Pointer to the location of the data to be written. * \param[in] src Pointer to the location of the data to be written.
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) { bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
// use address if not SDHC card // use address if not SDHC card
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
if (cardCommand(CMD24, blockNumber)) { if (cardCommand(CMD24, blockNumber)) {
error(SD_CARD_ERROR_CMD24); error(SD_CARD_ERROR_CMD24);
goto fail; goto FAIL;
} }
if (!writeData(DATA_START_BLOCK, src)) goto fail; if (!writeData(DATA_START_BLOCK, src)) goto FAIL;
// wait for flash programming to complete // wait for flash programming to complete
if (!waitNotBusy(SD_WRITE_TIMEOUT)) { if (!waitNotBusy(SD_WRITE_TIMEOUT)) {
error(SD_CARD_ERROR_WRITE_TIMEOUT); error(SD_CARD_ERROR_WRITE_TIMEOUT);
goto fail; goto FAIL;
} }
// response is r2 so get and check two bytes for nonzero // response is r2 so get and check two bytes for nonzero
if (cardCommand(CMD13, 0) || spiRec()) { if (cardCommand(CMD13, 0) || spiRec()) {
error(SD_CARD_ERROR_WRITE_PROGRAMMING); error(SD_CARD_ERROR_WRITE_PROGRAMMING);
goto fail; goto FAIL;
} }
chipSelectHigh(); chipSelectHigh();
return true; return true;
fail: FAIL:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------
/** Write one data block in a multiple block write sequence /**
* Write one data block in a multiple block write sequence
* \param[in] src Pointer to the location of the data to be written. * \param[in] src Pointer to the location of the data to be written.
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::writeData(const uint8_t* src) { bool Sd2Card::writeData(const uint8_t* src) {
chipSelectLow(); chipSelectLow();
// wait for previous write to finish // wait for previous write to finish
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; if (!waitNotBusy(SD_WRITE_TIMEOUT) || !writeData(WRITE_MULTIPLE_TOKEN, src)) {
if (!writeData(WRITE_MULTIPLE_TOKEN, src)) goto fail;
chipSelectHigh();
return true;
fail:
error(SD_CARD_ERROR_WRITE_MULTIPLE); error(SD_CARD_ERROR_WRITE_MULTIPLE);
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------ chipSelectHigh();
return true;
}
// send one block of data for write block or write multiple blocks // send one block of data for write block or write multiple blocks
bool Sd2Card::writeData(uint8_t token, const uint8_t* src) { bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
spiSendBlock(token, src); spiSendBlock(token, src);
spiSend(0xff); // dummy crc spiSend(0xFF); // dummy crc
spiSend(0xff); // dummy crc spiSend(0xFF); // dummy crc
status_ = spiRec(); status_ = spiRec();
if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) { if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) {
error(SD_CARD_ERROR_WRITE); error(SD_CARD_ERROR_WRITE);
goto fail;
}
return true;
fail:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------ return true;
/** Start a write multiple blocks sequence. }
/**
* Start a write multiple blocks sequence.
* *
* \param[in] blockNumber Address of first block in sequence. * \param[in] blockNumber Address of first block in sequence.
* \param[in] eraseCount The number of blocks to be pre-erased. * \param[in] eraseCount The number of blocks to be pre-erased.
@@ -676,44 +674,43 @@ fail:
* \note This function is used with writeData() and writeStop() * \note This function is used with writeData() and writeStop()
* for optimized multiple block writes. * for optimized multiple block writes.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) { bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) {
// send pre-erase count // send pre-erase count
if (cardAcmd(ACMD23, eraseCount)) { if (cardAcmd(ACMD23, eraseCount)) {
error(SD_CARD_ERROR_ACMD23); error(SD_CARD_ERROR_ACMD23);
goto fail; goto FAIL;
} }
// use address if not SDHC card // use address if not SDHC card
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
if (cardCommand(CMD25, blockNumber)) { if (cardCommand(CMD25, blockNumber)) {
error(SD_CARD_ERROR_CMD25); error(SD_CARD_ERROR_CMD25);
goto fail; goto FAIL;
} }
chipSelectHigh(); chipSelectHigh();
return true; return true;
fail: FAIL:
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
//------------------------------------------------------------------------------
/** End a write multiple blocks sequence. /**
* End a write multiple blocks sequence.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure.
*/ */
bool Sd2Card::writeStop() { bool Sd2Card::writeStop() {
chipSelectLow(); chipSelectLow();
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
spiSend(STOP_TRAN_TOKEN); spiSend(STOP_TRAN_TOKEN);
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
chipSelectHigh(); chipSelectHigh();
return true; return true;
fail: FAIL:
error(SD_CARD_ERROR_STOP_TRAN); error(SD_CARD_ERROR_STOP_TRAN);
chipSelectHigh(); chipSelectHigh();
return false; return false;
} }
#endif #endif // SDSUPPORT

View File

@@ -20,165 +20,119 @@
* *
*/ */
/**
* \file
* \brief Sd2Card class for V2 SD/SDHC cards
*/
/** /**
* Arduino Sd2Card Library * Arduino Sd2Card Library
* Copyright (C) 2009 by William Greiman * Copyright (C) 2009 by William Greiman
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#ifndef _SD2CARD_H_
#define _SD2CARD_H_
#include "Marlin.h"
#if ENABLED(SDSUPPORT)
#ifndef Sd2Card_h
#define Sd2Card_h
/**
* \file
* \brief Sd2Card class for V2 SD/SDHC cards
*/
#include "SdFatConfig.h" #include "SdFatConfig.h"
#include "SdInfo.h" #include "SdInfo.h"
//------------------------------------------------------------------------------
// SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6 // SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6
/** Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate(). */ uint8_t const SPI_FULL_SPEED = 0, // Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate().
uint8_t const SPI_FULL_SPEED = 0; SPI_HALF_SPEED = 1, // Set SCK rate to F_CPU/4. See Sd2Card::setSckRate().
/** Set SCK rate to F_CPU/4. See Sd2Card::setSckRate(). */ SPI_QUARTER_SPEED = 2, // Set SCK rate to F_CPU/8. See Sd2Card::setSckRate().
uint8_t const SPI_HALF_SPEED = 1; SPI_EIGHTH_SPEED = 3, // Set SCK rate to F_CPU/16. See Sd2Card::setSckRate().
/** Set SCK rate to F_CPU/8. See Sd2Card::setSckRate(). */ SPI_SIXTEENTH_SPEED = 4; // Set SCK rate to F_CPU/32. See Sd2Card::setSckRate().
uint8_t const SPI_QUARTER_SPEED = 2;
/** Set SCK rate to F_CPU/16. See Sd2Card::setSckRate(). */ uint16_t const SD_INIT_TIMEOUT = 2000, // init timeout ms
uint8_t const SPI_EIGHTH_SPEED = 3; SD_ERASE_TIMEOUT = 10000, // erase timeout ms
/** Set SCK rate to F_CPU/32. See Sd2Card::setSckRate(). */ SD_READ_TIMEOUT = 300, // read timeout ms
uint8_t const SPI_SIXTEENTH_SPEED = 4; SD_WRITE_TIMEOUT = 600; // write time out ms
//------------------------------------------------------------------------------
/** init timeout ms */
uint16_t const SD_INIT_TIMEOUT = 2000;
/** erase timeout ms */
uint16_t const SD_ERASE_TIMEOUT = 10000;
/** read timeout ms */
uint16_t const SD_READ_TIMEOUT = 300;
/** write time out ms */
uint16_t const SD_WRITE_TIMEOUT = 600;
//------------------------------------------------------------------------------
// SD card errors // SD card errors
/** timeout error for command CMD0 (initialize card in SPI mode) */ uint8_t const SD_CARD_ERROR_CMD0 = 0X1, // timeout error for command CMD0 (initialize card in SPI mode)
uint8_t const SD_CARD_ERROR_CMD0 = 0X1; SD_CARD_ERROR_CMD8 = 0X2, // CMD8 was not accepted - not a valid SD card
/** CMD8 was not accepted - not a valid SD card*/ SD_CARD_ERROR_CMD12 = 0X3, // card returned an error response for CMD12 (write stop)
uint8_t const SD_CARD_ERROR_CMD8 = 0X2; SD_CARD_ERROR_CMD17 = 0X4, // card returned an error response for CMD17 (read block)
/** card returned an error response for CMD12 (write stop) */ SD_CARD_ERROR_CMD18 = 0X5, // card returned an error response for CMD18 (read multiple block)
uint8_t const SD_CARD_ERROR_CMD12 = 0X3; SD_CARD_ERROR_CMD24 = 0X6, // card returned an error response for CMD24 (write block)
/** card returned an error response for CMD17 (read block) */ SD_CARD_ERROR_CMD25 = 0X7, // WRITE_MULTIPLE_BLOCKS command failed
uint8_t const SD_CARD_ERROR_CMD17 = 0X4; SD_CARD_ERROR_CMD58 = 0X8, // card returned an error response for CMD58 (read OCR)
/** card returned an error response for CMD18 (read multiple block) */ SD_CARD_ERROR_ACMD23 = 0X9, // SET_WR_BLK_ERASE_COUNT failed
uint8_t const SD_CARD_ERROR_CMD18 = 0X5; SD_CARD_ERROR_ACMD41 = 0XA, // ACMD41 initialization process timeout
/** card returned an error response for CMD24 (write block) */ SD_CARD_ERROR_BAD_CSD = 0XB, // card returned a bad CSR version field
uint8_t const SD_CARD_ERROR_CMD24 = 0X6; SD_CARD_ERROR_ERASE = 0XC, // erase block group command failed
/** WRITE_MULTIPLE_BLOCKS command failed */ SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD, // card not capable of single block erase
uint8_t const SD_CARD_ERROR_CMD25 = 0X7; SD_CARD_ERROR_ERASE_TIMEOUT = 0XE, // Erase sequence timed out
/** card returned an error response for CMD58 (read OCR) */ SD_CARD_ERROR_READ = 0XF, // card returned an error token instead of read data
uint8_t const SD_CARD_ERROR_CMD58 = 0X8; SD_CARD_ERROR_READ_REG = 0x10, // read CID or CSD failed
/** SET_WR_BLK_ERASE_COUNT failed */ SD_CARD_ERROR_READ_TIMEOUT = 0x11, // timeout while waiting for start of read data
uint8_t const SD_CARD_ERROR_ACMD23 = 0X9; SD_CARD_ERROR_STOP_TRAN = 0x12, // card did not accept STOP_TRAN_TOKEN
/** ACMD41 initialization process timeout */ SD_CARD_ERROR_WRITE = 0x13, // card returned an error token as a response to a write operation
uint8_t const SD_CARD_ERROR_ACMD41 = 0XA; SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14, // REMOVE - not used ... attempt to write protected block zero
/** card returned a bad CSR version field */ SD_CARD_ERROR_WRITE_MULTIPLE = 0x15, // card did not go ready for a multiple block write
uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB; SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16, // card returned an error to a CMD13 status check after a write
/** erase block group command failed */ SD_CARD_ERROR_WRITE_TIMEOUT = 0x17, // timeout occurred during write programming
uint8_t const SD_CARD_ERROR_ERASE = 0XC; SD_CARD_ERROR_SCK_RATE = 0x18, // incorrect rate selected
/** card not capable of single block erase */ SD_CARD_ERROR_INIT_NOT_CALLED = 0x19, // init() not called
uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD; SD_CARD_ERROR_CRC = 0x20; // crc check error
/** Erase sequence timed out */
uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE;
/** card returned an error token instead of read data */
uint8_t const SD_CARD_ERROR_READ = 0XF;
/** read CID or CSD failed */
uint8_t const SD_CARD_ERROR_READ_REG = 0X10;
/** timeout while waiting for start of read data */
uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0X11;
/** card did not accept STOP_TRAN_TOKEN */
uint8_t const SD_CARD_ERROR_STOP_TRAN = 0X12;
/** card returned an error token as a response to a write operation */
uint8_t const SD_CARD_ERROR_WRITE = 0X13;
/** attempt to write protected block zero */
uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0X14; // REMOVE - not used
/** card did not go ready for a multiple block write */
uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0X15;
/** card returned an error to a CMD13 status check after a write */
uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0X16;
/** timeout occurred during write programming */
uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17;
/** incorrect rate selected */
uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18;
/** init() not called */
uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19;
/** crc check error */
uint8_t const SD_CARD_ERROR_CRC = 0X20;
//------------------------------------------------------------------------------
// card types // card types
/** Standard capacity V1 SD card */ uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1 SD card
uint8_t const SD_CARD_TYPE_SD1 = 1; SD_CARD_TYPE_SD2 = 2, // Standard capacity V2 SD card
/** Standard capacity V2 SD card */ SD_CARD_TYPE_SDHC = 3; // High Capacity SD card
uint8_t const SD_CARD_TYPE_SD2 = 2;
/** High Capacity SD card */
uint8_t const SD_CARD_TYPE_SDHC = 3;
/** /**
* define SOFTWARE_SPI to use bit-bang SPI * define SOFTWARE_SPI to use bit-bang SPI
*/ */
//------------------------------------------------------------------------------ #if MEGA_SOFT_SPI
#if MEGA_SOFT_SPI && (defined(__AVR_ATmega1280__)||defined(__AVR_ATmega2560__))
#define SOFTWARE_SPI #define SOFTWARE_SPI
#elif USE_SOFTWARE_SPI #elif USE_SOFTWARE_SPI
#define SOFTWARE_SPI #define SOFTWARE_SPI
#endif // MEGA_SOFT_SPI #endif
//------------------------------------------------------------------------------
// SPI pin definitions - do not edit here - change in SdFatConfig.h // SPI pin definitions - do not edit here - change in SdFatConfig.h
//
#if DISABLED(SOFTWARE_SPI) #if DISABLED(SOFTWARE_SPI)
// hardware pin defs // hardware pin defs
/** The default chip select pin for the SD card is SS. */ #define SD_CHIP_SELECT_PIN SS_PIN // The default chip select pin for the SD card is SS.
#define SD_CHIP_SELECT_PIN SS_PIN
// The following three pins must not be redefined for hardware SPI. // The following three pins must not be redefined for hardware SPI.
/** SPI Master Out Slave In pin */ #define SPI_MOSI_PIN MOSI_PIN // SPI Master Out Slave In pin
#define SPI_MOSI_PIN MOSI_PIN #define SPI_MISO_PIN MISO_PIN // SPI Master In Slave Out pin
/** SPI Master In Slave Out pin */ #define SPI_SCK_PIN SCK_PIN // SPI Clock pin
#define SPI_MISO_PIN MISO_PIN
/** SPI Clock pin */
#define SPI_SCK_PIN SCK_PIN
#else // SOFTWARE_SPI #else // SOFTWARE_SPI
#define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN // SPI chip select pin
/** SPI chip select pin */ #define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN // SPI Master Out Slave In pin
#define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN #define SPI_MISO_PIN SOFT_SPI_MISO_PIN // SPI Master In Slave Out pin
/** SPI Master Out Slave In pin */ #define SPI_SCK_PIN SOFT_SPI_SCK_PIN // SPI Clock pin
#define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN
/** SPI Master In Slave Out pin */
#define SPI_MISO_PIN SOFT_SPI_MISO_PIN
/** SPI Clock pin */
#define SPI_SCK_PIN SOFT_SPI_SCK_PIN
#endif // SOFTWARE_SPI #endif // SOFTWARE_SPI
//------------------------------------------------------------------------------
/** /**
* \class Sd2Card * \class Sd2Card
* \brief Raw access to SD and SDHC flash memory cards. * \brief Raw access to SD and SDHC flash memory cards.
*/ */
class Sd2Card { class Sd2Card {
public: public:
/** Construct an instance of Sd2Card. */
Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {} Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {}
uint32_t cardSize(); uint32_t cardSize();
bool erase(uint32_t firstBlock, uint32_t lastBlock); bool erase(uint32_t firstBlock, uint32_t lastBlock);
bool eraseSingleBlockEnable(); bool eraseSingleBlockEnable();
/** /**
* Set SD error code. * Set SD error code.
* \param[in] code value for error code. * \param[in] code value for error code.
*/ */
void error(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. * \return error code for last error. See Sd2Card.h for a list of error codes.
*/ */
int errorCode() const {return errorCode_;} int errorCode() const {return errorCode_;}
/** \return error data for last error. */ /** \return error data for last error. */
int errorData() const {return status_;} int errorData() const {return status_;}
/** /**
* Initialize an SD flash memory card with default clock rate and chip * Initialize an SD flash memory card with default clock rate and chip
* select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin). * select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).
@@ -186,8 +140,9 @@ class Sd2Card {
* \return true for success or false for failure. * \return true for success or false for failure.
*/ */
bool init(uint8_t sckRateID = SPI_FULL_SPEED, bool init(uint8_t sckRateID = SPI_FULL_SPEED,
uint8_t chipSelectPin = SD_CHIP_SELECT_PIN); pin_t chipSelectPin = SD_CHIP_SELECT_PIN);
bool readBlock(uint32_t block, uint8_t* dst); bool readBlock(uint32_t block, uint8_t* dst);
/** /**
* Read a card's CID register. The CID contains card identification * Read a card's CID register. The CID contains card identification
* information such as Manufacturer ID, Product name, Product serial * information such as Manufacturer ID, Product name, Product serial
@@ -197,9 +152,8 @@ class Sd2Card {
* *
* \return true for success or false for failure. * \return true for success or false for failure.
*/ */
bool readCID(cid_t* cid) { bool readCID(cid_t* cid) { return readRegister(CMD10, cid); }
return readRegister(CMD10, cid);
}
/** /**
* Read a card's CSD register. The CSD contains Card-Specific Data that * Read a card's CSD register. The CSD contains Card-Specific Data that
* provides information regarding access to the card's contents. * provides information regarding access to the card's contents.
@@ -208,14 +162,14 @@ class Sd2Card {
* *
* \return true for success or false for failure. * \return true for success or false for failure.
*/ */
bool readCSD(csd_t* csd) { bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); }
return readRegister(CMD9, csd);
}
bool readData(uint8_t* dst); bool readData(uint8_t* dst);
bool readStart(uint32_t blockNumber); bool readStart(uint32_t blockNumber);
bool readStop(); bool readStop();
bool setSckRate(uint8_t sckRateID); bool setSckRate(uint8_t sckRateID);
/** Return the card type: SD V1, SD V2 or SDHC /**
* Return the card type: SD V1, SD V2 or SDHC
* \return 0 - SD V1, 1 - SD V2, or 3 - SDHC. * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
*/ */
int type() const {return type_;} int type() const {return type_;}
@@ -223,13 +177,14 @@ class Sd2Card {
bool writeData(const uint8_t* src); bool writeData(const uint8_t* src);
bool writeStart(uint32_t blockNumber, uint32_t eraseCount); bool writeStart(uint32_t blockNumber, uint32_t eraseCount);
bool writeStop(); bool writeStop();
private: private:
//---------------------------------------------------------------------------- uint8_t chipSelectPin_,
uint8_t chipSelectPin_; errorCode_,
uint8_t errorCode_; spiRate_,
uint8_t spiRate_; status_,
uint8_t status_; type_;
uint8_t type_;
// private functions // private functions
uint8_t cardAcmd(uint8_t cmd, uint32_t arg) { uint8_t cardAcmd(uint8_t cmd, uint32_t arg) {
cardCommand(CMD55, 0); cardCommand(CMD55, 0);
@@ -245,7 +200,5 @@ class Sd2Card {
bool waitNotBusy(uint16_t timeoutMillis); bool waitNotBusy(uint16_t timeoutMillis);
bool writeData(uint8_t token, const uint8_t* src); bool writeData(uint8_t token, const uint8_t* src);
}; };
#endif // Sd2Card_h
#endif // _SD2CARD_H_
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -20,208 +20,198 @@
* *
*/ */
/**
* \file
* \brief SdBaseFile class
*/
/** /**
* Arduino SdFat Library * Arduino SdFat Library
* Copyright (C) 2009 by William Greiman * Copyright (C) 2009 by William Greiman
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #ifndef _SDBASEFILE_H_
#if ENABLED(SDSUPPORT) #define _SDBASEFILE_H_
#ifndef SdBaseFile_h
#define SdBaseFile_h
/**
* \file
* \brief SdBaseFile class
*/
#include "Marlin.h"
#include "SdFatConfig.h" #include "SdFatConfig.h"
#include "SdVolume.h" #include "SdVolume.h"
//------------------------------------------------------------------------------
#include <stdint.h>
/** /**
* \struct filepos_t * \struct filepos_t
* \brief internal type for istream * \brief internal type for istream
* do not use in user apps * do not use in user apps
*/ */
struct filepos_t { struct filepos_t {
/** stream position */ uint32_t position; // stream byte position
uint32_t position; uint32_t cluster; // cluster of position
/** cluster for position */
uint32_t cluster;
filepos_t() : position(0), cluster(0) {} filepos_t() : position(0), cluster(0) {}
}; };
// use the gnu style oflag in open() // use the gnu style oflag in open()
/** open() oflag for reading */ uint8_t const O_READ = 0x01, // open() oflag for reading
uint8_t const O_READ = 0X01; O_RDONLY = O_READ, // open() oflag - same as O_IN
/** open() oflag - same as O_IN */ O_WRITE = 0x02, // open() oflag for write
uint8_t const O_RDONLY = O_READ; O_WRONLY = O_WRITE, // open() oflag - same as O_WRITE
/** open() oflag for write */ O_RDWR = (O_READ | O_WRITE), // open() oflag for reading and writing
uint8_t const O_WRITE = 0X02; O_ACCMODE = (O_READ | O_WRITE), // open() oflag mask for access modes
/** open() oflag - same as O_WRITE */ O_APPEND = 0x04, // The file offset shall be set to the end of the file prior to each write.
uint8_t const O_WRONLY = O_WRITE; O_SYNC = 0x08, // Synchronous writes - call sync() after each write
/** open() oflag for reading and writing */ O_TRUNC = 0x10, // Truncate the file to zero length
uint8_t const O_RDWR = (O_READ | O_WRITE); O_AT_END = 0x20, // Set the initial position at the end of the file
/** open() oflag mask for access modes */ O_CREAT = 0x40, // Create the file if nonexistent
uint8_t const O_ACCMODE = (O_READ | O_WRITE); O_EXCL = 0x80; // If O_CREAT and O_EXCL are set, open() shall fail if the file exists
/** The file offset shall be set to the end of the file prior to each write. */
uint8_t const O_APPEND = 0X04;
/** synchronous writes - call sync() after each write */
uint8_t const O_SYNC = 0X08;
/** truncate the file to zero length */
uint8_t const O_TRUNC = 0X10;
/** set the initial position at the end of the file */
uint8_t const O_AT_END = 0X20;
/** create the file if nonexistent */
uint8_t const O_CREAT = 0X40;
/** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */
uint8_t const O_EXCL = 0X80;
// SdBaseFile class static and const definitions // SdBaseFile class static and const definitions
// flags for ls() // flags for ls()
/** ls() flag to print modify date */ uint8_t const LS_DATE = 1, // ls() flag to print modify date
uint8_t const LS_DATE = 1; LS_SIZE = 2, // ls() flag to print file size
/** ls() flag to print file size */ LS_R = 4; // ls() flag for recursive list of subdirectories
uint8_t const LS_SIZE = 2;
/** ls() flag for recursive list of subdirectories */
uint8_t const LS_R = 4;
// flags for timestamp // flags for timestamp
/** set the file's last access date */ uint8_t const T_ACCESS = 1, // Set the file's last access date
uint8_t const T_ACCESS = 1; T_CREATE = 2, // Set the file's creation date and time
/** set the file's creation date and time */ T_WRITE = 4; // Set the file's write date and time
uint8_t const T_CREATE = 2;
/** Set the file's write date and time */
uint8_t const T_WRITE = 4;
// values for type_
/** This file has not been opened. */
uint8_t const FAT_FILE_TYPE_CLOSED = 0;
/** A normal file */
uint8_t const FAT_FILE_TYPE_NORMAL = 1;
/** A FAT12 or FAT16 root directory */
uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2;
/** A FAT32 root directory */
uint8_t const FAT_FILE_TYPE_ROOT32 = 3;
/** A subdirectory file*/
uint8_t const FAT_FILE_TYPE_SUBDIR = 4;
/** Test value for directory type */
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED;
/** date field for FAT directory entry // values for type_
uint8_t const FAT_FILE_TYPE_CLOSED = 0, // This file has not been opened.
FAT_FILE_TYPE_NORMAL = 1, // A normal file
FAT_FILE_TYPE_ROOT_FIXED = 2, // A FAT12 or FAT16 root directory
FAT_FILE_TYPE_ROOT32 = 3, // A FAT32 root directory
FAT_FILE_TYPE_SUBDIR = 4, // A subdirectory file
FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED; // Test value for directory type
/**
* date field for FAT directory entry
* \param[in] year [1980,2107] * \param[in] year [1980,2107]
* \param[in] month [1,12] * \param[in] month [1,12]
* \param[in] day [1,31] * \param[in] day [1,31]
* *
* \return Packed date for dir_t entry. * \return Packed date for dir_t entry.
*/ */
static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { return (year - 1980) << 9 | month << 5 | day; }
return (year - 1980) << 9 | month << 5 | day;
} /**
/** year part of FAT directory date field * year part of FAT directory date field
* \param[in] fatDate Date in packed dir format. * \param[in] fatDate Date in packed dir format.
* *
* \return Extracted year [1980,2107] * \return Extracted year [1980,2107]
*/ */
static inline uint16_t FAT_YEAR(uint16_t fatDate) { static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9); }
return 1980 + (fatDate >> 9);
} /**
/** month part of FAT directory date field * month part of FAT directory date field
* \param[in] fatDate Date in packed dir format. * \param[in] fatDate Date in packed dir format.
* *
* \return Extracted month [1,12] * \return Extracted month [1,12]
*/ */
static inline uint8_t FAT_MONTH(uint16_t fatDate) { static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0XF; }
return (fatDate >> 5) & 0XF;
} /**
/** day part of FAT directory date field * day part of FAT directory date field
* \param[in] fatDate Date in packed dir format. * \param[in] fatDate Date in packed dir format.
* *
* \return Extracted day [1,31] * \return Extracted day [1,31]
*/ */
static inline uint8_t FAT_DAY(uint16_t fatDate) { static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; }
return fatDate & 0X1F;
} /**
/** time field for FAT directory entry * time field for FAT directory entry
* \param[in] hour [0,23] * \param[in] hour [0,23]
* \param[in] minute [0,59] * \param[in] minute [0,59]
* \param[in] second [0,59] * \param[in] second [0,59]
* *
* \return Packed time for dir_t entry. * \return Packed time for dir_t entry.
*/ */
static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { return hour << 11 | minute << 5 | second >> 1; }
return hour << 11 | minute << 5 | second >> 1;
} /**
/** hour part of FAT directory time field * hour part of FAT directory time field
* \param[in] fatTime Time in packed dir format. * \param[in] fatTime Time in packed dir format.
* *
* \return Extracted hour [0,23] * \return Extracted hour [0,23]
*/ */
static inline uint8_t FAT_HOUR(uint16_t fatTime) { static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; }
return fatTime >> 11;
} /**
/** minute part of FAT directory time field * minute part of FAT directory time field
* \param[in] fatTime Time in packed dir format. * \param[in] fatTime Time in packed dir format.
* *
* \return Extracted minute [0,59] * \return Extracted minute [0,59]
*/ */
static inline uint8_t FAT_MINUTE(uint16_t fatTime) { static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3F; }
return (fatTime >> 5) & 0X3F;
} /**
/** second part of FAT directory time field * second part of FAT directory time field
* Note second/2 is stored in packed time. * Note second/2 is stored in packed time.
* *
* \param[in] fatTime Time in packed dir format. * \param[in] fatTime Time in packed dir format.
* *
* \return Extracted second [0,58] * \return Extracted second [0,58]
*/ */
static inline uint8_t FAT_SECOND(uint16_t fatTime) { static inline uint8_t FAT_SECOND(uint16_t fatTime) { return 2 * (fatTime & 0x1F); }
return 2 * (fatTime & 0X1F);
} // Default date for file timestamps is 1 Jan 2000
/** Default date for file timestamps is 1 Jan 2000 */
uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1; uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
/** Default time for file timestamp is 1 am */ // Default time for file timestamp is 1 am
uint16_t const FAT_DEFAULT_TIME = (1 << 11); uint16_t const FAT_DEFAULT_TIME = (1 << 11);
//------------------------------------------------------------------------------
/** /**
* \class SdBaseFile * \class SdBaseFile
* \brief Base class for SdFile with Print and C++ streams. * \brief Base class for SdFile with Print and C++ streams.
*/ */
class SdBaseFile { class SdBaseFile {
public: public:
/** Create an instance. */
SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {} SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {}
SdBaseFile(const char* path, uint8_t oflag); SdBaseFile(const char* path, uint8_t oflag);
~SdBaseFile() { if (isOpen()) close(); } ~SdBaseFile() { if (isOpen()) close(); }
/** /**
* writeError is set to true if an error occurs during a write(). * writeError is set to true if an error occurs during a write().
* Set writeError to false before calling print() and/or write() and check * Set writeError to false before calling print() and/or write() and check
* for true after calls to print() and/or write(). * for true after calls to print() and/or write().
*/ */
bool writeError; bool writeError;
//----------------------------------------------------------------------------
// helpers for stream classes // helpers for stream classes
/** get position for streams
/**
* get position for streams
* \param[out] pos struct to receive position * \param[out] pos struct to receive position
*/ */
void getpos(filepos_t* pos); void getpos(filepos_t* pos);
/** set position for streams
/**
* set position for streams
* \param[out] pos struct with value for new position * \param[out] pos struct with value for new position
*/ */
void setpos(filepos_t* pos); void setpos(filepos_t* pos);
//----------------------------------------------------------------------------
bool close(); bool close();
bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
bool createContiguous(SdBaseFile* dirFile, bool createContiguous(SdBaseFile* dirFile,
const char* path, uint32_t size); const char* path, uint32_t size);
/** \return The current cluster number for a file or directory. */ /**
* \return The current cluster number for a file or directory.
*/
uint32_t curCluster() const { return curCluster_; } uint32_t curCluster() const { return curCluster_; }
/** \return The current position for a file or directory. */
/**
* \return The current position for a file or directory.
*/
uint32_t curPosition() const { return curPosition_; } uint32_t curPosition() const { return curPosition_; }
/** \return Current working directory */
/**
* \return Current working directory
*/
static SdBaseFile* cwd() { return cwd_; } static SdBaseFile* cwd() { return cwd_; }
/** Set the date/time callback function
/**
* Set the date/time callback function
* *
* \param[in] dateTime The user's call back function. The callback * \param[in] dateTime The user's call back function. The callback
* function is of the form: * function is of the form:
@@ -252,35 +242,55 @@ class SdBaseFile {
void (*dateTime)(uint16_t* date, uint16_t* time)) { void (*dateTime)(uint16_t* date, uint16_t* time)) {
dateTime_ = dateTime; dateTime_ = dateTime;
} }
/** Cancel the date/time callback function. */
/**
* Cancel the date/time callback function.
*/
static void dateTimeCallbackCancel() { dateTime_ = 0; } static void dateTimeCallbackCancel() { dateTime_ = 0; }
bool dirEntry(dir_t* dir); bool dirEntry(dir_t* dir);
static void dirName(const dir_t& dir, char* name); static void dirName(const dir_t& dir, char* name);
bool exists(const char* name); bool exists(const char* name);
int16_t fgets(char* str, int16_t num, char* delim = 0); int16_t fgets(char* str, int16_t num, char* delim = 0);
/** \return The total number of bytes in a file or directory. */
/**
* \return The total number of bytes in a file or directory.
*/
uint32_t fileSize() const { return fileSize_; } uint32_t fileSize() const { return fileSize_; }
/** \return The first cluster number for a file or directory. */
/**
* \return The first cluster number for a file or directory.
*/
uint32_t firstCluster() const { return firstCluster_; } uint32_t firstCluster() const { return firstCluster_; }
bool getFilename(char* name);
/** \return True if this is a directory else false. */ /**
* \return True if this is a directory else false.
*/
bool isDir() const { return type_ >= FAT_FILE_TYPE_MIN_DIR; } bool isDir() const { return type_ >= FAT_FILE_TYPE_MIN_DIR; }
/** \return True if this is a normal file else false. */
/**
* \return True if this is a normal file else false.
*/
bool isFile() const { return type_ == FAT_FILE_TYPE_NORMAL; } bool isFile() const { return type_ == FAT_FILE_TYPE_NORMAL; }
/** \return True if this is an open file/directory else false. */
/**
* \return True if this is an open file/directory else false.
*/
bool isOpen() const { return type_ != FAT_FILE_TYPE_CLOSED; } bool isOpen() const { return type_ != FAT_FILE_TYPE_CLOSED; }
/** \return True if this is a subdirectory else false. */
/**
* \return True if this is a subdirectory else false.
*/
bool isSubDir() const { return type_ == FAT_FILE_TYPE_SUBDIR; } bool isSubDir() const { return type_ == FAT_FILE_TYPE_SUBDIR; }
/** \return True if this is the root directory. */
bool isRoot() const { /**
return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; * \return True if this is the root directory.
} */
bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; }
bool getFilename(char * const name);
void ls(uint8_t flags = 0, uint8_t indent = 0); void ls(uint8_t flags = 0, uint8_t indent = 0);
bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true); bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
// alias for backward compactability
bool makeDir(SdBaseFile* dir, const char* path) {
return mkdir(dir, path, false);
}
bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag); bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag); bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
bool open(const char* path, uint8_t oflag = O_READ); bool open(const char* path, uint8_t oflag = O_READ);
@@ -295,53 +305,58 @@ class SdBaseFile {
int8_t readDir(dir_t* dir, char* longFilename); int8_t readDir(dir_t* dir, char* longFilename);
static bool remove(SdBaseFile* dirFile, const char* path); static bool remove(SdBaseFile* dirFile, const char* path);
bool remove(); bool remove();
/** Set the file's current position to zero. */
/**
* Set the file's current position to zero.
*/
void rewind() { seekSet(0); } void rewind() { seekSet(0); }
bool rename(SdBaseFile* dirFile, const char* newPath); bool rename(SdBaseFile* dirFile, const char* newPath);
bool rmdir(); bool rmdir();
// for backward compatibility
bool rmDir() {return rmdir();}
bool rmRfStar(); bool rmRfStar();
/** Set the files position to current position + \a pos. See seekSet().
/**
* Set the files position to current position + \a pos. See seekSet().
* \param[in] offset The new position in bytes from the current position. * \param[in] offset The new position in bytes from the current position.
* \return true for success or false for failure. * \return true for success or false for failure.
*/ */
bool seekCur(int32_t offset) { bool seekCur(const int32_t offset) { return seekSet(curPosition_ + offset); }
return seekSet(curPosition_ + offset);
} /**
/** Set the files position to end-of-file + \a offset. See seekSet(). * Set the files position to end-of-file + \a offset. See seekSet().
* \param[in] offset The new position in bytes from end-of-file. * \param[in] offset The new position in bytes from end-of-file.
* \return true for success or false for failure. * \return true for success or false for failure.
*/ */
bool seekEnd(int32_t offset = 0) {return seekSet(fileSize_ + offset);} bool seekEnd(const int32_t offset = 0) { return seekSet(fileSize_ + offset); }
bool seekSet(uint32_t pos); bool seekSet(const uint32_t pos);
bool sync(); bool sync();
bool timestamp(SdBaseFile* file); bool timestamp(SdBaseFile* file);
bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,
uint8_t hour, uint8_t minute, uint8_t second); uint8_t hour, uint8_t minute, uint8_t second);
/** Type of file. You should use isFile() or isDir() instead of type()
* if possible. /**
* Type of file. Use isFile() or isDir() instead of type() if possible.
* *
* \return The file or directory type. * \return The file or directory type.
*/ */
uint8_t type() const { return type_; } uint8_t type() const { return type_; }
bool truncate(uint32_t size); bool truncate(uint32_t size);
/** \return SdVolume that contains this file. */
/**
* \return SdVolume that contains this file.
*/
SdVolume* volume() const { return vol_; } SdVolume* volume() const { return vol_; }
int16_t write(const void* buf, uint16_t nbyte); int16_t write(const void* buf, uint16_t nbyte);
//------------------------------------------------------------------------------
private: private:
// allow SdFat to set cwd_ friend class SdFat; // allow SdFat to set cwd_
friend class SdFat; static SdBaseFile* cwd_; // global pointer to cwd dir
// global pointer to cwd dir
static SdBaseFile* cwd_;
// data time callback function // data time callback function
static void (*dateTime_)(uint16_t* date, uint16_t* time); static void (*dateTime_)(uint16_t* date, uint16_t* time);
// bits defined in flags_ // bits defined in flags_
// should be 0X0F static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC), // should be 0x0F
static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC); F_FILE_DIR_DIRTY = 0x80; // sync of directory entry required
// sync of directory entry required
static uint8_t const F_FILE_DIR_DIRTY = 0X80;
// private data // private data
uint8_t flags_; // See above for definition of flags_ bits uint8_t flags_; // See above for definition of flags_ bits
@@ -355,8 +370,11 @@ class SdBaseFile {
uint32_t firstCluster_; // first cluster of file uint32_t firstCluster_; // first cluster of file
SdVolume* vol_; // volume where file is located SdVolume* vol_; // volume where file is located
/** experimental don't use */ /**
bool openParent(SdBaseFile* dir); * EXPERIMENTAL - Don't use!
*/
//bool openParent(SdBaseFile* dir);
// private functions // private functions
bool addCluster(); bool addCluster();
bool addDirCluster(); bool addDirCluster();
@@ -367,126 +385,6 @@ class SdBaseFile {
bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag); bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags); bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
dir_t* readDirCache(); dir_t* readDirCache();
//------------------------------------------------------------------------------
// to be deleted
static void printDirName(const dir_t& dir,
uint8_t width, bool printSlash);
//------------------------------------------------------------------------------
// Deprecated functions - suppress cpplint warnings with NOLINT comment
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
public:
/** \deprecated Use:
* bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
* \param[out] bgnBlock the first block address for the file.
* \param[out] endBlock the last block address for the file.
* \return true for success or false for failure.
*/
bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) { // NOLINT
return contiguousRange(&bgnBlock, &endBlock);
}
/** \deprecated Use:
* bool createContiguous(SdBaseFile* dirFile,
* const char* path, uint32_t size)
* \param[in] dirFile The directory where the file will be created.
* \param[in] path A path with a valid DOS 8.3 file name.
* \param[in] size The desired file size.
* \return true for success or false for failure.
*/
bool createContiguous(SdBaseFile& dirFile, // NOLINT
const char* path, uint32_t size) {
return createContiguous(&dirFile, path, size);
}
/** \deprecated Use:
* static void dateTimeCallback(
* void (*dateTime)(uint16_t* date, uint16_t* time));
* \param[in] dateTime The user's call back function.
*/
static void dateTimeCallback(
void (*dateTime)(uint16_t& date, uint16_t& time)) { // NOLINT
oldDateTime_ = dateTime;
dateTime_ = dateTime ? oldToNew : 0;
}
/** \deprecated Use: bool dirEntry(dir_t* dir);
* \param[out] dir Location for return of the file's directory entry.
* \return true for success or false for failure.
*/
bool dirEntry(dir_t& dir) {return dirEntry(&dir);} // NOLINT
/** \deprecated Use:
* bool mkdir(SdBaseFile* dir, const char* path);
* \param[in] dir An open SdFat instance for the directory that will contain
* the new directory.
* \param[in] path A path with a valid 8.3 DOS name for the new directory.
* \return true for success or false for failure.
*/
bool mkdir(SdBaseFile& dir, const char* path) { // NOLINT
return mkdir(&dir, path);
}
/** \deprecated Use:
* bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
* \param[in] dirFile An open SdFat instance for the directory containing the
* file to be opened.
* \param[in] path A path with a valid 8.3 DOS name for the file.
* \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
* OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
* \return true for success or false for failure.
*/
bool open(SdBaseFile& dirFile, // NOLINT
const char* path, uint8_t oflag) {
return open(&dirFile, path, oflag);
}
/** \deprecated Do not use in new apps
* \param[in] dirFile An open SdFat instance for the directory containing the
* file to be opened.
* \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
* \return true for success or false for failure.
*/
bool open(SdBaseFile& dirFile, const char* path) { // NOLINT
return open(dirFile, path, O_RDWR);
}
/** \deprecated Use:
* bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
* \param[in] dirFile An open SdFat instance for the directory.
* \param[in] index The \a index of the directory entry for the file to be
* opened. The value for \a index is (directory file position)/32.
* \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
* OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
* \return true for success or false for failure.
*/
bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) { // NOLINT
return open(&dirFile, index, oflag);
}
/** \deprecated Use: bool openRoot(SdVolume* vol);
* \param[in] vol The FAT volume containing the root directory to be opened.
* \return true for success or false for failure.
*/
bool openRoot(SdVolume& vol) {return openRoot(&vol);} // NOLINT
/** \deprecated Use: int8_t readDir(dir_t* dir);
* \param[out] dir The dir_t struct that will receive the data.
* \return bytes read for success zero for eof or -1 for failure.
*/
int8_t readDir(dir_t& dir, char* longFilename) {return readDir(&dir, longFilename);} // NOLINT
/** \deprecated Use:
* static uint8_t remove(SdBaseFile* dirFile, const char* path);
* \param[in] dirFile The directory that contains the file.
* \param[in] path The name of the file to be removed.
* \return true for success or false for failure.
*/
static bool remove(SdBaseFile& dirFile, const char* path) { // NOLINT
return remove(&dirFile, path);
}
//------------------------------------------------------------------------------
// rest are private
private:
static void (*oldDateTime_)(uint16_t& date, uint16_t& time); // NOLINT
static void oldToNew(uint16_t* date, uint16_t* time) {
uint16_t d;
uint16_t t;
oldDateTime_(d, t);
*date = d;
*time = t;
}
#endif // ALLOW_DEPRECATED_FUNCTIONS
}; };
#endif // SdBaseFile_h #endif // _SDBASEFILE_H_
#endif

View File

@@ -21,22 +21,18 @@
*/ */
/** /**
* SdFatConfig.h
* Arduino SdFat Library * Arduino SdFat Library
* Copyright (C) 2009 by William Greiman * Copyright (C) 2009 by William Greiman
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
/**
* \file
* \brief configuration definitions
*/
#include "Marlin.h"
#if ENABLED(SDSUPPORT)
#ifndef SdFatConfig_h #ifndef _SDFATCONFIG_H_
#define SdFatConfig_h #define _SDFATCONFIG_H_
#include <stdint.h>
//------------------------------------------------------------------------------ #include "MarlinConfig.h"
/** /**
* To use multiple SD cards set USE_MULTIPLE_CARDS nonzero. * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
* *
@@ -45,7 +41,7 @@
* Each card requires about 550 bytes of SRAM so use of a Mega is recommended. * Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
*/ */
#define USE_MULTIPLE_CARDS 0 #define USE_MULTIPLE_CARDS 0
//------------------------------------------------------------------------------
/** /**
* Call flush for endl if ENDL_CALLS_FLUSH is nonzero * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
* *
@@ -64,30 +60,25 @@
* all data to be written to the SD. * all data to be written to the SD.
*/ */
#define ENDL_CALLS_FLUSH 0 #define ENDL_CALLS_FLUSH 0
//------------------------------------------------------------------------------
/**
* Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
*/
#define ALLOW_DEPRECATED_FUNCTIONS 1
//------------------------------------------------------------------------------
/** /**
* Allow FAT12 volumes if FAT12_SUPPORT is nonzero. * Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
* FAT12 has not been well tested. * FAT12 has not been well tested.
*/ */
#define FAT12_SUPPORT 0 #define FAT12_SUPPORT 0
//------------------------------------------------------------------------------
/** /**
* SPI init rate for SD initialization commands. Must be 5 (F_CPU/64) * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
* or 6 (F_CPU/128). * or 6 (F_CPU/128).
*/ */
#define SPI_SD_INIT_RATE 5 #define SPI_SD_INIT_RATE 5
//------------------------------------------------------------------------------
/** /**
* Set the SS pin high for hardware SPI. If SS is chip select for another SPI * Set the SS pin high for hardware SPI. If SS is chip select for another SPI
* device this will disable that device during the SD init phase. * device this will disable that device during the SD init phase.
*/ */
#define SET_SPI_SS_HIGH 1 #define SET_SPI_SS_HIGH 1
//------------------------------------------------------------------------------
/** /**
* Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
* Pins used are SS 10, MOSI 11, MISO 12, and SCK 13. * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
@@ -97,38 +88,29 @@
* but many SD cards will fail with GPS Shield V1.0. * but many SD cards will fail with GPS Shield V1.0.
*/ */
#define MEGA_SOFT_SPI 0 #define MEGA_SOFT_SPI 0
//------------------------------------------------------------------------------
/** // Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI.
* Set USE_SOFTWARE_SPI nonzero to always use software SPI.
*/
#define USE_SOFTWARE_SPI 0 #define USE_SOFTWARE_SPI 0
// define software SPI pins so Mega can use unmodified 168/328 shields
/** Software SPI chip select pin for the SD */ // Define software SPI pins so Mega can use unmodified 168/328 shields
#define SOFT_SPI_CS_PIN 10 #define SOFT_SPI_CS_PIN 10 // Software SPI chip select pin for the SD
/** Software SPI Master Out Slave In pin */ #define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin
#define SOFT_SPI_MOSI_PIN 11 #define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin
/** Software SPI Master In Slave Out pin */ #define SOFT_SPI_SCK_PIN 13 // Software SPI Clock pin
#define SOFT_SPI_MISO_PIN 12
/** Software SPI Clock pin */
#define SOFT_SPI_SCK_PIN 13
//------------------------------------------------------------------------------
/** /**
* The __cxa_pure_virtual function is an error handler that is invoked when * The __cxa_pure_virtual function is an error handler that is invoked when
* a pure virtual function is called. * a pure virtual function is called.
*/ */
#define USE_CXA_PURE_VIRTUAL 1 #define USE_CXA_PURE_VIRTUAL 1
/** Number of UTF-16 characters per entry */
#define FILENAME_LENGTH 13
/** /**
* Defines for long (vfat) filenames * Defines for 8.3 and long (vfat) filenames
*/ */
/** Number of VFAT entries used. Every entry has 13 UTF-16 characters */
#define MAX_VFAT_ENTRIES (2) #define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry
/** Total size of the buffer used to store the long filenames */
// Total bytes needed to store a single long filename
#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1) #define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1)
#endif // SdFatConfig_h
#endif // _SDFATCONFIG_H_
#endif

View File

@@ -20,35 +20,31 @@
* *
*/ */
/**
* \file
* \brief FAT file structures
*/
/** /**
* Arduino SdFat Library * Arduino SdFat Library
* Copyright (C) 2009 by William Greiman * Copyright (C) 2009 by William Greiman
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #ifndef SDFATSTRUCTS_H
#if ENABLED(SDSUPPORT) #define SDFATSTRUCTS_H
#ifndef SdFatStructs_h
#define SdFatStructs_h
#define PACKED __attribute__((__packed__)) #define PACKED __attribute__((__packed__))
/**
* \file
* \brief FAT file structures
*/
/** /**
* mostly from Microsoft document fatgen103.doc * mostly from Microsoft document fatgen103.doc
* http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx * http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
*/ */
//------------------------------------------------------------------------------
/** Value for byte 510 of boot block or MBR */ uint8_t const BOOTSIG0 = 0x55, // Value for byte 510 of boot block or MBR
uint8_t const BOOTSIG0 = 0X55; BOOTSIG1 = 0xAA, // Value for byte 511 of boot block or MBR
/** Value for byte 511 of boot block or MBR */ EXTENDED_BOOT_SIG = 0x29; // Value for bootSignature field int FAT/FAT32 boot sector
uint8_t const BOOTSIG1 = 0XAA;
/** Value for bootSignature field int FAT/FAT32 boot sector */
uint8_t const EXTENDED_BOOT_SIG = 0X29;
//------------------------------------------------------------------------------
/** /**
* \struct partitionTable * \struct partitionTable
* \brief MBR partition table entry * \brief MBR partition table entry
@@ -59,8 +55,8 @@ uint8_t const EXTENDED_BOOT_SIG = 0X29;
struct partitionTable { struct partitionTable {
/** /**
* Boot Indicator . Indicates whether the volume is the active * Boot Indicator . Indicates whether the volume is the active
* partition. Legal values include: 0X00. Do not use for booting. * partition. Legal values include: 0x00. Do not use for booting.
* 0X80 Active partition. * 0x80 Active partition.
*/ */
uint8_t boot; uint8_t boot;
/** /**
@@ -102,14 +98,13 @@ struct partitionTable {
* are 0-1023. Only used in old PC BIOS. * are 0-1023. Only used in old PC BIOS.
*/ */
uint8_t endCylinderLow; uint8_t endCylinderLow;
/** Logical block address of the first block in the partition. */
uint32_t firstSector; uint32_t firstSector; // Logical block address of the first block in the partition.
/** Length of the partition, in blocks. */ uint32_t totalSectors; // Length of the partition, in blocks.
uint32_t totalSectors;
} PACKED; } PACKED;
/** Type name for partitionTable */
typedef struct partitionTable part_t; typedef struct partitionTable part_t; // Type name for partitionTable
//------------------------------------------------------------------------------
/** /**
* \struct masterBootRecord * \struct masterBootRecord
* *
@@ -118,22 +113,16 @@ typedef struct partitionTable part_t;
* The first block of a storage device that is formatted with a MBR. * The first block of a storage device that is formatted with a MBR.
*/ */
struct masterBootRecord { struct masterBootRecord {
/** Code Area for master boot program. */ uint8_t codeArea[440]; // Code Area for master boot program.
uint8_t codeArea[440]; uint32_t diskSignature; // Optional Windows NT disk signature. May contain boot code.
/** Optional Windows NT disk signature. May contain boot code. */ uint16_t usuallyZero; // Usually zero but may be more boot code.
uint32_t diskSignature; part_t part[4]; // Partition tables.
/** Usually zero but may be more boot code. */ uint8_t mbrSig0; // First MBR signature byte. Must be 0x55
uint16_t usuallyZero; uint8_t mbrSig1; // Second MBR signature byte. Must be 0xAA
/** Partition tables. */
part_t part[4];
/** First MBR signature byte. Must be 0X55 */
uint8_t mbrSig0;
/** Second MBR signature byte. Must be 0XAA */
uint8_t mbrSig1;
} PACKED; } PACKED;
/** Type name for masterBootRecord */ /** Type name for masterBootRecord */
typedef struct masterBootRecord mbr_t; typedef struct masterBootRecord mbr_t;
//------------------------------------------------------------------------------
/** /**
* \struct fat_boot * \struct fat_boot
* *
@@ -206,10 +195,10 @@ struct fat_boot {
* contains the FAT size count. * contains the FAT size count.
*/ */
uint16_t sectorsPerFat16; uint16_t sectorsPerFat16;
/** Sectors per track for interrupt 0x13. Not used otherwise. */
uint16_t sectorsPerTrack; uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
/** Number of heads for interrupt 0x13. Not used otherwise. */ uint16_t headCount; // Number of heads for interrupt 0x13. Not used otherwise.
uint16_t headCount;
/** /**
* Count of hidden sectors preceding the partition that contains this * Count of hidden sectors preceding the partition that contains this
* FAT volume. This field is generally only relevant for media * FAT volume. This field is generally only relevant for media
@@ -232,10 +221,10 @@ struct fat_boot {
* relevant if the device is a boot device. * relevant if the device is a boot device.
*/ */
uint8_t driveNumber; uint8_t driveNumber;
/** used by Windows NT - should be zero for FAT */
uint8_t reserved1; uint8_t reserved1; // used by Windows NT - should be zero for FAT
/** 0X29 if next three fields are valid */ uint8_t bootSignature; // 0x29 if next three fields are valid
uint8_t bootSignature;
/** /**
* A random serial number created when formatting a disk, * A random serial number created when formatting a disk,
* which helps to distinguish between disks. * which helps to distinguish between disks.
@@ -252,21 +241,18 @@ struct fat_boot {
* depending on the disk format. * depending on the disk format.
*/ */
char fileSystemType[8]; char fileSystemType[8];
/** X86 boot code */
uint8_t bootCode[448]; uint8_t bootCode[448]; // X86 boot code
/** must be 0X55 */ uint8_t bootSectorSig0; // must be 0x55
uint8_t bootSectorSig0; uint8_t bootSectorSig1; // must be 0xAA
/** must be 0XAA */
uint8_t bootSectorSig1;
} PACKED; } PACKED;
/** Type name for FAT Boot Sector */
typedef struct fat_boot fat_boot_t; typedef struct fat_boot fat_boot_t; // Type name for FAT Boot Sector
//------------------------------------------------------------------------------
/** /**
* \struct fat32_boot * \struct fat32_boot
* *
* \brief Boot sector for a FAT32 volume. * \brief Boot sector for a FAT32 volume.
*
*/ */
struct fat32_boot { struct fat32_boot {
/** /**
@@ -322,10 +308,10 @@ struct fat32_boot {
* contains the FAT size count. * contains the FAT size count.
*/ */
uint16_t sectorsPerFat16; uint16_t sectorsPerFat16;
/** Sectors per track for interrupt 0x13. Not used otherwise. */
uint16_t sectorsPerTrack; uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
/** Number of heads for interrupt 0x13. Not used otherwise. */ uint16_t headCount; // Number of heads for interrupt 0x13. Not used otherwise.
uint16_t headCount;
/** /**
* Count of hidden sectors preceding the partition that contains this * Count of hidden sectors preceding the partition that contains this
* FAT volume. This field is generally only relevant for media * FAT volume. This field is generally only relevant for media
@@ -387,10 +373,10 @@ struct fat32_boot {
* relevant if the device is a boot device. * relevant if the device is a boot device.
*/ */
uint8_t driveNumber; uint8_t driveNumber;
/** used by Windows NT - should be zero for FAT */
uint8_t reserved1; uint8_t reserved1; // Used by Windows NT - should be zero for FAT
/** 0X29 if next three fields are valid */ uint8_t bootSignature; // 0x29 if next three fields are valid
uint8_t bootSignature;
/** /**
* A random serial number created when formatting a disk, * A random serial number created when formatting a disk,
* which helps to distinguish between disks. * which helps to distinguish between disks.
@@ -406,20 +392,18 @@ struct fat32_boot {
* A text field with a value of FAT32. * A text field with a value of FAT32.
*/ */
char fileSystemType[8]; char fileSystemType[8];
/** X86 boot code */
uint8_t bootCode[420]; uint8_t bootCode[420]; // X86 boot code
/** must be 0X55 */ uint8_t bootSectorSig0; // must be 0x55
uint8_t bootSectorSig0; uint8_t bootSectorSig1; // must be 0xAA
/** must be 0XAA */
uint8_t bootSectorSig1;
} PACKED; } PACKED;
/** Type name for FAT32 Boot Sector */
typedef struct fat32_boot fat32_boot_t; typedef struct fat32_boot fat32_boot_t; // Type name for FAT32 Boot Sector
//------------------------------------------------------------------------------
/** Lead signature for a FSINFO sector */ uint32_t const FSINFO_LEAD_SIG = 0x41615252, // 'AaRR' Lead signature for a FSINFO sector
uint32_t const FSINFO_LEAD_SIG = 0x41615252; FSINFO_STRUCT_SIG = 0x61417272; // 'aArr' Struct signature for a FSINFO sector
/** Struct signature for a FSINFO sector */
uint32_t const FSINFO_STRUCT_SIG = 0x61417272;
/** /**
* \struct fat32_fsinfo * \struct fat32_fsinfo
* *
@@ -427,12 +411,9 @@ uint32_t const FSINFO_STRUCT_SIG = 0x61417272;
* *
*/ */
struct fat32_fsinfo { struct fat32_fsinfo {
/** must be 0X52, 0X52, 0X61, 0X41 */ uint32_t leadSignature; // must be 0x52, 0x52, 0x61, 0x41 'RRaA'
uint32_t leadSignature; uint8_t reserved1[480]; // must be zero
/** must be zero */ uint32_t structSignature; // must be 0x72, 0x72, 0x41, 0x61 'rrAa'
uint8_t reserved1[480];
/** must be 0X72, 0X72, 0X41, 0X61 */
uint32_t structSignature;
/** /**
* Contains the last known free cluster count on the volume. * Contains the last known free cluster count on the volume.
* If the value is 0xFFFFFFFF, then the free count is unknown * If the value is 0xFFFFFFFF, then the free count is unknown
@@ -448,30 +429,22 @@ struct fat32_fsinfo {
* should start looking at cluster 2. * should start looking at cluster 2.
*/ */
uint32_t nextFree; uint32_t nextFree;
/** must be zero */
uint8_t reserved2[12]; uint8_t reserved2[12]; // must be zero
/** must be 0X00, 0X00, 0X55, 0XAA */ uint8_t tailSignature[4]; // must be 0x00, 0x00, 0x55, 0xAA
uint8_t tailSignature[4];
} PACKED; } PACKED;
/** Type name for FAT32 FSINFO Sector */
typedef struct fat32_fsinfo fat32_fsinfo_t; typedef struct fat32_fsinfo fat32_fsinfo_t; // Type name for FAT32 FSINFO Sector
//------------------------------------------------------------------------------
// End Of Chain values for FAT entries // End Of Chain values for FAT entries
/** FAT12 end of chain value used by Microsoft. */ uint16_t const FAT12EOC = 0xFFF, // FAT12 end of chain value used by Microsoft.
uint16_t const FAT12EOC = 0XFFF; FAT12EOC_MIN = 0xFF8, // Minimum value for FAT12 EOC. Use to test for EOC.
/** Minimum value for FAT12 EOC. Use to test for EOC. */ FAT16EOC = 0xFFFF, // FAT16 end of chain value used by Microsoft.
uint16_t const FAT12EOC_MIN = 0XFF8; FAT16EOC_MIN = 0xFFF8; // Minimum value for FAT16 EOC. Use to test for EOC.
/** FAT16 end of chain value used by Microsoft. */ uint32_t const FAT32EOC = 0x0FFFFFFF, // FAT32 end of chain value used by Microsoft.
uint16_t const FAT16EOC = 0XFFFF; FAT32EOC_MIN = 0x0FFFFFF8, // Minimum value for FAT32 EOC. Use to test for EOC.
/** Minimum value for FAT16 EOC. Use to test for EOC. */ FAT32MASK = 0x0FFFFFFF; // Mask a for FAT32 entry. Entries are 28 bits.
uint16_t const FAT16EOC_MIN = 0XFFF8;
/** FAT32 end of chain value used by Microsoft. */
uint32_t const FAT32EOC = 0X0FFFFFFF;
/** Minimum value for FAT32 EOC. Use to test for EOC. */
uint32_t const FAT32EOC_MIN = 0X0FFFFFF8;
/** Mask a for FAT32 entry. Entries are 28 bits. */
uint32_t const FAT32MASK = 0X0FFFFFFF;
//------------------------------------------------------------------------------
/** /**
* \struct directoryEntry * \struct directoryEntry
* \brief FAT short directory entry * \brief FAT short directory entry
@@ -503,13 +476,15 @@ uint32_t const FAT32MASK = 0X0FFFFFFF;
* The valid time range is from Midnight 00:00:00 to 23:59:58. * The valid time range is from Midnight 00:00:00 to 23:59:58.
*/ */
struct directoryEntry { struct directoryEntry {
/** Short 8.3 name. /**
* Short 8.3 name.
* *
* The first eight bytes contain the file name with blank fill. * The first eight bytes contain the file name with blank fill.
* The last three bytes contain the file extension with blank fill. * The last three bytes contain the file extension with blank fill.
*/ */
uint8_t name[11]; uint8_t name[11];
/** Entry attributes. /**
* Entry attributes.
* *
* The upper two bits of the attribute byte are reserved and should * The upper two bits of the attribute byte are reserved and should
* always be set to 0 when a file is created and never modified or * always be set to 0 when a file is created and never modified or
@@ -523,14 +498,14 @@ struct directoryEntry {
uint8_t reservedNT; uint8_t reservedNT;
/** /**
* The granularity of the seconds part of creationTime is 2 seconds * The granularity of the seconds part of creationTime is 2 seconds
* so this field is a count of tenths of a second and its valid * so this field is a count of tenths of a second and it's valid
* value range is 0-199 inclusive. (WHG note - seems to be hundredths) * value range is 0-199 inclusive. (WHG note - seems to be hundredths)
*/ */
uint8_t creationTimeTenths; uint8_t creationTimeTenths;
/** Time file was created. */
uint16_t creationTime; uint16_t creationTime; // Time file was created.
/** Date file was created. */ uint16_t creationDate; // Date file was created.
uint16_t creationDate;
/** /**
* Last access date. Note that there is no last access time, only * Last access date. Note that there is no last access time, only
* a date. This is the date of last read or write. In the case of * a date. This is the date of last read or write. In the case of
@@ -542,15 +517,13 @@ struct directoryEntry {
* FAT12 or FAT16 volume). * FAT12 or FAT16 volume).
*/ */
uint16_t firstClusterHigh; uint16_t firstClusterHigh;
/** Time of last write. File creation is considered a write. */
uint16_t lastWriteTime; uint16_t lastWriteTime; // Time of last write. File creation is considered a write.
/** Date of last write. File creation is considered a write. */ uint16_t lastWriteDate; // Date of last write. File creation is considered a write.
uint16_t lastWriteDate; uint16_t firstClusterLow; // Low word of this entry's first cluster number.
/** Low word of this entry's first cluster number. */ uint32_t fileSize; // 32-bit unsigned holding this file's size in bytes.
uint16_t firstClusterLow;
/** 32-bit unsigned holding this file's size in bytes. */
uint32_t fileSize;
} PACKED; } PACKED;
/** /**
* \struct directoryVFATEntry * \struct directoryVFATEntry
* \brief VFAT long filename directory entry * \brief VFAT long filename directory entry
@@ -568,54 +541,36 @@ struct directoryVFATEntry {
* bit 0-4: the position of this long filename block (first block is 1) * bit 0-4: the position of this long filename block (first block is 1)
*/ */
uint8_t sequenceNumber; uint8_t sequenceNumber;
/** First set of UTF-16 characters */
uint16_t name1[5];//UTF-16 uint16_t name1[5]; // First set of UTF-16 characters
/** attributes (at the same location as in directoryEntry), always 0x0F */ uint8_t attributes; // attributes (at the same location as in directoryEntry), always 0x0F
uint8_t attributes; uint8_t reservedNT; // Reserved for use by Windows NT. Always 0.
/** Reserved for use by Windows NT. Always 0. */ uint8_t checksum; // Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation.
uint8_t reservedNT; uint16_t name2[6]; // Second set of UTF-16 characters
/** Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation. */ uint16_t firstClusterLow; // firstClusterLow is always zero for longFilenames
uint8_t checksum; uint16_t name3[2]; // Third set of UTF-16 characters
/** Second set of UTF-16 characters */
uint16_t name2[6];//UTF-16
/** firstClusterLow is always zero for longFilenames */
uint16_t firstClusterLow;
/** Third set of UTF-16 characters */
uint16_t name3[2];//UTF-16
} PACKED; } PACKED;
//------------------------------------------------------------------------------
// Definitions for directory entries // Definitions for directory entries
// //
/** Type name for directoryEntry */ typedef struct directoryEntry dir_t; // Type name for directoryEntry
typedef struct directoryEntry dir_t; typedef struct directoryVFATEntry vfat_t; // Type name for directoryVFATEntry
/** Type name for directoryVFATEntry */
typedef struct directoryVFATEntry vfat_t; uint8_t const DIR_NAME_0xE5 = 0x05, // escape for name[0] = 0xE5
/** escape for name[0] = 0XE5 */ DIR_NAME_DELETED = 0xE5, // name[0] value for entry that is free after being "deleted"
uint8_t const DIR_NAME_0XE5 = 0X05; DIR_NAME_FREE = 0x00, // name[0] value for entry that is free and no allocated entries follow
/** name[0] value for entry that is free after being "deleted" */ DIR_ATT_READ_ONLY = 0x01, // file is read-only
uint8_t const DIR_NAME_DELETED = 0XE5; DIR_ATT_HIDDEN = 0x02, // File should hidden in directory listings
/** name[0] value for entry that is free and no allocated entries follow */ DIR_ATT_SYSTEM = 0x04, // Entry is for a system file
uint8_t const DIR_NAME_FREE = 0X00; DIR_ATT_VOLUME_ID = 0x08, // Directory entry contains the volume label
/** file is read-only */ DIR_ATT_DIRECTORY = 0x10, // Entry is for a directory
uint8_t const DIR_ATT_READ_ONLY = 0X01; DIR_ATT_ARCHIVE = 0x20, // Old DOS archive bit for backup support
/** File should hidden in directory listings */ DIR_ATT_LONG_NAME = 0x0F, // Test value for long name entry. Test is (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME.
uint8_t const DIR_ATT_HIDDEN = 0X02; DIR_ATT_LONG_NAME_MASK = 0x3F, // Test mask for long name entry
/** Entry is for a system file */ DIR_ATT_DEFINED_BITS = 0x3F; // defined attribute bits
uint8_t const DIR_ATT_SYSTEM = 0X04;
/** Directory entry contains the volume label */ /**
uint8_t const DIR_ATT_VOLUME_ID = 0X08; * Directory entry is part of a long name
/** Entry is for a directory */
uint8_t const DIR_ATT_DIRECTORY = 0X10;
/** Old DOS archive bit for backup support */
uint8_t const DIR_ATT_ARCHIVE = 0X20;
/** Test value for long name entry. Test is
(d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME. */
uint8_t const DIR_ATT_LONG_NAME = 0X0F;
/** Test mask for long name entry */
uint8_t const DIR_ATT_LONG_NAME_MASK = 0X3F;
/** defined attribute bits */
uint8_t const DIR_ATT_DEFINED_BITS = 0X3F;
/** Directory entry is part of a long name
* \param[in] dir Pointer to a directory entry. * \param[in] dir Pointer to a directory entry.
* *
* \return true if the entry is for part of a long name else false. * \return true if the entry is for part of a long name else false.
@@ -623,9 +578,12 @@ uint8_t const DIR_ATT_DEFINED_BITS = 0X3F;
static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) { static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME; return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME;
} }
/** Mask for file/subdirectory tests */ /** Mask for file/subdirectory tests */
uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY); uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
/** Directory entry is for a file
/**
* Directory entry is for a file
* \param[in] dir Pointer to a directory entry. * \param[in] dir Pointer to a directory entry.
* *
* \return true if the entry is for a normal file else false. * \return true if the entry is for a normal file else false.
@@ -633,7 +591,9 @@ uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
static inline uint8_t DIR_IS_FILE(const dir_t* dir) { static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0; return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0;
} }
/** Directory entry is for a subdirectory
/**
* Directory entry is for a subdirectory
* \param[in] dir Pointer to a directory entry. * \param[in] dir Pointer to a directory entry.
* *
* \return true if the entry is for a subdirectory else false. * \return true if the entry is for a subdirectory else false.
@@ -641,7 +601,9 @@ static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) { static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY; return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY;
} }
/** Directory entry is for a file or subdirectory
/**
* Directory entry is for a file or subdirectory
* \param[in] dir Pointer to a directory entry. * \param[in] dir Pointer to a directory entry.
* *
* \return true if the entry is for a normal file or subdirectory else false. * \return true if the entry is for a normal file or subdirectory else false.
@@ -649,7 +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) { static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
return (dir->attributes & DIR_ATT_VOLUME_ID) == 0; return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
} }
#endif // SdFatStructs_h
#endif // SDFATSTRUCTS_H
#endif

View File

@@ -26,13 +26,15 @@
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #include "MarlinConfig.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "SdFatUtil.h"
//------------------------------------------------------------------------------ #include "SdFatUtil.h"
/** Amount of free RAM #include "serial.h"
/**
* Amount of free RAM
* \return The number of free bytes. * \return The number of free bytes.
*/ */
#ifdef __arm__ #ifdef __arm__
@@ -44,7 +46,8 @@ int SdFatUtil::FreeRam() {
#else // __arm__ #else // __arm__
extern char* __brkval; extern char* __brkval;
extern char __bss_end; extern char __bss_end;
/** Amount of free RAM /**
* Amount of free RAM
* \return The number of free bytes. * \return The number of free bytes.
*/ */
int SdFatUtil::FreeRam() { int SdFatUtil::FreeRam() {
@@ -53,39 +56,36 @@ int SdFatUtil::FreeRam() {
} }
#endif // __arm #endif // __arm
//------------------------------------------------------------------------------ /**
/** %Print a string in flash memory. * %Print a string in flash memory.
* *
* \param[in] pr Print object for output. * \param[in] pr Print object for output.
* \param[in] str Pointer to string stored in flash memory. * \param[in] str Pointer to string stored in flash memory.
*/ */
void SdFatUtil::print_P(PGM_P str) { void SdFatUtil::print_P(PGM_P str) {
for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c); for (uint8_t c; (c = pgm_read_byte(str)); str++) SERIAL_CHAR(c);
} }
//------------------------------------------------------------------------------
/** %Print a string in flash memory followed by a CR/LF. /**
* %Print a string in flash memory followed by a CR/LF.
* *
* \param[in] pr Print object for output. * \param[in] pr Print object for output.
* \param[in] str Pointer to string stored in flash memory. * \param[in] str Pointer to string stored in flash memory.
*/ */
void SdFatUtil::println_P(PGM_P str) { void SdFatUtil::println_P(PGM_P str) { print_P(str); SERIAL_EOL(); }
print_P(str);
MYSERIAL.println(); /**
} * %Print a string in flash memory to Serial.
//------------------------------------------------------------------------------
/** %Print a string in flash memory to Serial.
* *
* \param[in] str Pointer to string stored in flash memory. * \param[in] str Pointer to string stored in flash memory.
*/ */
void SdFatUtil::SerialPrint_P(PGM_P str) { void SdFatUtil::SerialPrint_P(PGM_P str) { print_P(str); }
print_P(str);
} /**
//------------------------------------------------------------------------------ * %Print a string in flash memory to Serial followed by a CR/LF.
/** %Print a string in flash memory to Serial followed by a CR/LF.
* *
* \param[in] str Pointer to string stored in flash memory. * \param[in] str Pointer to string stored in flash memory.
*/ */
void SdFatUtil::SerialPrintln_P(PGM_P str) { void SdFatUtil::SerialPrintln_P(PGM_P str) { println_P(str); }
println_P(str);
} #endif // SDSUPPORT
#endif

View File

@@ -26,17 +26,13 @@
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #ifndef _SDFATUTIL_H_
#if ENABLED(SDSUPPORT) #define _SDFATUTIL_H_
#ifndef SdFatUtil_h
#define SdFatUtil_h
/** /**
* \file * \file
* \brief Useful utility functions. * \brief Useful utility functions.
*/ */
#include "Marlin.h"
#include "MarlinSerial.h"
/** Store and print a string in flash memory.*/ /** Store and print a string in flash memory.*/
#define PgmPrint(x) SerialPrint_P(PSTR(x)) #define PgmPrint(x) SerialPrint_P(PSTR(x))
/** Store and print a string in flash memory followed by a CR/LF.*/ /** Store and print a string in flash memory followed by a CR/LF.*/
@@ -51,7 +47,5 @@ namespace SdFatUtil {
} }
using namespace SdFatUtil; // NOLINT using namespace SdFatUtil; // NOLINT
#endif //#define SdFatUtil_h
#endif // _SDFATUTIL_H_
#endif

View File

@@ -26,21 +26,24 @@
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #include "MarlinConfig.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "SdFile.h" #include "SdFile.h"
/** Create a file object and open it in the current working directory.
/**
* Create a file object and open it in the current working directory.
* *
* \param[in] path A path with a valid 8.3 DOS name for a file to be opened. * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
* *
* \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
* OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
*/ */
SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { }
}
//------------------------------------------------------------------------------ /**
/** Write data to an open file. * Write data to an open file.
* *
* \note Data is moved to the cache but may not be written to the * \note Data is moved to the cache but may not be written to the
* storage device until sync() is called. * storage device until sync() is called.
@@ -55,41 +58,37 @@ SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) {
* for a read-only file, device is full, a corrupt file system or an I/O error. * for a read-only file, device is full, a corrupt file system or an I/O error.
* *
*/ */
int16_t SdFile::write(const void* buf, uint16_t nbyte) { int16_t SdFile::write(const void* buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); }
return SdBaseFile::write(buf, nbyte);
} /**
//------------------------------------------------------------------------------ * Write a byte to a file. Required by the Arduino Print class.
/** Write a byte to a file. Required by the Arduino Print class.
* \param[in] b the byte to be written. * \param[in] b the byte to be written.
* Use writeError to check for errors. * Use writeError to check for errors.
*/ */
#if ARDUINO >= 100 #if ARDUINO >= 100
size_t SdFile::write(uint8_t b) { size_t SdFile::write(uint8_t b) { return SdBaseFile::write(&b, 1); }
return SdBaseFile::write(&b, 1);
}
#else #else
void SdFile::write(uint8_t b) { void SdFile::write(uint8_t b) { SdBaseFile::write(&b, 1); }
SdBaseFile::write(&b, 1);
}
#endif #endif
//------------------------------------------------------------------------------
/** Write a string to a file. Used by the Arduino Print class. /**
* Write a string to a file. Used by the Arduino Print class.
* \param[in] str Pointer to the string. * \param[in] str Pointer to the string.
* Use writeError to check for errors. * Use writeError to check for errors.
*/ */
void SdFile::write(const char* str) { void SdFile::write(const char* str) { SdBaseFile::write(str, strlen(str)); }
SdBaseFile::write(str, strlen(str));
} /**
//------------------------------------------------------------------------------ * Write a PROGMEM string to a file.
/** Write a PROGMEM string to a file.
* \param[in] str Pointer to the PROGMEM string. * \param[in] str Pointer to the PROGMEM string.
* Use writeError to check for errors. * Use writeError to check for errors.
*/ */
void SdFile::write_P(PGM_P str) { void SdFile::write_P(PGM_P str) {
for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c); for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c);
} }
//------------------------------------------------------------------------------
/** Write a PROGMEM string followed by CR/LF to a file. /**
* Write a PROGMEM string followed by CR/LF to a file.
* \param[in] str Pointer to the PROGMEM string. * \param[in] str Pointer to the PROGMEM string.
* Use writeError to check for errors. * Use writeError to check for errors.
*/ */
@@ -98,5 +97,4 @@ void SdFile::writeln_P(PGM_P str) {
write_P(PSTR("\r\n")); write_P(PSTR("\r\n"));
} }
#endif // SDSUPPORT
#endif

View File

@@ -20,24 +20,23 @@
* *
*/ */
/**
* \file
* \brief SdFile class
*/
/** /**
* Arduino SdFat Library * Arduino SdFat Library
* Copyright (C) 2009 by William Greiman * Copyright (C) 2009 by William Greiman
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
/** #ifndef _SDFILE_H_
* \file #define _SDFILE_H_
* \brief SdFile class
*/
#include "Marlin.h"
#if ENABLED(SDSUPPORT)
#include "SdBaseFile.h" #include "SdBaseFile.h"
#include <Print.h> #include <Print.h>
#ifndef SdFile_h
#define SdFile_h
//------------------------------------------------------------------------------
/** /**
* \class SdFile * \class SdFile
* \brief SdBaseFile with Print. * \brief SdBaseFile with Print.
@@ -57,7 +56,5 @@ class SdFile : public SdBaseFile, public Print {
void write_P(PGM_P str); void write_P(PGM_P str);
void writeln_P(PGM_P str); void writeln_P(PGM_P str);
}; };
#endif // SdFile_h
#endif // _SDFILE_H_
#endif

View File

@@ -26,12 +26,11 @@
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #ifndef _SDINFO_H_
#if ENABLED(SDSUPPORT) #define _SDINFO_H_
#ifndef SdInfo_h
#define SdInfo_h
#include <stdint.h> #include <stdint.h>
// Based on the document: // Based on the document:
// //
// SD Specifications // SD Specifications
@@ -42,63 +41,43 @@
// May 18, 2010 // May 18, 2010
// //
// http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs // http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs
//------------------------------------------------------------------------------
// SD card commands // SD card commands
/** GO_IDLE_STATE - init card in spi mode if CS low */ uint8_t const CMD0 = 0x00, // GO_IDLE_STATE - init card in spi mode if CS low
uint8_t const CMD0 = 0X00; CMD8 = 0x08, // SEND_IF_COND - verify SD Memory Card interface operating condition
/** SEND_IF_COND - verify SD Memory Card interface operating condition.*/ CMD9 = 0x09, // SEND_CSD - read the Card Specific Data (CSD register)
uint8_t const CMD8 = 0X08; CMD10 = 0x0A, // SEND_CID - read the card identification information (CID register)
/** SEND_CSD - read the Card Specific Data (CSD register) */ CMD12 = 0x0C, // STOP_TRANSMISSION - end multiple block read sequence
uint8_t const CMD9 = 0X09; CMD13 = 0x0D, // SEND_STATUS - read the card status register
/** SEND_CID - read the card identification information (CID register) */ CMD17 = 0x11, // READ_SINGLE_BLOCK - read a single data block from the card
uint8_t const CMD10 = 0X0A; CMD18 = 0x12, // READ_MULTIPLE_BLOCK - read a multiple data blocks from the card
/** STOP_TRANSMISSION - end multiple block read sequence */ CMD24 = 0x18, // WRITE_BLOCK - write a single data block to the card
uint8_t const CMD12 = 0X0C; CMD25 = 0x19, // WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION
/** SEND_STATUS - read the card status register */ CMD32 = 0x20, // ERASE_WR_BLK_START - sets the address of the first block to be erased
uint8_t const CMD13 = 0X0D; CMD33 = 0x21, // ERASE_WR_BLK_END - sets the address of the last block of the continuous range to be erased*/
/** READ_SINGLE_BLOCK - read a single data block from the card */ CMD38 = 0x26, // ERASE - erase all previously selected blocks */
uint8_t const CMD17 = 0X11; CMD55 = 0x37, // APP_CMD - escape for application specific command */
/** READ_MULTIPLE_BLOCK - read a multiple data blocks from the card */ CMD58 = 0x3A, // READ_OCR - read the OCR register of a card */
uint8_t const CMD18 = 0X12; ACMD23 = 0x17, // SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be pre-erased before writing */
/** WRITE_BLOCK - write a single data block to the card */ ACMD41 = 0x29; // SD_SEND_OP_COMD - Sends host capacity support information and activates the card's initialization process */
uint8_t const CMD24 = 0X18;
/** WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION */
uint8_t const CMD25 = 0X19;
/** ERASE_WR_BLK_START - sets the address of the first block to be erased */
uint8_t const CMD32 = 0X20;
/** ERASE_WR_BLK_END - sets the address of the last block of the continuous
range to be erased*/
uint8_t const CMD33 = 0X21;
/** ERASE - erase all previously selected blocks */
uint8_t const CMD38 = 0X26;
/** APP_CMD - escape for application specific command */
uint8_t const CMD55 = 0X37;
/** READ_OCR - read the OCR register of a card */
uint8_t const CMD58 = 0X3A;
/** SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be
pre-erased before writing */
uint8_t const ACMD23 = 0X17;
/** SD_SEND_OP_COMD - Sends host capacity support information and
activates the card's initialization process */
uint8_t const ACMD41 = 0X29;
//------------------------------------------------------------------------------
/** status for card in the ready state */ /** status for card in the ready state */
uint8_t const R1_READY_STATE = 0X00; uint8_t const R1_READY_STATE = 0x00;
/** status for card in the idle state */ /** status for card in the idle state */
uint8_t const R1_IDLE_STATE = 0X01; uint8_t const R1_IDLE_STATE = 0x01;
/** status bit for illegal command */ /** status bit for illegal command */
uint8_t const R1_ILLEGAL_COMMAND = 0X04; uint8_t const R1_ILLEGAL_COMMAND = 0x04;
/** start data token for read or write single block*/ /** start data token for read or write single block*/
uint8_t const DATA_START_BLOCK = 0XFE; uint8_t const DATA_START_BLOCK = 0xFE;
/** stop token for write multiple blocks*/ /** stop token for write multiple blocks*/
uint8_t const STOP_TRAN_TOKEN = 0XFD; uint8_t const STOP_TRAN_TOKEN = 0xFD;
/** start data token for write multiple blocks*/ /** start data token for write multiple blocks*/
uint8_t const WRITE_MULTIPLE_TOKEN = 0XFC; uint8_t const WRITE_MULTIPLE_TOKEN = 0xFC;
/** mask for data response tokens after a write block operation */ /** mask for data response tokens after a write block operation */
uint8_t const DATA_RES_MASK = 0X1F; uint8_t const DATA_RES_MASK = 0x1F;
/** write data accepted token */ /** write data accepted token */
uint8_t const DATA_RES_ACCEPTED = 0X05; uint8_t const DATA_RES_ACCEPTED = 0x05;
//------------------------------------------------------------------------------
/** Card IDentification (CID) register */ /** Card IDentification (CID) register */
typedef struct CID { typedef struct CID {
// byte 0 // byte 0
@@ -134,7 +113,7 @@ typedef struct CID {
/** CRC7 checksum */ /** CRC7 checksum */
unsigned char crc : 7; unsigned char crc : 7;
} cid_t; } cid_t;
//------------------------------------------------------------------------------
/** CSD for version 1.00 cards */ /** CSD for version 1.00 cards */
typedef struct CSDV1 { typedef struct CSDV1 {
// byte 0 // byte 0
@@ -196,14 +175,14 @@ typedef struct CSDV1 {
unsigned char always1 : 1; unsigned char always1 : 1;
unsigned char crc : 7; unsigned char crc : 7;
} csd1_t; } csd1_t;
//------------------------------------------------------------------------------
/** CSD for version 2.00 cards */ /** CSD for version 2.00 cards */
typedef struct CSDV2 { typedef struct CSDV2 {
// byte 0 // byte 0
unsigned char reserved1 : 6; unsigned char reserved1 : 6;
unsigned char csd_ver : 2; unsigned char csd_ver : 2;
// byte 1 // byte 1
/** fixed to 0X0E */ /** fixed to 0x0E */
unsigned char taac; unsigned char taac;
// byte 2 // byte 2
/** fixed to 0 */ /** fixed to 0 */
@@ -278,12 +257,11 @@ typedef struct CSDV2 {
/** checksum */ /** checksum */
unsigned char crc : 7; unsigned char crc : 7;
} csd2_t; } csd2_t;
//------------------------------------------------------------------------------
/** union of old and new style CSD register */ /** union of old and new style CSD register */
union csd_t { union csd_t {
csd1_t v1; csd1_t v1;
csd2_t v2; csd2_t v2;
}; };
#endif // SdInfo_h
#endif #endif // _SDINFO_H_

View File

@@ -26,11 +26,12 @@
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #include "MarlinConfig.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "SdVolume.h" #include "SdVolume.h"
//------------------------------------------------------------------------------
#if !USE_MULTIPLE_CARDS #if !USE_MULTIPLE_CARDS
// raw block cache // raw block cache
uint32_t SdVolume::cacheBlockNumber_; // current block number uint32_t SdVolume::cacheBlockNumber_; // current block number
@@ -39,7 +40,7 @@
bool SdVolume::cacheDirty_; // cacheFlush() will write block if true bool SdVolume::cacheDirty_; // cacheFlush() will write block if true
uint32_t SdVolume::cacheMirrorBlock_; // mirror block for second FAT uint32_t SdVolume::cacheMirrorBlock_; // mirror block for second FAT
#endif // USE_MULTIPLE_CARDS #endif // USE_MULTIPLE_CARDS
//------------------------------------------------------------------------------
// find a contiguous group of clusters // find a contiguous group of clusters
bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) { bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
// start of group // start of group
@@ -73,14 +74,14 @@ bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
// search the FAT for free clusters // search the FAT for free clusters
for (uint32_t n = 0;; n++, endCluster++) { for (uint32_t n = 0;; n++, endCluster++) {
// can't find space checked all clusters // can't find space checked all clusters
if (n >= clusterCount_) goto fail; if (n >= clusterCount_) return false;
// past end - start from beginning of FAT // past end - start from beginning of FAT
if (endCluster > fatEnd) { if (endCluster > fatEnd) {
bgnCluster = endCluster = 2; bgnCluster = endCluster = 2;
} }
uint32_t f; uint32_t f;
if (!fatGet(endCluster, &f)) goto fail; if (!fatGet(endCluster, &f)) return false;
if (f != 0) { if (f != 0) {
// cluster in use try next cluster as bgnCluster // cluster in use try next cluster as bgnCluster
@@ -92,16 +93,16 @@ bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
} }
} }
// mark end of chain // mark end of chain
if (!fatPutEOC(endCluster)) goto fail; if (!fatPutEOC(endCluster)) return false;
// link clusters // link clusters
while (endCluster > bgnCluster) { while (endCluster > bgnCluster) {
if (!fatPut(endCluster - 1, endCluster)) goto fail; if (!fatPut(endCluster - 1, endCluster)) return false;
endCluster--; endCluster--;
} }
if (*curCluster != 0) { if (*curCluster != 0) {
// connect chains // connect chains
if (!fatPut(*curCluster, bgnCluster)) goto fail; if (!fatPut(*curCluster, bgnCluster)) return false;
} }
// return first cluster number to caller // return first cluster number to caller
*curCluster = bgnCluster; *curCluster = bgnCluster;
@@ -110,179 +111,156 @@ bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
if (setStart) allocSearchStart_ = bgnCluster + 1; if (setStart) allocSearchStart_ = bgnCluster + 1;
return true; return true;
fail:
return false;
} }
//------------------------------------------------------------------------------
bool SdVolume::cacheFlush() { bool SdVolume::cacheFlush() {
if (cacheDirty_) { if (cacheDirty_) {
if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data)) { if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data))
goto fail; return false;
}
// mirror FAT tables // mirror FAT tables
if (cacheMirrorBlock_) { if (cacheMirrorBlock_) {
if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data)) { if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data))
goto fail; return false;
}
cacheMirrorBlock_ = 0; cacheMirrorBlock_ = 0;
} }
cacheDirty_ = 0; cacheDirty_ = 0;
} }
return true; return true;
fail:
return false;
} }
//------------------------------------------------------------------------------
bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) { bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
if (cacheBlockNumber_ != blockNumber) { if (cacheBlockNumber_ != blockNumber) {
if (!cacheFlush()) goto fail; if (!cacheFlush()) return false;
if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) goto fail; if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) return false;
cacheBlockNumber_ = blockNumber; cacheBlockNumber_ = blockNumber;
} }
if (dirty) cacheDirty_ = true; if (dirty) cacheDirty_ = true;
return true; return true;
fail:
return false;
} }
//------------------------------------------------------------------------------
// return the size in bytes of a cluster chain // return the size in bytes of a cluster chain
bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) { bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) {
uint32_t s = 0; uint32_t s = 0;
do { do {
if (!fatGet(cluster, &cluster)) goto fail; if (!fatGet(cluster, &cluster)) return false;
s += 512UL << clusterSizeShift_; s += 512UL << clusterSizeShift_;
} while (!isEOC(cluster)); } while (!isEOC(cluster));
*size = s; *size = s;
return true; return true;
fail:
return false;
} }
//------------------------------------------------------------------------------
// Fetch a FAT entry // Fetch a FAT entry
bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) { bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) {
uint32_t lba; uint32_t lba;
if (cluster > (clusterCount_ + 1)) goto fail; if (cluster > (clusterCount_ + 1)) return false;
if (FAT12_SUPPORT && fatType_ == 12) { if (FAT12_SUPPORT && fatType_ == 12) {
uint16_t index = cluster; uint16_t index = cluster;
index += index >> 1; index += index >> 1;
lba = fatStartBlock_ + (index >> 9); lba = fatStartBlock_ + (index >> 9);
if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail; if (!cacheRawBlock(lba, CACHE_FOR_READ)) return false;
index &= 0X1FF; index &= 0x1FF;
uint16_t tmp = cacheBuffer_.data[index]; uint16_t tmp = cacheBuffer_.data[index];
index++; index++;
if (index == 512) { if (index == 512) {
if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) goto fail; if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) return false;
index = 0; index = 0;
} }
tmp |= cacheBuffer_.data[index] << 8; tmp |= cacheBuffer_.data[index] << 8;
*value = cluster & 1 ? tmp >> 4 : tmp & 0XFFF; *value = cluster & 1 ? tmp >> 4 : tmp & 0xFFF;
return true; return true;
} }
if (fatType_ == 16) {
if (fatType_ == 16)
lba = fatStartBlock_ + (cluster >> 8); lba = fatStartBlock_ + (cluster >> 8);
} else if (fatType_ == 32)
else if (fatType_ == 32) {
lba = fatStartBlock_ + (cluster >> 7); lba = fatStartBlock_ + (cluster >> 7);
} else
else {
goto fail;
}
if (lba != cacheBlockNumber_) {
if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail;
}
if (fatType_ == 16) {
*value = cacheBuffer_.fat16[cluster & 0XFF];
}
else {
*value = cacheBuffer_.fat32[cluster & 0X7F] & FAT32MASK;
}
return true;
fail:
return false; return false;
if (lba != cacheBlockNumber_ && !cacheRawBlock(lba, CACHE_FOR_READ))
return false;
*value = (fatType_ == 16) ? cacheBuffer_.fat16[cluster & 0xFF] : (cacheBuffer_.fat32[cluster & 0x7F] & FAT32MASK);
return true;
} }
//------------------------------------------------------------------------------
// Store a FAT entry // Store a FAT entry
bool SdVolume::fatPut(uint32_t cluster, uint32_t value) { bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
uint32_t lba; uint32_t lba;
// error if reserved cluster // error if reserved cluster
if (cluster < 2) goto fail; if (cluster < 2) return false;
// error if not in FAT // error if not in FAT
if (cluster > (clusterCount_ + 1)) goto fail; if (cluster > (clusterCount_ + 1)) return false;
if (FAT12_SUPPORT && fatType_ == 12) { if (FAT12_SUPPORT && fatType_ == 12) {
uint16_t index = cluster; uint16_t index = cluster;
index += index >> 1; index += index >> 1;
lba = fatStartBlock_ + (index >> 9); lba = fatStartBlock_ + (index >> 9);
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
// mirror second FAT // mirror second FAT
if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
index &= 0X1FF; index &= 0x1FF;
uint8_t tmp = value; uint8_t tmp = value;
if (cluster & 1) { if (cluster & 1) {
tmp = (cacheBuffer_.data[index] & 0XF) | tmp << 4; tmp = (cacheBuffer_.data[index] & 0xF) | tmp << 4;
} }
cacheBuffer_.data[index] = tmp; cacheBuffer_.data[index] = tmp;
index++; index++;
if (index == 512) { if (index == 512) {
lba++; lba++;
index = 0; index = 0;
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
// mirror second FAT // mirror second FAT
if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
} }
tmp = value >> 4; tmp = value >> 4;
if (!(cluster & 1)) { if (!(cluster & 1)) {
tmp = ((cacheBuffer_.data[index] & 0XF0)) | tmp >> 4; tmp = ((cacheBuffer_.data[index] & 0xF0)) | tmp >> 4;
} }
cacheBuffer_.data[index] = tmp; cacheBuffer_.data[index] = tmp;
return true; return true;
} }
if (fatType_ == 16) {
if (fatType_ == 16)
lba = fatStartBlock_ + (cluster >> 8); lba = fatStartBlock_ + (cluster >> 8);
} else if (fatType_ == 32)
else if (fatType_ == 32) {
lba = fatStartBlock_ + (cluster >> 7); lba = fatStartBlock_ + (cluster >> 7);
} else
else { return false;
goto fail;
} if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail;
// store entry // store entry
if (fatType_ == 16) { if (fatType_ == 16)
cacheBuffer_.fat16[cluster & 0XFF] = value; cacheBuffer_.fat16[cluster & 0xFF] = value;
} else
else { cacheBuffer_.fat32[cluster & 0x7F] = value;
cacheBuffer_.fat32[cluster & 0X7F] = value;
}
// mirror second FAT // mirror second FAT
if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
return true; return true;
fail:
return false;
} }
//------------------------------------------------------------------------------
// free a cluster chain // free a cluster chain
bool SdVolume::freeChain(uint32_t cluster) { bool SdVolume::freeChain(uint32_t cluster) {
uint32_t next;
// clear free cluster location // clear free cluster location
allocSearchStart_ = 2; allocSearchStart_ = 2;
do { do {
if (!fatGet(cluster, &next)) goto fail; uint32_t next;
if (!fatGet(cluster, &next)) return false;
// free cluster // free cluster
if (!fatPut(cluster, 0)) goto fail; if (!fatPut(cluster, 0)) return false;
cluster = next; cluster = next;
} while (!isEOC(cluster)); } while (!isEOC(cluster));
return true; return true;
fail:
return false;
} }
//------------------------------------------------------------------------------
/** Volume free space in clusters. /** Volume free space in clusters.
* *
* \return Count of free clusters for success or -1 if an error occurs. * \return Count of free clusters for success or -1 if an error occurs.
@@ -292,34 +270,28 @@ int32_t SdVolume::freeClusterCount() {
uint16_t n; uint16_t n;
uint32_t todo = clusterCount_ + 2; uint32_t todo = clusterCount_ + 2;
if (fatType_ == 16) { if (fatType_ == 16)
n = 256; n = 256;
} else if (fatType_ == 32)
else if (fatType_ == 32) {
n = 128; n = 128;
} else // put FAT12 here
else {
// put FAT12 here
return -1; return -1;
}
for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) { for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) {
if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1; if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1;
NOMORE(n, todo); NOMORE(n, todo);
if (fatType_ == 16) { if (fatType_ == 16) {
for (uint16_t i = 0; i < n; i++) { for (uint16_t i = 0; i < n; i++)
if (cacheBuffer_.fat16[i] == 0) free++; if (cacheBuffer_.fat16[i] == 0) free++;
} }
}
else { else {
for (uint16_t i = 0; i < n; i++) { for (uint16_t i = 0; i < n; i++)
if (cacheBuffer_.fat32[i] == 0) free++; if (cacheBuffer_.fat32[i] == 0) free++;
} }
} }
}
return free; return free;
} }
//------------------------------------------------------------------------------
/** Initialize a FAT volume. /** Initialize a FAT volume.
* *
* \param[in] dev The SD card where the volume is located. * \param[in] dev The SD card where the volume is located.
@@ -329,14 +301,12 @@ int32_t SdVolume::freeClusterCount() {
* a MBR, Master Boot Record, or zero if the device is formatted as * a MBR, Master Boot Record, or zero if the device is formatted as
* a super floppy with the FAT boot sector in block zero. * a super floppy with the FAT boot sector in block zero.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure. Reasons for * Reasons for failure include not finding a valid partition, not finding a valid
* failure include not finding a valid partition, not finding a valid
* FAT file system in the specified partition or an I/O error. * FAT file system in the specified partition or an I/O error.
*/ */
bool SdVolume::init(Sd2Card* dev, uint8_t part) { bool SdVolume::init(Sd2Card* dev, uint8_t part) {
uint32_t totalBlocks; uint32_t totalBlocks, volumeStartBlock = 0;
uint32_t volumeStartBlock = 0;
fat32_boot_t* fbs; fat32_boot_t* fbs;
sdCard_ = dev; sdCard_ = dev;
@@ -344,30 +314,26 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
allocSearchStart_ = 2; allocSearchStart_ = 2;
cacheDirty_ = 0; // cacheFlush() will write block if true cacheDirty_ = 0; // cacheFlush() will write block if true
cacheMirrorBlock_ = 0; cacheMirrorBlock_ = 0;
cacheBlockNumber_ = 0XFFFFFFFF; cacheBlockNumber_ = 0xFFFFFFFF;
// if part == 0 assume super floppy with FAT boot sector in block zero // if part == 0 assume super floppy with FAT boot sector in block zero
// if part > 0 assume mbr volume with partition table // if part > 0 assume mbr volume with partition table
if (part) { if (part) {
if (part > 4)goto fail; if (part > 4) return false;
if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail; if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
part_t* p = &cacheBuffer_.mbr.part[part - 1]; part_t* p = &cacheBuffer_.mbr.part[part - 1];
if ((p->boot & 0X7F) != 0 || if ((p->boot & 0x7F) != 0 || p->totalSectors < 100 || p->firstSector == 0)
p->totalSectors < 100 || return false; // not a valid partition
p->firstSector == 0) {
// not a valid partition
goto fail;
}
volumeStartBlock = p->firstSector; volumeStartBlock = p->firstSector;
} }
if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail; if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
fbs = &cacheBuffer_.fbs32; fbs = &cacheBuffer_.fbs32;
if (fbs->bytesPerSector != 512 || if (fbs->bytesPerSector != 512 ||
fbs->fatCount == 0 || fbs->fatCount == 0 ||
fbs->reservedSectorCount == 0 || fbs->reservedSectorCount == 0 ||
fbs->sectorsPerCluster == 0) { fbs->sectorsPerCluster == 0) {
// not valid FAT volume // not valid FAT volume
goto fail; return false;
} }
fatCount_ = fbs->fatCount; fatCount_ = fbs->fatCount;
blocksPerCluster_ = fbs->sectorsPerCluster; blocksPerCluster_ = fbs->sectorsPerCluster;
@@ -375,7 +341,7 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
clusterSizeShift_ = 0; clusterSizeShift_ = 0;
while (blocksPerCluster_ != _BV(clusterSizeShift_)) { while (blocksPerCluster_ != _BV(clusterSizeShift_)) {
// error if not power of 2 // error if not power of 2
if (clusterSizeShift_++ > 7) goto fail; if (clusterSizeShift_++ > 7) return false;
} }
blocksPerFat_ = fbs->sectorsPerFat16 ? blocksPerFat_ = fbs->sectorsPerFat16 ?
fbs->sectorsPerFat16 : fbs->sectorsPerFat32; fbs->sectorsPerFat16 : fbs->sectorsPerFat32;
@@ -404,17 +370,15 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
// FAT type is determined by cluster count // FAT type is determined by cluster count
if (clusterCount_ < 4085) { if (clusterCount_ < 4085) {
fatType_ = 12; fatType_ = 12;
if (!FAT12_SUPPORT) goto fail; if (!FAT12_SUPPORT) return false;
} }
else if (clusterCount_ < 65525) { else if (clusterCount_ < 65525)
fatType_ = 16; fatType_ = 16;
}
else { else {
rootDirStart_ = fbs->fat32RootCluster; rootDirStart_ = fbs->fat32RootCluster;
fatType_ = 32; fatType_ = 32;
} }
return true; return true;
fail:
return false;
} }
#endif
#endif // SDSUPPORT

View File

@@ -20,20 +20,20 @@
* *
*/ */
/**
* \file
* \brief SdVolume class
*/
/** /**
* Arduino SdFat Library * Arduino SdFat Library
* Copyright (C) 2009 by William Greiman * Copyright (C) 2009 by William Greiman
* *
* This file is part of the Arduino Sd2Card Library * This file is part of the Arduino Sd2Card Library
*/ */
#include "Marlin.h" #ifndef _SDVOLUME_H_
#if ENABLED(SDSUPPORT) #define _SDVOLUME_H_
#ifndef SdVolume_h
#define SdVolume_h
/**
* \file
* \brief SdVolume class
*/
#include "SdFatConfig.h" #include "SdFatConfig.h"
#include "Sd2Card.h" #include "Sd2Card.h"
#include "SdFatStructs.h" #include "SdFatStructs.h"
@@ -44,89 +44,81 @@
* \brief Cache for an SD data block * \brief Cache for an SD data block
*/ */
union cache_t { union cache_t {
/** Used to access cached file data blocks. */ uint8_t data[512]; // Used to access cached file data blocks.
uint8_t data[512]; uint16_t fat16[256]; // Used to access cached FAT16 entries.
/** Used to access cached FAT16 entries. */ uint32_t fat32[128]; // Used to access cached FAT32 entries.
uint16_t fat16[256]; dir_t dir[16]; // Used to access cached directory entries.
/** Used to access cached FAT32 entries. */ mbr_t mbr; // Used to access a cached Master Boot Record.
uint32_t fat32[128]; fat_boot_t fbs; // Used to access to a cached FAT boot sector.
/** Used to access cached directory entries. */ fat32_boot_t fbs32; // Used to access to a cached FAT32 boot sector.
dir_t dir[16]; fat32_fsinfo_t fsinfo; // Used to access to a cached FAT32 FSINFO sector.
/** Used to access a cached Master Boot Record. */
mbr_t mbr;
/** Used to access to a cached FAT boot sector. */
fat_boot_t fbs;
/** Used to access to a cached FAT32 boot sector. */
fat32_boot_t fbs32;
/** Used to access to a cached FAT32 FSINFO sector. */
fat32_fsinfo_t fsinfo;
}; };
//------------------------------------------------------------------------------
/** /**
* \class SdVolume * \class SdVolume
* \brief Access FAT16 and FAT32 volumes on SD and SDHC cards. * \brief Access FAT16 and FAT32 volumes on SD and SDHC cards.
*/ */
class SdVolume { class SdVolume {
public: public:
/** Create an instance of SdVolume */ // Create an instance of SdVolume
SdVolume() : fatType_(0) {} SdVolume() : fatType_(0) {}
/** Clear the cache and returns a pointer to the cache. Used by the WaveRP /**
* Clear the cache and returns a pointer to the cache. Used by the WaveRP
* recorder to do raw write to the SD card. Not for normal apps. * recorder to do raw write to the SD card. Not for normal apps.
* \return A pointer to the cache buffer or zero if an error occurs. * \return A pointer to the cache buffer or zero if an error occurs.
*/ */
cache_t* cacheClear() { cache_t* cacheClear() {
if (!cacheFlush()) return 0; if (!cacheFlush()) return 0;
cacheBlockNumber_ = 0XFFFFFFFF; cacheBlockNumber_ = 0xFFFFFFFF;
return &cacheBuffer_; return &cacheBuffer_;
} }
/** Initialize a FAT volume. Try partition one first then try super
/**
* Initialize a FAT volume. Try partition one first then try super
* floppy format. * floppy format.
* *
* \param[in] dev The Sd2Card where the volume is located. * \param[in] dev The Sd2Card where the volume is located.
* *
* \return The value one, true, is returned for success and * \return true for success, false for failure.
* the value zero, false, is returned for failure. Reasons for * Reasons for failure include not finding a valid partition, not finding
* failure include not finding a valid partition, not finding a valid * a valid FAT file system or an I/O error.
* FAT file system or an I/O error.
*/ */
bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0); } bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0); }
bool init(Sd2Card* dev, uint8_t part); bool init(Sd2Card* dev, uint8_t part);
// inline functions that return volume info // inline functions that return volume info
/** \return The volume's cluster size in blocks. */ uint8_t blocksPerCluster() const { return blocksPerCluster_; } //> \return The volume's cluster size in blocks.
uint8_t blocksPerCluster() const {return blocksPerCluster_;} uint32_t blocksPerFat() const { return blocksPerFat_; } //> \return The number of blocks in one FAT.
/** \return The number of blocks in one FAT. */ uint32_t clusterCount() const { return clusterCount_; } //> \return The total number of clusters in the volume.
uint32_t blocksPerFat() const {return blocksPerFat_;} uint8_t clusterSizeShift() const { return clusterSizeShift_; } //> \return The shift count required to multiply by blocksPerCluster.
/** \return The total number of clusters in the volume. */ uint32_t dataStartBlock() const { return dataStartBlock_; } //> \return The logical block number for the start of file data.
uint32_t clusterCount() const {return clusterCount_;} uint8_t fatCount() const { return fatCount_; } //> \return The number of FAT structures on the volume.
/** \return The shift count required to multiply by blocksPerCluster. */ uint32_t fatStartBlock() const { return fatStartBlock_; } //> \return The logical block number for the start of the first FAT.
uint8_t clusterSizeShift() const {return clusterSizeShift_;} uint8_t fatType() const { return fatType_; } //> \return The FAT type of the volume. Values are 12, 16 or 32.
/** \return The logical block number for the start of file data. */
uint32_t dataStartBlock() const {return dataStartBlock_;}
/** \return The number of FAT structures on the volume. */
uint8_t fatCount() const {return fatCount_;}
/** \return The logical block number for the start of the first FAT. */
uint32_t fatStartBlock() const {return fatStartBlock_;}
/** \return The FAT type of the volume. Values are 12, 16 or 32. */
uint8_t fatType() const {return fatType_;}
int32_t freeClusterCount(); int32_t freeClusterCount();
/** \return The number of entries in the root directory for FAT16 volumes. */ uint32_t rootDirEntryCount() const { return rootDirEntryCount_; } /** \return The number of entries in the root directory for FAT16 volumes. */
uint32_t rootDirEntryCount() const {return rootDirEntryCount_;}
/** \return The logical block number for the start of the root directory /**
on FAT16 volumes or the first cluster number on FAT32 volumes. */ * \return The logical block number for the start of the root directory
* on FAT16 volumes or the first cluster number on FAT32 volumes.
*/
uint32_t rootDirStart() const { return rootDirStart_; } uint32_t rootDirStart() const { return rootDirStart_; }
/** Sd2Card object for this volume
/**
* Sd2Card object for this volume
* \return pointer to Sd2Card object. * \return pointer to Sd2Card object.
*/ */
Sd2Card* sdCard() { return sdCard_; } Sd2Card* sdCard() { return sdCard_; }
/** Debug access to FAT table
/**
* Debug access to FAT table
* *
* \param[in] n cluster number. * \param[in] n cluster number.
* \param[out] v value of entry * \param[out] v value of entry
* \return true for success or false for failure * \return true for success or false for failure
*/ */
bool dbgFat(uint32_t n, uint32_t* v) { return fatGet(n, v); } bool dbgFat(uint32_t n, uint32_t* v) { return fatGet(n, v); }
//------------------------------------------------------------------------------
private: private:
// Allow SdBaseFile access to SdVolume private data. // Allow SdBaseFile access to SdVolume private data.
friend class SdBaseFile; friend class SdBaseFile;
@@ -142,13 +134,14 @@ class SdVolume {
Sd2Card* sdCard_; // Sd2Card object for cache Sd2Card* sdCard_; // Sd2Card object for cache
bool cacheDirty_; // cacheFlush() will write block if true bool cacheDirty_; // cacheFlush() will write block if true
uint32_t cacheMirrorBlock_; // block number for mirror FAT uint32_t cacheMirrorBlock_; // block number for mirror FAT
#else // USE_MULTIPLE_CARDS #else
static cache_t cacheBuffer_; // 512 byte cache for device blocks static cache_t cacheBuffer_; // 512 byte cache for device blocks
static uint32_t cacheBlockNumber_; // Logical number of block in the cache static uint32_t cacheBlockNumber_; // Logical number of block in the cache
static Sd2Card* sdCard_; // Sd2Card object for cache static Sd2Card* sdCard_; // Sd2Card object for cache
static bool cacheDirty_; // cacheFlush() will write block if true static bool cacheDirty_; // cacheFlush() will write block if true
static uint32_t cacheMirrorBlock_; // block number for mirror FAT static uint32_t cacheMirrorBlock_; // block number for mirror FAT
#endif // USE_MULTIPLE_CARDS #endif
uint32_t allocSearchStart_; // start cluster for alloc search uint32_t allocSearchStart_; // start cluster for alloc search
uint8_t blocksPerCluster_; // cluster size in blocks uint8_t blocksPerCluster_; // cluster size in blocks
uint32_t blocksPerFat_; // FAT size in blocks uint32_t blocksPerFat_; // FAT size in blocks
@@ -160,26 +153,23 @@ class SdVolume {
uint8_t fatType_; // volume type (12, 16, OR 32) uint8_t fatType_; // volume type (12, 16, OR 32)
uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir
uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32 uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32
//----------------------------------------------------------------------------
bool allocContiguous(uint32_t count, uint32_t* curCluster); bool allocContiguous(uint32_t count, uint32_t* curCluster);
uint8_t blockOfCluster(uint32_t position) const { uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); }
return (position >> 9) & (blocksPerCluster_ - 1); uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); }
} uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); }
uint32_t clusterStartBlock(uint32_t cluster) const {
return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_);
}
uint32_t blockNumber(uint32_t cluster, uint32_t position) const {
return clusterStartBlock(cluster) + blockOfCluster(position);
}
cache_t* cache() { return &cacheBuffer_; } cache_t* cache() { return &cacheBuffer_; }
uint32_t cacheBlockNumber() {return cacheBlockNumber_;} uint32_t cacheBlockNumber() const { return cacheBlockNumber_; }
#if USE_MULTIPLE_CARDS #if USE_MULTIPLE_CARDS
bool cacheFlush(); bool cacheFlush();
bool cacheRawBlock(uint32_t blockNumber, bool dirty); bool cacheRawBlock(uint32_t blockNumber, bool dirty);
#else // USE_MULTIPLE_CARDS #else
static bool cacheFlush(); static bool cacheFlush();
static bool cacheRawBlock(uint32_t blockNumber, bool dirty); static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
#endif // USE_MULTIPLE_CARDS #endif
// used by SdBaseFile write to assign cache to SD location // used by SdBaseFile write to assign cache to SD location
void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) { void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) {
cacheDirty_ = dirty; cacheDirty_ = dirty;
@@ -189,39 +179,33 @@ class SdVolume {
bool chainSize(uint32_t beginCluster, uint32_t* size); bool chainSize(uint32_t beginCluster, uint32_t* size);
bool fatGet(uint32_t cluster, uint32_t* value); bool fatGet(uint32_t cluster, uint32_t* value);
bool fatPut(uint32_t cluster, uint32_t value); bool fatPut(uint32_t cluster, uint32_t value);
bool fatPutEOC(uint32_t cluster) { bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); }
return fatPut(cluster, 0x0FFFFFFF);
}
bool freeChain(uint32_t cluster); bool freeChain(uint32_t cluster);
bool isEOC(uint32_t cluster) const { bool isEOC(uint32_t cluster) const {
if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN; if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN;
if (fatType_ == 16) return cluster >= FAT16EOC_MIN; if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
return cluster >= FAT32EOC_MIN; return cluster >= FAT32EOC_MIN;
} }
bool readBlock(uint32_t block, uint8_t* dst) { bool readBlock(uint32_t block, uint8_t* dst) { return sdCard_->readBlock(block, dst); }
return sdCard_->readBlock(block, dst); bool writeBlock(uint32_t block, const uint8_t* dst) { return sdCard_->writeBlock(block, dst); }
}
bool writeBlock(uint32_t block, const uint8_t* dst) { // Deprecated functions
return sdCard_->writeBlock(block, dst); #if ALLOW_DEPRECATED_FUNCTIONS
}
//------------------------------------------------------------------------------
// Deprecated functions - suppress cpplint warnings with NOLINT comment
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
public: public:
/** \deprecated Use: bool SdVolume::init(Sd2Card* dev); /**
* \deprecated Use: bool SdVolume::init(Sd2Card* dev);
* \param[in] dev The SD card where the volume is located. * \param[in] dev The SD card where the volume is located.
* \return true for success or false for failure. * \return true for success or false for failure.
*/ */
bool init(Sd2Card& dev) {return init(&dev);} // NOLINT bool init(Sd2Card& dev) { return init(&dev); }
/** \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol); /**
* \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
* \param[in] dev The SD card where the volume is located. * \param[in] dev The SD card where the volume is located.
* \param[in] part The partition to be used. * \param[in] part The partition to be used.
* \return true for success or false for failure. * \return true for success or false for failure.
*/ */
bool init(Sd2Card& dev, uint8_t part) { // NOLINT bool init(Sd2Card& dev, uint8_t part) { return init(&dev, part); }
return init(&dev, part);
}
#endif // ALLOW_DEPRECATED_FUNCTIONS #endif // ALLOW_DEPRECATED_FUNCTIONS
}; };
#endif // SdVolume
#endif #endif // _SDVOLUME_H_

View File

@@ -35,7 +35,7 @@
/** /**
* Marlin release version identifier * Marlin release version identifier
*/ */
#define SHORT_BUILD_VERSION "1.1.0-RC7" #define SHORT_BUILD_VERSION "bugfix-1.1.x"
/** /**
* Verbose version identifier which should contain a reference to the location * Verbose version identifier which should contain a reference to the location
@@ -48,7 +48,7 @@
* here we define this default string as the date where the latest release * here we define this default string as the date where the latest release
* version was tagged. * version was tagged.
*/ */
#define STRING_DISTRIBUTION_DATE "2016-07-31 12:00" #define STRING_DISTRIBUTION_DATE "2018-07-31"
/** /**
* Required minimum Configuration.h and Configuration_adv.h file versions. * Required minimum Configuration.h and Configuration_adv.h file versions.
@@ -57,11 +57,13 @@
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
* the configuration files. * the configuration files.
*/ */
#define REQUIRED_CONFIGURATION_H_VERSION 010100 #define REQUIRED_CONFIGURATION_H_VERSION 010109
#define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100 #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010109
/** /**
* @todo: Missing documentation block * 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" #define PROTOCOL_VERSION "1.0"

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

@@ -21,26 +21,26 @@
*/ */
/** /**
* blinkm.cpp - Library for controlling a BlinkM over i2c * blinkm.cpp - Control a BlinkM over i2c
* Created by Tim Koster, August 21 2013.
*/ */
#include "Marlin.h" #include "MarlinConfig.h"
#if ENABLED(BLINKM) #if ENABLED(BLINKM)
#include "blinkm.h" #include "blinkm.h"
#include "leds.h"
#include <Wire.h>
void SendColors(byte red, byte grn, byte blu) { void blinkm_set_led_color(const LEDColor &color) {
Wire.begin(); Wire.begin();
Wire.beginTransmission(0x09); Wire.beginTransmission(0x09);
Wire.write('o'); //to disable ongoing script, only needs to be used once Wire.write('o'); //to disable ongoing script, only needs to be used once
Wire.write('n'); Wire.write('n');
Wire.write(red); Wire.write(color.r);
Wire.write(grn); Wire.write(color.g);
Wire.write(blu); Wire.write(color.b);
Wire.endTransmission(); Wire.endTransmission();
} }
#endif // BLINKM #endif // BLINKM

View File

@@ -21,11 +21,15 @@
*/ */
/** /**
* blinkm.h - Library for controlling a BlinkM over i2c * blinkm.h - Control a BlinkM over i2c
* Created by Tim Koster, August 21 2013.
*/ */
#include "Arduino.h" #ifndef _BLINKM_H_
#include "Wire.h" #define _BLINKM_H_
void SendColors(byte red, byte grn, byte blu); struct LEDColor;
typedef LEDColor LEDColor;
void blinkm_set_led_color(const LEDColor &color);
#endif // _BLINKM_H_

View File

@@ -25,76 +25,138 @@
#define BOARD_UNKNOWN -1 #define BOARD_UNKNOWN -1
#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 // RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
#define BOARD_GEN7_13 12 // Gen7 v1.3 //
#define BOARD_GEN7_14 13 // Gen7 v1.4
#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_SETHI 20 // Sethi 3D_1
#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2 #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_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_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_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_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_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
#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_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed) #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_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_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_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_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
#define BOARD_GEN6 5 // Gen6
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe #define BOARD_RAMPS_PLUS_EFB 143 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
#define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2 #define BOARD_RAMPS_PLUS_EEB 144 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_SANGUINOLOLU_12 62 // Sanguinololu 1.2 and above #define BOARD_RAMPS_PLUS_EFF 145 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_MELZI 63 // Melzi #define BOARD_RAMPS_PLUS_EEF 146 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_STB_11 64 // STB V1.1 #define BOARD_RAMPS_PLUS_SF 148 // RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
#define BOARD_AZTEEG_X1 65 // Azteeg X1
#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version) //
#define BOARD_AZTEEG_X3 67 // Azteeg X3 // RAMPS Derivatives - ATmega1280, ATmega2560
#define BOARD_AZTEEG_X3_PRO 68 // Azteeg X3 Pro //
#define BOARD_ULTIMAKER 7 // Ultimaker
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_3DRAG 77 // 3Drag Controller #define BOARD_3DRAG 77 // 3Drag Controller
#define BOARD_K8200 78 // Velleman K8200 Controller (derived from 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_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller)
#define BOARD_TEENSYLU 8 // Teensylu #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_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 81 // Printrboard (AT90USB1286)
#define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286) #define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286)
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646) #define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286) #define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
#define BOARD_GEN3_PLUS 9 // Gen3+ #define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics #define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make
#define BOARD_MEGATRONICS 70 // Megatronics
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
#define BOARD_MINITRONICS 702 // Minitronics v1.0/1.1
#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_RAMBO 301 // Rambo
#define BOARD_MINIRAMBO 302 // Mini-Rambo
#define BOARD_AJ4P 303 // AJ4P
#define BOARD_MEGACONTROLLER 310 // Mega controller
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board #define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
#define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_MKS_BASE 40 // MKS BASE 1.0
#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher)
#define BOARD_SAINSMART_2IN1 49 // Sainsmart 2-in-1 board
#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_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D
#define BOARD_99 99 // This is in pins.h but...? #define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)
#define MB(board) (MOTHERBOARD==BOARD_##board)
#endif // __BOARDS_H #endif // __BOARDS_H

View File

@@ -104,12 +104,13 @@ class Buzzer {
* @param duration Duration of the tone in milliseconds * @param duration Duration of the tone in milliseconds
* @param frequency Frequency of the tone in hertz * @param frequency Frequency of the tone in hertz
*/ */
void tone(uint16_t const &duration, uint16_t const &frequency = 0) { void tone(const uint16_t &duration, const uint16_t &frequency=0) {
while (buffer.isFull()) { while (buffer.isFull()) {
this->tick(); this->tick();
thermalManager.manage_heater(); thermalManager.manage_heater();
} }
this->buffer.enqueue((tone_t) { duration, frequency }); tone_t tone = { duration, frequency };
this->buffer.enqueue(tone);
} }
/** /**

File diff suppressed because it is too large Load Diff

View File

@@ -20,41 +20,44 @@
* *
*/ */
#ifndef CARDREADER_H #ifndef _CARDREADER_H_
#define CARDREADER_H #define _CARDREADER_H_
#include "MarlinConfig.h" #include "MarlinConfig.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#define SD_RESORT ENABLED(SDCARD_SORT_ALPHA) && ENABLED(SDSORT_DYNAMIC_RAM)
#define MAX_DIR_DEPTH 10 // Maximum folder depth #define MAX_DIR_DEPTH 10 // Maximum folder depth
#include "SdFile.h" #include "SdFile.h"
#include "types.h"
#include "enum.h"
class CardReader { class CardReader {
public: public:
CardReader(); CardReader();
void initsd(); void initsd();
void write_command(char *buf); void write_command(char *buf);
//files auto[0-9].g on the sd card are performed in a row
//this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
void checkautostart(bool x); void beginautostart();
void openFile(char* name, bool read, bool push_current=false); void checkautostart();
void openLogFile(char* name);
void removeFile(char* name); void openFile(char * const path, const bool read, const bool subcall=false);
void closefile(bool store_location=false); void openLogFile(char * const path);
void removeFile(const char * const name);
void closefile(const bool store_location=false);
void release(); void release();
void openAndPrintFile(const char *name); void openAndPrintFile(const char *name);
void startFileprint(); void startFileprint();
void pauseSDPrint(); void stopSDPrint(
void stopSDPrint(); #if SD_RESORT
const bool re_sort=false
#endif
);
void getStatus(); void getStatus();
void printingHasFinished(); void printingHasFinished();
void printFilename();
#if ENABLED(LONG_FILENAME_HOST_SUPPORT) #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
void printLongPath(char *path); void printLongPath(char *path);
@@ -67,63 +70,161 @@ public:
void ls(); void ls();
void chdir(const char *relpath); void chdir(const char *relpath);
void updir(); int8_t updir();
void setroot(); 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 isFileOpen() { return file.isOpen(); }
FORCE_INLINE bool eof() { return sdpos >= filesize; } FORCE_INLINE bool eof() { return sdpos >= filesize; }
FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); } FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
FORCE_INLINE void setIndex(long index) { sdpos = index; file.seekSet(index); } 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 uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; }
FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; } 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: public:
bool saving, logging, sdprinting, cardOK, filenameIsDir; bool saving, logging, sdprinting, cardOK, filenameIsDir, abort_sd_printing;
char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH]; char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
int autostart_index; int8_t autostart_index;
private: private:
SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH]; SdFile root, workDir, workDirParents[MAX_DIR_DEPTH];
uint8_t workDirDepth; uint8_t workDirDepth;
Sd2Card card;
// 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; SdVolume volume;
SdFile file; SdFile file;
#if ENABLED(POWER_LOSS_RECOVERY)
SdFile jobRecoveryFile;
#endif
#define SD_PROCEDURE_DEPTH 1 #define SD_PROCEDURE_DEPTH 1
#define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1) #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
uint8_t file_subcall_ctr; uint8_t file_subcall_ctr;
uint32_t filespos[SD_PROCEDURE_DEPTH]; uint32_t filespos[SD_PROCEDURE_DEPTH];
char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH]; char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
uint32_t filesize; uint32_t filesize, sdpos;
uint32_t sdpos;
millis_t next_autostart_ms;
bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
LsAction lsAction; //stored for recursion. 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. 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; char* diveDirName;
void lsDive(const char *prepend, SdFile parent, const char * const match=NULL); 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
}; };
extern CardReader card;
#define IS_SD_PRINTING (card.sdprinting)
#if PIN_EXISTS(SD_DETECT) #if PIN_EXISTS(SD_DETECT)
#if ENABLED(SD_DETECT_INVERTED) #if ENABLED(SD_DETECT_INVERTED)
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) != 0) #define IS_SD_INSERTED() READ(SD_DETECT_PIN)
#else #else
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) == 0) #define IS_SD_INSERTED() !READ(SD_DETECT_PIN)
#endif #endif
#else #else
// No card detect line? Assume the card is inserted. // No card detect line? Assume the card is inserted.
#define IS_SD_INSERTED true #define IS_SD_INSERTED() true
#endif #endif
#else extern CardReader card;
#define IS_SD_PRINTING (false)
#endif // SDSUPPORT #endif // SDSUPPORT
#endif //__CARDREADER_H #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_

File diff suppressed because it is too large Load Diff

View File

@@ -25,20 +25,77 @@
#include "MarlinConfig.h" #include "MarlinConfig.h"
void Config_ResetDefault(); class MarlinSettings {
public:
MarlinSettings() { }
#if DISABLED(DISABLE_M503) static uint16_t datasize();
void Config_PrintSettings(bool forReplay=false);
#else static void reset();
FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {} static bool save(); // Return 'true' if data was saved
FORCE_INLINE static bool init_eeprom() {
reset();
#if ENABLED(EEPROM_SETTINGS)
const bool success = save();
#if ENABLED(EEPROM_CHITCHAT)
if (success) report();
#endif #endif
return success;
#else
return true;
#endif
}
#if ENABLED(EEPROM_SETTINGS) #if ENABLED(EEPROM_SETTINGS)
void Config_StoreSettings(); static bool load(); // Return 'true' if data was loaded ok
void Config_RetrieveSettings(); 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
static uint16_t meshes_start_index();
FORCE_INLINE static uint16_t meshes_end_index() { return meshes_end; }
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=NULL);
//static void delete_mesh(); // necessary if we have a MAT
//static void defrag_meshes(); // "
#endif
#else #else
FORCE_INLINE void Config_StoreSettings() {} FORCE_INLINE
FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); } static bool load() { reset(); report(); return true; }
#endif #endif
#if DISABLED(DISABLE_M503)
static void report(const bool forReplay=false);
#else
FORCE_INLINE
static void report(const bool forReplay=false) { UNUSED(forReplay); }
#endif
private:
static void postprocess();
#if ENABLED(EEPROM_SETTINGS)
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 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 #endif // CONFIGURATION_STORE_H

View File

@@ -30,11 +30,14 @@
* http://arduino.cc/forum/index.php/topic,51842.0.html * http://arduino.cc/forum/index.php/topic,51842.0.html
*/ */
#include "dac_mcp4728.h" #include "MarlinConfig.h"
#if ENABLED(DAC_STEPPER_CURRENT) #if ENABLED(DAC_STEPPER_CURRENT)
uint16_t mcp4728_values[4]; #include "dac_mcp4728.h"
#include "enum.h"
uint16_t mcp4728_values[XYZE];
/** /**
* Begin I2C, get current values (input register and eeprom) of mcp4728 * Begin I2C, get current values (input register and eeprom) of mcp4728
@@ -43,15 +46,12 @@ void mcp4728_init() {
Wire.begin(); Wire.begin();
Wire.requestFrom(int(DAC_DEV_ADDRESS), 24); Wire.requestFrom(int(DAC_DEV_ADDRESS), 24);
while (Wire.available()) { while (Wire.available()) {
int deviceID = Wire.read(); char deviceID = Wire.read(),
int hiByte = Wire.read(); hiByte = Wire.read(),
int loByte = Wire.read(); loByte = Wire.read();
int isEEPROM = (deviceID & 0B00001000) >> 3; if (!(deviceID & 0x08))
int channel = (deviceID & 0B00110000) >> 4; mcp4728_values[(deviceID & 0x30) >> 4] = word((hiByte & 0x0F), loByte);
if (isEEPROM != 1) {
mcp4728_values[channel] = word((hiByte & 0B00001111), loByte);
}
} }
} }
@@ -63,6 +63,7 @@ uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value) {
mcp4728_values[channel] = value; mcp4728_values[channel] = value;
return mcp4728_fastWrite(); return mcp4728_fastWrite();
} }
/** /**
* Write all input resistor values to EEPROM using SequencialWrite method. * Write all input resistor values to EEPROM using SequencialWrite method.
* This will update both input register and EEPROM value * This will update both input register and EEPROM value
@@ -71,9 +72,9 @@ uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value) {
uint8_t mcp4728_eepromWrite() { uint8_t mcp4728_eepromWrite() {
Wire.beginTransmission(DAC_DEV_ADDRESS); Wire.beginTransmission(DAC_DEV_ADDRESS);
Wire.write(SEQWRITE); Wire.write(SEQWRITE);
for (uint8_t channel=0; channel <= 3; channel++) { LOOP_XYZE(i) {
Wire.write(DAC_STEPPER_VREF << 7 | 0 << 5 | DAC_STEPPER_GAIN << 4 | highByte(mcp4728_values[channel])); Wire.write(DAC_STEPPER_VREF << 7 | DAC_STEPPER_GAIN << 4 | highByte(mcp4728_values[i]));
Wire.write(lowByte(mcp4728_values[channel])); Wire.write(lowByte(mcp4728_values[i]));
} }
return Wire.endTransmission(); return Wire.endTransmission();
} }
@@ -83,7 +84,7 @@ uint8_t mcp4728_eepromWrite() {
*/ */
uint8_t mcp4728_setVref_all(uint8_t value) { uint8_t mcp4728_setVref_all(uint8_t value) {
Wire.beginTransmission(DAC_DEV_ADDRESS); Wire.beginTransmission(DAC_DEV_ADDRESS);
Wire.write(VREFWRITE | value << 3 | value << 2 | value << 1 | value); Wire.write(VREFWRITE | (value ? 0x0F : 0x00));
return Wire.endTransmission(); return Wire.endTransmission();
} }
/** /**
@@ -91,12 +92,12 @@ uint8_t mcp4728_setVref_all(uint8_t value) {
*/ */
uint8_t mcp4728_setGain_all(uint8_t value) { uint8_t mcp4728_setGain_all(uint8_t value) {
Wire.beginTransmission(DAC_DEV_ADDRESS); Wire.beginTransmission(DAC_DEV_ADDRESS);
Wire.write(GAINWRITE | value << 3 | value << 2 | value << 1 | value); Wire.write(GAINWRITE | (value ? 0x0F : 0x00));
return Wire.endTransmission(); return Wire.endTransmission();
} }
/** /**
* Return Input Regiter value * Return Input Register value
*/ */
uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; } uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; }
@@ -105,13 +106,27 @@ uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; }
* Return Vout * Return Vout
* *
uint16_t mcp4728_getVout(uint8_t channel) { uint16_t mcp4728_getVout(uint8_t channel) {
uint32_t vref = 2048; uint32_t vref = 2048,
uint32_t vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096; vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096;
if (vOut > defaultVDD) vOut = defaultVDD; if (vOut > defaultVDD) vOut = defaultVDD;
return vOut; return vOut;
} }
*/ */
/**
* Returns DAC values as a 0-100 percentage of drive strength
*/
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(uint8_t pct[XYZE]) {
LOOP_XYZE(i) mcp4728_values[i] = 0.01 * pct[i] * (DAC_STEPPER_MAX);
mcp4728_fastWrite();
}
/** /**
* FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1 * FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1
* DAC Input and PowerDown bits update. * DAC Input and PowerDown bits update.
@@ -119,9 +134,9 @@ uint16_t mcp4728_getVout(uint8_t channel) {
*/ */
uint8_t mcp4728_fastWrite() { uint8_t mcp4728_fastWrite() {
Wire.beginTransmission(DAC_DEV_ADDRESS); Wire.beginTransmission(DAC_DEV_ADDRESS);
for (uint8_t channel=0; channel <= 3; channel++) { LOOP_XYZE(i) {
Wire.write(highByte(mcp4728_values[channel])); Wire.write(highByte(mcp4728_values[i]));
Wire.write(lowByte(mcp4728_values[channel])); Wire.write(lowByte(mcp4728_values[i]));
} }
return Wire.endTransmission(); return Wire.endTransmission();
} }

View File

@@ -24,15 +24,15 @@
* Arduino library for MicroChip MCP4728 I2C D/A converter. * Arduino library for MicroChip MCP4728 I2C D/A converter.
*/ */
#ifndef mcp4728_h #ifndef DAC_MCP4728_H
#define mcp4728_h #define DAC_MCP4728_H
#include "MarlinConfig.h" #include "MarlinConfig.h"
#if ENABLED(DAC_STEPPER_CURRENT) #if ENABLED(DAC_STEPPER_CURRENT)
#include "Wire.h" #include "Wire.h"
#define defaultVDD 5000 #define defaultVDD DAC_STEPPER_MAX //was 5000 but differs with internal Vref
#define BASE_ADDR 0x60 #define BASE_ADDR 0x60
#define RESET 0B00000110 #define RESET 0B00000110
#define WAKE 0B00001001 #define WAKE 0B00001001
@@ -59,7 +59,8 @@ uint8_t mcp4728_setGain_all(uint8_t value);
uint16_t mcp4728_getValue(uint8_t channel); uint16_t mcp4728_getValue(uint8_t channel);
uint8_t mcp4728_fastWrite(); uint8_t mcp4728_fastWrite();
uint8_t mcp4728_simpleCommand(byte simpleCommand); uint8_t mcp4728_simpleCommand(byte simpleCommand);
uint8_t mcp4728_getDrvPct(uint8_t channel);
void mcp4728_setDrvPct(uint8_t pct[XYZE]);
#endif #endif
#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

106
Marlin/digipot_mcp4018.cpp Normal file
View File

@@ -0,0 +1,106 @@
/**
* 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(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
#define DIGIPOT_A4988_Itripmax(Vref) ((Vref)/(8.0*DIGIPOT_A4988_Rsx))
#define DIGIPOT_A4988_FACTOR ((DIGIPOT_A4988_MAX_VALUE)/DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax))
#define DIGIPOT_A4988_MAX_CURRENT 2.0
static byte current_to_wiper(const float current) {
const int16_t value = ceil(float(DIGIPOT_A4988_FACTOR) * current);
return byte(constrain(value, 0, DIGIPOT_A4988_MAX_VALUE));
}
const uint8_t sda_pins[DIGIPOT_I2C_NUM_CHANNELS] = {
DIGIPOTS_I2C_SDA_X
#if DIGIPOT_I2C_NUM_CHANNELS > 1
, DIGIPOTS_I2C_SDA_Y
#if DIGIPOT_I2C_NUM_CHANNELS > 2
, DIGIPOTS_I2C_SDA_Z
#if DIGIPOT_I2C_NUM_CHANNELS > 3
, DIGIPOTS_I2C_SDA_E0
#if DIGIPOT_I2C_NUM_CHANNELS > 4
, DIGIPOTS_I2C_SDA_E1
#endif
#endif
#endif
#endif
};
static SlowSoftI2CMaster pots[DIGIPOT_I2C_NUM_CHANNELS] = {
SlowSoftI2CMaster { sda_pins[X_AXIS], DIGIPOTS_I2C_SCL }
#if DIGIPOT_I2C_NUM_CHANNELS > 1
, SlowSoftI2CMaster { sda_pins[Y_AXIS], DIGIPOTS_I2C_SCL }
#if DIGIPOT_I2C_NUM_CHANNELS > 2
, SlowSoftI2CMaster { sda_pins[Z_AXIS], DIGIPOTS_I2C_SCL }
#if DIGIPOT_I2C_NUM_CHANNELS > 3
, SlowSoftI2CMaster { sda_pins[E_AXIS], DIGIPOTS_I2C_SCL }
#if DIGIPOT_I2C_NUM_CHANNELS > 4
, SlowSoftI2CMaster { sda_pins[E_AXIS + 1], DIGIPOTS_I2C_SCL }
#endif
#endif
#endif
#endif
};
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) << 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(uint8_t channel, float current) {
i2c_send(channel, current_to_wiper(MIN(MAX(current, 0), float(DIGIPOT_A4988_MAX_CURRENT))));
}
void digipot_i2c_init() {
static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
for (uint8_t i = 0; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
pots[i].i2c_init();
// 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]));
}
#endif // DIGIPOT_I2C && DIGIPOT_MCP4018

View File

@@ -22,7 +22,7 @@
#include "MarlinConfig.h" #include "MarlinConfig.h"
#if ENABLED(DIGIPOT_I2C) #if ENABLED(DIGIPOT_I2C) && DISABLED(DIGIPOT_MCP4018)
#include "Stream.h" #include "Stream.h"
#include "utility/twi.h" #include "utility/twi.h"
@@ -37,11 +37,11 @@
#define DIGIPOT_I2C_MAX_CURRENT 2.5 #define DIGIPOT_I2C_MAX_CURRENT 2.5
#endif #endif
static byte current_to_wiper(float current) { static byte current_to_wiper(const float current) {
return byte(ceil(float((DIGIPOT_I2C_FACTOR * current)))); return byte(CEIL(float((DIGIPOT_I2C_FACTOR * current))));
} }
static void i2c_send(byte addr, byte a, byte b) { static void i2c_send(const byte addr, const byte a, const byte b) {
Wire.beginTransmission(addr); Wire.beginTransmission(addr);
Wire.write(a); Wire.write(a);
Wire.write(b); Wire.write(b);
@@ -49,8 +49,8 @@ static void i2c_send(byte addr, byte a, byte b) {
} }
// This is for the MCP4451 I2C based digipot // This is for the MCP4451 I2C based digipot
void digipot_i2c_set_current(int channel, float current) { void digipot_i2c_set_current(uint8_t channel, float current) {
current = min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT); current = MIN((float) MAX(current, 0), DIGIPOT_I2C_MAX_CURRENT);
// these addresses are specific to Azteeg X3 Pro, can be set to others, // 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 // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
byte addr = 0x2C; // channel 0-3 byte addr = 0x2C; // channel 0-3
@@ -60,8 +60,8 @@ void digipot_i2c_set_current(int channel, float current) {
} }
// Initial setup // Initial setup
i2c_send(addr, 0x40, 0xff); i2c_send(addr, 0x40, 0xFF);
i2c_send(addr, 0xA0, 0xff); i2c_send(addr, 0xA0, 0xFF);
// Set actual wiper value // Set actual wiper value
byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 }; byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
@@ -69,11 +69,11 @@ void digipot_i2c_set_current(int channel, float current) {
} }
void digipot_i2c_init() { void digipot_i2c_init() {
const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS; static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
Wire.begin(); Wire.begin();
// setup initial currents as defined in Configuration_adv.h // setup initial currents as defined in Configuration_adv.h
for (int i = 0; i < COUNT(digipot_motor_current); i++) for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
digipot_i2c_set_current(i, digipot_motor_current[i]); digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
} }
#endif // DIGIPOT_I2C #endif // DIGIPOT_I2C

File diff suppressed because it is too large Load Diff

View File

@@ -32,7 +32,93 @@
Max Font ascent = 8 descent=-1 Max Font ascent = 8 descent=-1
*/ */
#include <U8glib.h> #include <U8glib.h>
const u8g_fntpgm_uint8_t ISO10646_1_5x7[2592] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
#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, 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, 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, 128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
@@ -196,3 +282,5 @@ const u8g_fntpgm_uint8_t ISO10646_1_5x7[2592] U8G_SECTION(".progmem.ISO10646_1_5
136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96, 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 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,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

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

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};

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

@@ -23,6 +23,9 @@
#ifndef __DURATION_T__ #ifndef __DURATION_T__
#define __DURATION_T__ #define __DURATION_T__
#include <stdio.h>
#include <inttypes.h>
struct duration_t { struct duration_t {
/** /**
* @brief Duration is stored in seconds * @brief Duration is stored in seconds
@@ -141,14 +144,26 @@ struct duration_t {
* @param buffer The array pointed to must be able to accommodate 10 bytes * @param buffer The array pointed to must be able to accommodate 10 bytes
* *
* Output examples: * Output examples:
* 1234567890 (strlen) * 123456789 (strlen)
* 1193046:59 * 99:59
* 11d 12:33
*/ */
void toDigital(char *buffer) const { uint8_t toDigital(char *buffer, bool with_days=false) const {
int h = this->hour() % 24, uint16_t h = uint16_t(this->hour()),
m = this->minute() % 60; m = uint16_t(this->minute() % 60UL);
if (with_days) {
sprintf_P(buffer, PSTR("%02i:%02i"), h, m); uint16_t d = this->day();
sprintf_P(buffer, PSTR("%ud %02u:%02u"), d, h % 24, m);
return d >= 10 ? 9 : 8;
}
else if (h < 100) {
sprintf_P(buffer, PSTR("%02u:%02u"), h, m);
return 5;
}
else {
sprintf_P(buffer, PSTR("%u:%02u"), h, m);
return 6;
}
} }
}; };

View File

@@ -21,33 +21,20 @@
*/ */
/** /**
* Board 99 pin assignments * emergency_parser.cpp - Intercept special commands directly in the serial stream
*/ */
#define BOARD_NAME "99 Unknown"
#define X_STEP_PIN 2 #include "MarlinConfig.h"
#define X_DIR_PIN 3
#define X_ENABLE_PIN -1
#define X_STOP_PIN 16
#define Y_STEP_PIN 5 #if ENABLED(EMERGENCY_PARSER)
#define Y_DIR_PIN 6
#define Y_ENABLE_PIN -1
#define Y_STOP_PIN 67
#define Z_STEP_PIN 62 #include "emergency_parser.h"
#define Z_DIR_PIN 63
#define Z_ENABLE_PIN -1
#define Z_STOP_PIN 59
#define E0_STEP_PIN 65 // Static data members
#define E0_DIR_PIN 66 bool EmergencyParser::killed_by_M112; // = false
#define E0_ENABLE_PIN -1 EmergencyParser::State EmergencyParser::state; // = EP_RESET
#define SDSS 53 // Global instance
#define PS_ON_PIN 9 EmergencyParser emergency_parser;
#define HEATER_0_PIN 13 #endif // EMERGENCY_PARSER
#define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define HEATER_BED_PIN 4
#define TEMP_BED_PIN 10

144
Marlin/emergency_parser.h Normal file
View File

@@ -0,0 +1,144 @@
/**
* 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/>.
*
*/
/**
* emergency_parser.h - Intercept special commands directly in the serial stream
*/
#ifndef _EMERGENCY_PARSER_H_
#define _EMERGENCY_PARSER_H_
// External references
extern volatile bool wait_for_user, wait_for_heatup;
void quickstop_stepper();
class EmergencyParser {
public:
// Currently looking for: M108, M112, M410
enum State : char {
EP_RESET,
EP_N,
EP_M,
EP_M1,
EP_M10,
EP_M108,
EP_M11,
EP_M112,
EP_M4,
EP_M41,
EP_M410,
EP_IGNORE // to '\n'
};
static bool killed_by_M112;
static State state;
EmergencyParser() {}
__attribute__((always_inline)) inline
static void update(const uint8_t c) {
switch (state) {
case EP_RESET:
switch (c) {
case ' ': break;
case 'N': state = EP_N; break;
case 'M': state = EP_M; break;
default: state = EP_IGNORE;
}
break;
case EP_N:
switch (c) {
case '0': case '1': case '2':
case '3': case '4': case '5':
case '6': case '7': case '8':
case '9': case '-': case ' ': break;
case 'M': state = EP_M; break;
default: state = EP_IGNORE;
}
break;
case EP_M:
switch (c) {
case ' ': break;
case '1': state = EP_M1; break;
case '4': state = EP_M4; break;
default: state = EP_IGNORE;
}
break;
case EP_M1:
switch (c) {
case '0': state = EP_M10; break;
case '1': state = EP_M11; break;
default: state = EP_IGNORE;
}
break;
case EP_M10:
state = (c == '8') ? EP_M108 : EP_IGNORE;
break;
case EP_M11:
state = (c == '2') ? EP_M112 : EP_IGNORE;
break;
case EP_M4:
state = (c == '1') ? EP_M41 : EP_IGNORE;
break;
case EP_M41:
state = (c == '0') ? EP_M410 : EP_IGNORE;
break;
case EP_IGNORE:
if (c == '\n') state = EP_RESET;
break;
default:
if (c == '\n') {
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;
}
}
}
};
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_

View File

@@ -31,35 +31,39 @@
#include "stepper.h" #include "stepper.h"
#include "ultralcd.h" #include "ultralcd.h"
// TEST_ENDSTOP: test the old and the current status of an endstop #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
#define TEST_ENDSTOP(ENDSTOP) (TEST(current_endstop_bits & old_endstop_bits, ENDSTOP)) #include "endstop_interrupts.h"
#endif
Endstops endstops; Endstops endstops;
// public: // public:
bool Endstops::enabled = true, bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
Endstops::enabled_globally = volatile uint8_t Endstops::hit_state;
#if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
(true)
#else
(false)
#endif
;
volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
#if ENABLED(Z_DUAL_ENDSTOPS) Endstops::esbits_t Endstops::live_state = 0;
uint16_t
#else #if ENABLED(ENDSTOP_NOISE_FILTER)
byte Endstops::esbits_t Endstops::validated_live_state;
uint8_t Endstops::endstop_poll_count;
#endif #endif
Endstops::current_endstop_bits = 0,
Endstops::old_endstop_bits = 0;
#if HAS_BED_PROBE #if HAS_BED_PROBE
volatile bool Endstops::z_probe_enabled = false; volatile bool Endstops::z_probe_enabled = false;
#endif #endif
// Initialized by settings.load()
#if ENABLED(X_DUAL_ENDSTOPS)
float Endstops::x_endstop_adj;
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
float Endstops::y_endstop_adj;
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
float Endstops::z_endstop_adj;
#endif
/** /**
* Class and Instance Methods * Class and Instance Methods
*/ */
@@ -67,72 +71,196 @@ volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_P
void Endstops::init() { void Endstops::init() {
#if HAS_X_MIN #if HAS_X_MIN
SET_INPUT(X_MIN_PIN);
#if ENABLED(ENDSTOPPULLUP_XMIN) #if ENABLED(ENDSTOPPULLUP_XMIN)
WRITE(X_MIN_PIN,HIGH); SET_INPUT_PULLUP(X_MIN_PIN);
#else
SET_INPUT(X_MIN_PIN);
#endif
#endif
#if HAS_X2_MIN
#if ENABLED(ENDSTOPPULLUP_XMIN)
SET_INPUT_PULLUP(X2_MIN_PIN);
#else
SET_INPUT(X2_MIN_PIN);
#endif #endif
#endif #endif
#if HAS_Y_MIN #if HAS_Y_MIN
SET_INPUT(Y_MIN_PIN);
#if ENABLED(ENDSTOPPULLUP_YMIN) #if ENABLED(ENDSTOPPULLUP_YMIN)
WRITE(Y_MIN_PIN,HIGH); SET_INPUT_PULLUP(Y_MIN_PIN);
#else
SET_INPUT(Y_MIN_PIN);
#endif
#endif
#if HAS_Y2_MIN
#if ENABLED(ENDSTOPPULLUP_YMIN)
SET_INPUT_PULLUP(Y2_MIN_PIN);
#else
SET_INPUT(Y2_MIN_PIN);
#endif #endif
#endif #endif
#if HAS_Z_MIN #if HAS_Z_MIN
SET_INPUT(Z_MIN_PIN);
#if ENABLED(ENDSTOPPULLUP_ZMIN) #if ENABLED(ENDSTOPPULLUP_ZMIN)
WRITE(Z_MIN_PIN,HIGH); SET_INPUT_PULLUP(Z_MIN_PIN);
#else
SET_INPUT(Z_MIN_PIN);
#endif #endif
#endif #endif
#if HAS_Z2_MIN #if HAS_Z2_MIN
SET_INPUT(Z2_MIN_PIN);
#if ENABLED(ENDSTOPPULLUP_ZMIN) #if ENABLED(ENDSTOPPULLUP_ZMIN)
WRITE(Z2_MIN_PIN,HIGH); SET_INPUT_PULLUP(Z2_MIN_PIN);
#else
SET_INPUT(Z2_MIN_PIN);
#endif #endif
#endif #endif
#if HAS_X_MAX #if HAS_X_MAX
SET_INPUT(X_MAX_PIN);
#if ENABLED(ENDSTOPPULLUP_XMAX) #if ENABLED(ENDSTOPPULLUP_XMAX)
WRITE(X_MAX_PIN,HIGH); SET_INPUT_PULLUP(X_MAX_PIN);
#else
SET_INPUT(X_MAX_PIN);
#endif
#endif
#if HAS_X2_MAX
#if ENABLED(ENDSTOPPULLUP_XMAX)
SET_INPUT_PULLUP(X2_MAX_PIN);
#else
SET_INPUT(X2_MAX_PIN);
#endif #endif
#endif #endif
#if HAS_Y_MAX #if HAS_Y_MAX
SET_INPUT(Y_MAX_PIN);
#if ENABLED(ENDSTOPPULLUP_YMAX) #if ENABLED(ENDSTOPPULLUP_YMAX)
WRITE(Y_MAX_PIN,HIGH); SET_INPUT_PULLUP(Y_MAX_PIN);
#else
SET_INPUT(Y_MAX_PIN);
#endif
#endif
#if HAS_Y2_MAX
#if ENABLED(ENDSTOPPULLUP_YMAX)
SET_INPUT_PULLUP(Y2_MAX_PIN);
#else
SET_INPUT(Y2_MAX_PIN);
#endif #endif
#endif #endif
#if HAS_Z_MAX #if HAS_Z_MAX
SET_INPUT(Z_MAX_PIN);
#if ENABLED(ENDSTOPPULLUP_ZMAX) #if ENABLED(ENDSTOPPULLUP_ZMAX)
WRITE(Z_MAX_PIN,HIGH); SET_INPUT_PULLUP(Z_MAX_PIN);
#else
SET_INPUT(Z_MAX_PIN);
#endif #endif
#endif #endif
#if HAS_Z2_MAX #if HAS_Z2_MAX
SET_INPUT(Z2_MAX_PIN);
#if ENABLED(ENDSTOPPULLUP_ZMAX) #if ENABLED(ENDSTOPPULLUP_ZMAX)
WRITE(Z2_MAX_PIN,HIGH); SET_INPUT_PULLUP(Z2_MAX_PIN);
#else
SET_INPUT(Z2_MAX_PIN);
#endif #endif
#endif #endif
#if HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_ENDSTOP) // Check for Z_MIN_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used. #if ENABLED(Z_MIN_PROBE_ENDSTOP)
SET_INPUT(Z_MIN_PROBE_PIN);
#if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE) #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
WRITE(Z_MIN_PROBE_PIN,HIGH); SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
#else
SET_INPUT(Z_MIN_PROBE_PIN);
#endif #endif
#endif #endif
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
setup_endstop_interrupts();
#endif
// Enable endstops
enable_globally(
#if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
true
#else
false
#endif
);
} // Endstops::init } // Endstops::init
void Endstops::report_state() { // Called at ~1KHz from Temperature ISR: Poll endstop state if required
if (endstop_hit_bits) { void Endstops::poll() {
#if ENABLED(PINS_DEBUGGING)
run_monitor(); // report changes in endstop status
#endif
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && ENABLED(ENDSTOP_NOISE_FILTER)
if (endstop_poll_count) update();
#elif DISABLED(ENDSTOP_INTERRUPTS_FEATURE) || ENABLED(ENDSTOP_NOISE_FILTER)
update();
#endif
}
void Endstops::enable_globally(const bool onoff) {
enabled_globally = enabled = onoff;
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
update();
#endif
}
// Enable / disable endstop checking
void Endstops::enable(const bool onoff) {
enabled = onoff;
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
update();
#endif
}
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
void Endstops::not_homing() {
enabled = enabled_globally;
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
update();
#endif
}
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
// If the last move failed to trigger an endstop, call kill
void Endstops::validate_homing_move() {
if (trigger_state()) hit_on_purpose();
else kill(PSTR(MSG_ERR_HOMING_FAILED));
}
#endif
// Enable / disable endstop z-probe checking
#if HAS_BED_PROBE
void Endstops::enable_z_probe(const bool onoff) {
z_probe_enabled = onoff;
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
update();
#endif
}
#endif
#if ENABLED(PINS_DEBUGGING)
void Endstops::run_monitor() {
if (!monitor_flag) return;
static uint8_t monitor_count = 16; // offset this check from the others
monitor_count += _BV(1); // 15 Hz
monitor_count &= 0x7F;
if (!monitor_count) monitor(); // report changes in endstop status
}
#endif
void Endstops::event_handler() {
static uint8_t prev_hit_state; // = 0
if (hit_state && hit_state != prev_hit_state) {
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' '; char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
#define _SET_STOP_CHAR(A,C) (chr## A = C) #define _SET_STOP_CHAR(A,C) (chr## A = C)
@@ -141,35 +269,35 @@ void Endstops::report_state() {
#endif #endif
#define _ENDSTOP_HIT_ECHO(A,C) do{ \ #define _ENDSTOP_HIT_ECHO(A,C) do{ \
SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", stepper.triggered_position_mm(A ##_AXIS)); \ SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); \
_SET_STOP_CHAR(A,C); }while(0) _SET_STOP_CHAR(A,C); }while(0)
#define _ENDSTOP_HIT_TEST(A,C) \ #define _ENDSTOP_HIT_TEST(A,C) \
if (TEST(endstop_hit_bits, A ##_MIN) || TEST(endstop_hit_bits, A ##_MAX)) \ if (TEST(hit_state, A ##_MIN) || TEST(hit_state, A ##_MAX)) \
_ENDSTOP_HIT_ECHO(A,C) _ENDSTOP_HIT_ECHO(A,C)
SERIAL_ECHO_START; #define ENDSTOP_HIT_TEST_X() _ENDSTOP_HIT_TEST(X,'X')
#define ENDSTOP_HIT_TEST_Y() _ENDSTOP_HIT_TEST(Y,'Y')
#define ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z')
SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT); SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
_ENDSTOP_HIT_TEST(X, 'X'); ENDSTOP_HIT_TEST_X();
_ENDSTOP_HIT_TEST(Y, 'Y'); ENDSTOP_HIT_TEST_Y();
_ENDSTOP_HIT_TEST(Z, 'Z'); ENDSTOP_HIT_TEST_Z();
#if ENABLED(Z_MIN_PROBE_ENDSTOP) #if ENABLED(Z_MIN_PROBE_ENDSTOP)
#define P_AXIS Z_AXIS #define P_AXIS Z_AXIS
if (TEST(endstop_hit_bits, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P'); if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
#endif #endif
SERIAL_EOL; SERIAL_EOL();
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
char msg[3 * strlen(MSG_LCD_ENDSTOPS) + 8 + 1]; // Room for a UTF 8 string lcd_status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
sprintf_P(msg, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
lcd_setstatus(msg);
#endif #endif
hit_on_purpose();
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT) #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
if (stepper.abort_on_endstop_hit) { if (planner.abort_on_endstop_hit) {
card.sdprinting = false; card.sdprinting = false;
card.closefile(); card.closefile();
quickstop_stepper(); quickstop_stepper();
@@ -177,202 +305,478 @@ void Endstops::report_state() {
} }
#endif #endif
} }
prev_hit_state = hit_state;
} // Endstops::report_state } // Endstops::report_state
void Endstops::M119() { static void print_es_state(const bool is_hit, const char * const label=NULL) {
if (label) serialprintPGM(label);
SERIAL_PROTOCOLPGM(": ");
serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN));
SERIAL_EOL();
}
void _O2 Endstops::M119() {
#if ENABLED(BLTOUCH)
extern void _bltouch_set_SW_mode();
_bltouch_set_SW_mode();
#endif
SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT); SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
#define ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S))
#if HAS_X_MIN #if HAS_X_MIN
SERIAL_PROTOCOLPGM(MSG_X_MIN); ES_REPORT(X_MIN);
SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); #endif
#if HAS_X2_MIN
ES_REPORT(X2_MIN);
#endif #endif
#if HAS_X_MAX #if HAS_X_MAX
SERIAL_PROTOCOLPGM(MSG_X_MAX); ES_REPORT(X_MAX);
SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); #endif
#if HAS_X2_MAX
ES_REPORT(X2_MAX);
#endif #endif
#if HAS_Y_MIN #if HAS_Y_MIN
SERIAL_PROTOCOLPGM(MSG_Y_MIN); ES_REPORT(Y_MIN);
SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); #endif
#if HAS_Y2_MIN
ES_REPORT(Y2_MIN);
#endif #endif
#if HAS_Y_MAX #if HAS_Y_MAX
SERIAL_PROTOCOLPGM(MSG_Y_MAX); ES_REPORT(Y_MAX);
SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); #endif
#if HAS_Y2_MAX
ES_REPORT(Y2_MAX);
#endif #endif
#if HAS_Z_MIN #if HAS_Z_MIN
SERIAL_PROTOCOLPGM(MSG_Z_MIN); ES_REPORT(Z_MIN);
SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); #endif
#if HAS_Z2_MIN
ES_REPORT(Z2_MIN);
#endif #endif
#if HAS_Z_MAX #if HAS_Z_MAX
SERIAL_PROTOCOLPGM(MSG_Z_MAX); ES_REPORT(Z_MAX);
SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
#endif #endif
#if HAS_Z2_MAX #if HAS_Z2_MAX
SERIAL_PROTOCOLPGM(MSG_Z2_MAX); ES_REPORT(Z2_MAX);
SERIAL_PROTOCOLLN(((READ(Z2_MAX_PIN)^Z2_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
#endif #endif
#if HAS_Z_MIN_PROBE_PIN #if ENABLED(Z_MIN_PROBE_ENDSTOP)
SERIAL_PROTOCOLPGM(MSG_Z_PROBE); print_es_state(READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING, PSTR(MSG_Z_PROBE));
SERIAL_PROTOCOLLN(((READ(Z_MIN_PROBE_PIN)^Z_MIN_PROBE_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); #endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#if NUM_RUNOUT_SENSORS == 1
print_es_state(READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING, PSTR(MSG_FILAMENT_RUNOUT_SENSOR));
#else
for (uint8_t i = 1; i <= NUM_RUNOUT_SENSORS; i++) {
pin_t pin;
switch (i) {
default: continue;
case 1: pin = FIL_RUNOUT_PIN; break;
case 2: pin = FIL_RUNOUT2_PIN; break;
#if NUM_RUNOUT_SENSORS > 2
case 3: pin = FIL_RUNOUT3_PIN; break;
#if NUM_RUNOUT_SENSORS > 3
case 4: pin = FIL_RUNOUT4_PIN; break;
#if NUM_RUNOUT_SENSORS > 4
case 5: pin = FIL_RUNOUT5_PIN; break;
#endif
#endif
#endif
}
SERIAL_PROTOCOLPGM(MSG_FILAMENT_RUNOUT_SENSOR);
if (i > 1) { SERIAL_CHAR(' '); SERIAL_CHAR('0' + i); }
print_es_state(digitalRead(pin) != FIL_RUNOUT_INVERTING);
}
#endif
#endif
#if ENABLED(BLTOUCH)
extern void _bltouch_reset_SW_mode();
_bltouch_reset_SW_mode();
#endif #endif
} // Endstops::M119 } // Endstops::M119
#if ENABLED(Z_DUAL_ENDSTOPS) // The following routines are called from an ISR context. It could be the temperature ISR, the
// endstop ISR or the Stepper ISR.
// Pass the result of the endstop test
void Endstops::test_dual_z_endstops(EndstopEnum es1, EndstopEnum es2) {
byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
if (stepper.current_block->steps[Z_AXIS] > 0) {
stepper.endstop_triggered(Z_AXIS);
SBI(endstop_hit_bits, Z_MIN);
if (!stepper.performing_homing || (z_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
stepper.kill_current_block();
}
}
#endif
// Check endstops - Called from ISR!
void Endstops::update() {
#define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
#define _ENDSTOP_HIT(AXIS) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MIN))
#define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
// UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status // Check endstops - Could be called from Temperature ISR!
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) void Endstops::update() {
// COPY_BIT: copy the value of COPY_BIT to BIT in bits
#define COPY_BIT(bits, COPY_BIT, BIT) SET_BIT(bits, BIT, TEST(bits, COPY_BIT))
#define UPDATE_ENDSTOP(AXIS,MINMAX) do { \ #if DISABLED(ENDSTOP_NOISE_FILTER)
UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \ if (!abort_enabled()) return;
if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX)) && stepper.current_block->steps[_AXIS(AXIS)] > 0) { \
_ENDSTOP_HIT(AXIS); \
stepper.endstop_triggered(_AXIS(AXIS)); \
} \
} while(0)
#if ENABLED(COREXY) || ENABLED(COREXZ)
// Head direction in -X axis for CoreXY and CoreXZ bots.
// If DeltaA == -DeltaB, the movement is only in Y or Z axis
if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) == stepper.motor_direction(CORE_AXIS_2))) {
if (stepper.motor_direction(X_HEAD))
#else
if (stepper.motor_direction(X_AXIS)) // stepping along -X axis (regular Cartesian bot)
#endif #endif
{ // -direction
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
#define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT))
#if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
// If G38 command is active check Z_MIN_PROBE for ALL movement
if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
#endif
// With Dual X, endstops are only checked in the homing direction for the active extruder
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
// with 2 x-carriages, endstops are only checked in the homing direction for the active extruder #define E0_ACTIVE stepper.movement_extruder() == 0
if ((stepper.current_block->active_extruder == 0 && X_HOME_DIR == -1) || (stepper.current_block->active_extruder != 0 && X2_HOME_DIR == -1)) #define X_MIN_TEST ((X_HOME_DIR < 0 && E0_ACTIVE) || (X2_HOME_DIR < 0 && !E0_ACTIVE))
#define X_MAX_TEST ((X_HOME_DIR > 0 && E0_ACTIVE) || (X2_HOME_DIR > 0 && !E0_ACTIVE))
#else
#define X_MIN_TEST true
#define X_MAX_TEST true
#endif #endif
{
// Use HEAD for core axes, AXIS for others
#if CORE_IS_XY || CORE_IS_XZ
#define X_AXIS_HEAD X_HEAD
#else
#define X_AXIS_HEAD X_AXIS
#endif
#if CORE_IS_XY || CORE_IS_YZ
#define Y_AXIS_HEAD Y_HEAD
#else
#define Y_AXIS_HEAD Y_AXIS
#endif
#if CORE_IS_XZ || CORE_IS_YZ
#define Z_AXIS_HEAD Z_HEAD
#else
#define Z_AXIS_HEAD Z_AXIS
#endif
/**
* Check and update endstops
*/
#if HAS_X_MIN #if HAS_X_MIN
UPDATE_ENDSTOP(X, MIN); #if ENABLED(X_DUAL_ENDSTOPS)
UPDATE_ENDSTOP_BIT(X, MIN);
#if HAS_X2_MIN
UPDATE_ENDSTOP_BIT(X2, MIN);
#else
COPY_LIVE_STATE(X_MIN, X2_MIN);
#endif #endif
} #else
} UPDATE_ENDSTOP_BIT(X, MIN);
else { // +direction
#if ENABLED(DUAL_X_CARRIAGE)
// with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
if ((stepper.current_block->active_extruder == 0 && X_HOME_DIR == 1) || (stepper.current_block->active_extruder != 0 && X2_HOME_DIR == 1))
#endif #endif
{ #endif
#if HAS_X_MAX #if HAS_X_MAX
UPDATE_ENDSTOP(X, MAX); #if ENABLED(X_DUAL_ENDSTOPS)
UPDATE_ENDSTOP_BIT(X, MAX);
#if HAS_X2_MAX
UPDATE_ENDSTOP_BIT(X2, MAX);
#else
COPY_LIVE_STATE(X_MAX, X2_MAX);
#endif
#else
UPDATE_ENDSTOP_BIT(X, MAX);
#endif #endif
}
}
#if ENABLED(COREXY) || ENABLED(COREXZ)
}
#endif #endif
#if ENABLED(COREXY) || ENABLED(COREYZ)
// Head direction in -Y axis for CoreXY / CoreYZ bots.
// If DeltaA == DeltaB, the movement is only in X or Y axis
if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) != stepper.motor_direction(CORE_AXIS_2))) {
if (stepper.motor_direction(Y_HEAD))
#else
if (stepper.motor_direction(Y_AXIS)) // -direction
#endif
{ // -direction
#if HAS_Y_MIN #if HAS_Y_MIN
UPDATE_ENDSTOP(Y, MIN); #if ENABLED(Y_DUAL_ENDSTOPS)
#endif UPDATE_ENDSTOP_BIT(Y, MIN);
} #if HAS_Y2_MIN
else { // +direction UPDATE_ENDSTOP_BIT(Y2, MIN);
#if HAS_Y_MAX
UPDATE_ENDSTOP(Y, MAX);
#endif
}
#if ENABLED(COREXY) || ENABLED(COREYZ)
}
#endif
#if ENABLED(COREXZ) || ENABLED(COREYZ)
// Head direction in -Z axis for CoreXZ or CoreYZ bots.
// If DeltaA == DeltaB, the movement is only in X or Y axis
if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) != stepper.motor_direction(CORE_AXIS_2))) {
if (stepper.motor_direction(Z_HEAD))
#else #else
if (stepper.motor_direction(Z_AXIS)) COPY_LIVE_STATE(Y_MIN, Y2_MIN);
#endif #endif
{ // z -direction #else
UPDATE_ENDSTOP_BIT(Y, MIN);
#endif
#endif
#if HAS_Y_MAX
#if ENABLED(Y_DUAL_ENDSTOPS)
UPDATE_ENDSTOP_BIT(Y, MAX);
#if HAS_Y2_MAX
UPDATE_ENDSTOP_BIT(Y2, MAX);
#else
COPY_LIVE_STATE(Y_MAX, Y2_MAX);
#endif
#else
UPDATE_ENDSTOP_BIT(Y, MAX);
#endif
#endif
#if HAS_Z_MIN #if HAS_Z_MIN
#if ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(Z_DUAL_ENDSTOPS)
UPDATE_ENDSTOP_BIT(Z, MIN); UPDATE_ENDSTOP_BIT(Z, MIN);
#if HAS_Z2_MIN #if HAS_Z2_MIN
UPDATE_ENDSTOP_BIT(Z2, MIN); UPDATE_ENDSTOP_BIT(Z2, MIN);
#else #else
COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN); COPY_LIVE_STATE(Z_MIN, Z2_MIN);
#endif
#elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
UPDATE_ENDSTOP_BIT(Z, MIN);
#elif Z_HOME_DIR < 0
UPDATE_ENDSTOP_BIT(Z, MIN);
#endif
#endif #endif
test_dual_z_endstops(Z_MIN, Z2_MIN); // When closing the gap check the enabled probe
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
#else // !Z_DUAL_ENDSTOPS UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
#if HAS_BED_PROBE && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
#else
UPDATE_ENDSTOP(Z, MIN);
#endif #endif
#endif // !Z_DUAL_ENDSTOPS
#endif // HAS_Z_MIN
#if HAS_BED_PROBE && ENABLED(Z_MIN_PROBE_ENDSTOP) && DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
if (z_probe_enabled) {
UPDATE_ENDSTOP(Z, MIN_PROBE);
if (TEST_ENDSTOP(Z_MIN_PROBE)) SBI(endstop_hit_bits, Z_MIN_PROBE);
}
#endif
}
else { // z +direction
#if HAS_Z_MAX #if HAS_Z_MAX
// Check both Z dual endstops
#if ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(Z_DUAL_ENDSTOPS)
UPDATE_ENDSTOP_BIT(Z, MAX); UPDATE_ENDSTOP_BIT(Z, MAX);
#if HAS_Z2_MAX #if HAS_Z2_MAX
UPDATE_ENDSTOP_BIT(Z2, MAX); UPDATE_ENDSTOP_BIT(Z2, MAX);
#else #else
COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX); COPY_LIVE_STATE(Z_MAX, Z2_MAX);
#endif
#elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
// If this pin isn't the bed probe it's the Z endstop
UPDATE_ENDSTOP_BIT(Z, MAX);
#endif
#endif #endif
test_dual_z_endstops(Z_MAX, Z2_MAX); #if ENABLED(ENDSTOP_NOISE_FILTER)
/**
#else // !Z_DUAL_ENDSTOPS * Filtering out noise on endstops requires a delayed decision. Let's assume, due to noise,
* that 50% of endstop signal samples are good and 50% are bad (assuming normal distribution
UPDATE_ENDSTOP(Z, MAX); * of random noise). Then the first sample has a 50% chance to be good or bad. The 2nd sample
* also has a 50% chance to be good or bad. The chances of 2 samples both being bad becomes
#endif // !Z_DUAL_ENDSTOPS * 50% of 50%, or 25%. That was the previous implementation of Marlin endstop handling. It
#endif // Z_MAX_PIN * reduces chances of bad readings in half, at the cost of 1 extra sample period, but chances
* still exist. The only way to reduce them further is to increase the number of samples.
* To reduce the chance to 1% (1/128th) requires 7 samples (adding 7ms of delay).
*/
static esbits_t old_live_state;
if (old_live_state != live_state) {
endstop_poll_count = 7;
old_live_state = live_state;
}
else if (endstop_poll_count && !--endstop_poll_count)
validated_live_state = live_state;
if (!abort_enabled()) return;
#endif
// Test the current status of an endstop
#define TEST_ENDSTOP(ENDSTOP) (TEST(state(), ENDSTOP))
// Record endstop was hit
#define _ENDSTOP_HIT(AXIS, MINMAX) SBI(hit_state, _ENDSTOP(AXIS, MINMAX))
// Call the endstop triggered routine for single endstops
#define PROCESS_ENDSTOP(AXIS,MINMAX) do { \
if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX))) { \
_ENDSTOP_HIT(AXIS, MINMAX); \
planner.endstop_triggered(_AXIS(AXIS)); \
} \
}while(0)
// Call the endstop triggered routine for dual endstops
#define PROCESS_DUAL_ENDSTOP(AXIS1, AXIS2, MINMAX) do { \
const byte dual_hit = TEST_ENDSTOP(_ENDSTOP(AXIS1, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(AXIS2, MINMAX)) << 1); \
if (dual_hit) { \
_ENDSTOP_HIT(AXIS1, MINMAX); \
/* if not performing home or if both endstops were trigged during homing... */ \
if (!stepper.homing_dual_axis || dual_hit == 0b11) \
planner.endstop_triggered(_AXIS(AXIS1)); \
} \
}while(0)
#if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
// If G38 command is active check Z_MIN_PROBE for ALL movement
if (G38_move) {
if (TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE))) {
if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, MIN); planner.endstop_triggered(X_AXIS); }
else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, MIN); planner.endstop_triggered(Y_AXIS); }
else if (stepper.axis_is_moving(Z_AXIS)) { _ENDSTOP_HIT(Z, MIN); planner.endstop_triggered(Z_AXIS); }
G38_endstop_hit = true;
} }
#if ENABLED(COREXZ)
} }
#endif #endif
old_endstop_bits = current_endstop_bits; // Now, we must signal, after validation, if an endstop limit is pressed or not
if (stepper.axis_is_moving(X_AXIS)) {
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
#if HAS_X_MIN
#if ENABLED(X_DUAL_ENDSTOPS)
PROCESS_DUAL_ENDSTOP(X, X2, MIN);
#else
if (X_MIN_TEST) PROCESS_ENDSTOP(X, MIN);
#endif
#endif
}
else { // +direction
#if HAS_X_MAX
#if ENABLED(X_DUAL_ENDSTOPS)
PROCESS_DUAL_ENDSTOP(X, X2, MAX);
#else
if (X_MAX_TEST) PROCESS_ENDSTOP(X, MAX);
#endif
#endif
}
}
if (stepper.axis_is_moving(Y_AXIS)) {
if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
#if HAS_Y_MIN
#if ENABLED(Y_DUAL_ENDSTOPS)
PROCESS_DUAL_ENDSTOP(Y, Y2, MIN);
#else
PROCESS_ENDSTOP(Y, MIN);
#endif
#endif
}
else { // +direction
#if HAS_Y_MAX
#if ENABLED(Y_DUAL_ENDSTOPS)
PROCESS_DUAL_ENDSTOP(Y, Y2, MAX);
#else
PROCESS_ENDSTOP(Y, MAX);
#endif
#endif
}
}
if (stepper.axis_is_moving(Z_AXIS)) {
if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up.
#if HAS_Z_MIN
#if ENABLED(Z_DUAL_ENDSTOPS)
PROCESS_DUAL_ENDSTOP(Z, Z2, MIN);
#else
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
#elif ENABLED(Z_MIN_PROBE_ENDSTOP)
if (!z_probe_enabled) PROCESS_ENDSTOP(Z, MIN);
#else
PROCESS_ENDSTOP(Z, MIN);
#endif
#endif
#endif
// When closing the gap check the enabled probe
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE);
#endif
}
else { // Z +direction. Gantry up, bed down.
#if HAS_Z_MAX
#if ENABLED(Z_DUAL_ENDSTOPS)
PROCESS_DUAL_ENDSTOP(Z, Z2, MAX);
#elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
// If this pin is not hijacked for the bed probe
// then it belongs to the Z endstop
PROCESS_ENDSTOP(Z, MAX);
#endif
#endif
}
}
} // Endstops::update() } // Endstops::update()
#if ENABLED(PINS_DEBUGGING)
bool Endstops::monitor_flag = false;
/**
* monitors endstops & Z probe for changes
*
* If a change is detected then the LED is toggled and
* a message is sent out the serial port
*
* Yes, we could miss a rapid back & forth change but
* that won't matter because this is all manual.
*
*/
void Endstops::monitor() {
static uint16_t old_live_state_local = 0;
static uint8_t local_LED_status = 0;
uint16_t live_state_local = 0;
#if HAS_X_MIN
if (READ(X_MIN_PIN)) SBI(live_state_local, X_MIN);
#endif
#if HAS_X_MAX
if (READ(X_MAX_PIN)) SBI(live_state_local, X_MAX);
#endif
#if HAS_Y_MIN
if (READ(Y_MIN_PIN)) SBI(live_state_local, Y_MIN);
#endif
#if HAS_Y_MAX
if (READ(Y_MAX_PIN)) SBI(live_state_local, Y_MAX);
#endif
#if HAS_Z_MIN
if (READ(Z_MIN_PIN)) SBI(live_state_local, Z_MIN);
#endif
#if HAS_Z_MAX
if (READ(Z_MAX_PIN)) SBI(live_state_local, Z_MAX);
#endif
#if HAS_Z_MIN_PROBE_PIN
if (READ(Z_MIN_PROBE_PIN)) SBI(live_state_local, Z_MIN_PROBE);
#endif
#if HAS_X2_MIN
if (READ(X2_MIN_PIN)) SBI(live_state_local, X2_MIN);
#endif
#if HAS_X2_MAX
if (READ(X2_MAX_PIN)) SBI(live_state_local, X2_MAX);
#endif
#if HAS_Y2_MIN
if (READ(Y2_MIN_PIN)) SBI(live_state_local, Y2_MIN);
#endif
#if HAS_Y2_MAX
if (READ(Y2_MAX_PIN)) SBI(live_state_local, Y2_MAX);
#endif
#if HAS_Z2_MIN
if (READ(Z2_MIN_PIN)) SBI(live_state_local, Z2_MIN);
#endif
#if HAS_Z2_MAX
if (READ(Z2_MAX_PIN)) SBI(live_state_local, Z2_MAX);
#endif
uint16_t endstop_change = live_state_local ^ old_live_state_local;
if (endstop_change) {
#if HAS_X_MIN
if (TEST(endstop_change, X_MIN)) SERIAL_PROTOCOLPAIR(" X_MIN:", TEST(live_state_local, X_MIN));
#endif
#if HAS_X_MAX
if (TEST(endstop_change, X_MAX)) SERIAL_PROTOCOLPAIR(" X_MAX:", TEST(live_state_local, X_MAX));
#endif
#if HAS_Y_MIN
if (TEST(endstop_change, Y_MIN)) SERIAL_PROTOCOLPAIR(" Y_MIN:", TEST(live_state_local, Y_MIN));
#endif
#if HAS_Y_MAX
if (TEST(endstop_change, Y_MAX)) SERIAL_PROTOCOLPAIR(" Y_MAX:", TEST(live_state_local, Y_MAX));
#endif
#if HAS_Z_MIN
if (TEST(endstop_change, Z_MIN)) SERIAL_PROTOCOLPAIR(" Z_MIN:", TEST(live_state_local, Z_MIN));
#endif
#if HAS_Z_MAX
if (TEST(endstop_change, Z_MAX)) SERIAL_PROTOCOLPAIR(" Z_MAX:", TEST(live_state_local, Z_MAX));
#endif
#if HAS_Z_MIN_PROBE_PIN
if (TEST(endstop_change, Z_MIN_PROBE)) SERIAL_PROTOCOLPAIR(" PROBE:", TEST(live_state_local, Z_MIN_PROBE));
#endif
#if HAS_X2_MIN
if (TEST(endstop_change, X2_MIN)) SERIAL_PROTOCOLPAIR(" X2_MIN:", TEST(live_state_local, X2_MIN));
#endif
#if HAS_X2_MAX
if (TEST(endstop_change, X2_MAX)) SERIAL_PROTOCOLPAIR(" X2_MAX:", TEST(live_state_local, X2_MAX));
#endif
#if HAS_Y2_MIN
if (TEST(endstop_change, Y2_MIN)) SERIAL_PROTOCOLPAIR(" Y2_MIN:", TEST(live_state_local, Y2_MIN));
#endif
#if HAS_Y2_MAX
if (TEST(endstop_change, Y2_MAX)) SERIAL_PROTOCOLPAIR(" Y2_MAX:", TEST(live_state_local, Y2_MAX));
#endif
#if HAS_Z2_MIN
if (TEST(endstop_change, Z2_MIN)) SERIAL_PROTOCOLPAIR(" Z2_MIN:", TEST(live_state_local, Z2_MIN));
#endif
#if HAS_Z2_MAX
if (TEST(endstop_change, Z2_MAX)) SERIAL_PROTOCOLPAIR(" Z2_MAX:", TEST(live_state_local, Z2_MAX));
#endif
SERIAL_PROTOCOLPGM("\n\n");
analogWrite(LED_PIN, local_LED_status);
local_LED_status ^= 255;
old_live_state_local = live_state_local;
}
}
#endif // PINS_DEBUGGING

View File

@@ -24,41 +24,112 @@
* endstops.h - manages endstops * endstops.h - manages endstops
*/ */
#ifndef ENDSTOPS_H #ifndef __ENDSTOPS_H__
#define ENDSTOPS_H #define __ENDSTOPS_H__
#include "enum.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
};
class Endstops { class Endstops {
public: public:
static bool enabled, enabled_globally; static bool enabled, enabled_globally;
static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
#if ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
static uint16_t typedef uint16_t esbits_t;
#else #if ENABLED(X_DUAL_ENDSTOPS)
static byte static float x_endstop_adj;
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
static float y_endstop_adj;
#endif
#if ENABLED(Z_DUAL_ENDSTOPS)
static float z_endstop_adj;
#endif
#else
typedef uint8_t esbits_t;
#endif #endif
current_endstop_bits, old_endstop_bits;
private:
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 ENABLED(ENDSTOP_NOISE_FILTER)
static esbits_t validated_live_state;
static uint8_t endstop_poll_count; // Countdown from threshold for polling
#endif
public:
Endstops() {}; Endstops() {};
/** /**
* Initialize the endstop pins * Initialize the endstop pins
*/ */
void init(); static void init();
/** /**
* Update the endstops bits from the pins * Are endstops or the probe set to abort the move?
*/
FORCE_INLINE static bool abort_enabled() {
return (enabled
#if HAS_BED_PROBE
|| z_probe_enabled
#endif
);
}
/**
* Periodic call to poll endstops if required. Called from temperature ISR
*/
static void poll();
/**
* Update endstops bits from the pins. Apply filtering to get a verified state.
* If abort_enabled() and moving towards a triggered switch, abort the current move.
* Called from ISR contexts.
*/ */
static void update(); static void update();
/** /**
* Print an error message reporting the position when the endstops were last hit. * Get Endstop hit state.
*/ */
static void report_state(); //call from somewhere to create an serial error message with the locations the endstops where hit, in case they were triggered FORCE_INLINE static uint8_t trigger_state() { return hit_state; }
/**
* Get current endstops state
*/
FORCE_INLINE static esbits_t state() {
return
#if ENABLED(ENDSTOP_NOISE_FILTER)
validated_live_state
#else
live_state
#endif
;
}
/**
* Report endstop hits to serial. Called from loop().
*/
static void event_handler();
/** /**
* Report endstop positions in response to M119 * Report endstop positions in response to M119
@@ -66,30 +137,38 @@ class Endstops {
static void M119(); static void M119();
// Enable / disable endstop checking globally // Enable / disable endstop checking globally
static void enable_globally(bool onoff=true) { enabled_globally = enabled = onoff; } static void enable_globally(const bool onoff=true);
// Enable / disable endstop checking // Enable / disable endstop checking
static void enable(bool onoff=true) { enabled = onoff; } static void enable(const bool onoff=true);
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable // Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
static void not_homing() { enabled = enabled_globally; } static void not_homing();
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
// If the last move failed to trigger an endstop, call kill
static void validate_homing_move();
#else
FORCE_INLINE static void validate_homing_move() { hit_on_purpose(); }
#endif
// Clear endstops (i.e., they were hit intentionally) to suppress the report // Clear endstops (i.e., they were hit intentionally) to suppress the report
static void hit_on_purpose() { endstop_hit_bits = 0; } FORCE_INLINE static void hit_on_purpose() { hit_state = 0; }
// Enable / disable endstop z-probe checking // Enable / disable endstop z-probe checking
#if HAS_BED_PROBE #if HAS_BED_PROBE
static volatile bool z_probe_enabled; static volatile bool z_probe_enabled;
static void enable_z_probe(bool onoff=true) { z_probe_enabled = onoff; } static void enable_z_probe(const bool onoff=true);
#endif #endif
private: // Debugging of endstops
#if ENABLED(PINS_DEBUGGING)
#if ENABLED(Z_DUAL_ENDSTOPS) static bool monitor_flag;
static void test_dual_z_endstops(EndstopEnum es1, EndstopEnum es2); static void monitor();
static void run_monitor();
#endif #endif
}; };
extern Endstops endstops; extern Endstops endstops;
#endif // ENDSTOPS_H #endif // __ENDSTOPS_H__

View File

@@ -23,30 +23,46 @@
#ifndef __ENUM_H__ #ifndef __ENUM_H__
#define __ENUM_H__ #define __ENUM_H__
#include "MarlinConfig.h"
/** /**
* Axis indices as enumerated constants * Axis indices as enumerated constants
* *
* Special axis: * - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
* - A_AXIS and B_AXIS are used by COREXY printers * - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
* - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship * - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
* between X_AXIS and X Head movement, like CoreXY bots
*/ */
enum AxisEnum { enum AxisEnum : unsigned char {
NO_AXIS = -1,
X_AXIS = 0, X_AXIS = 0,
A_AXIS = 0, A_AXIS = 0,
Y_AXIS = 1, Y_AXIS = 1,
B_AXIS = 1, B_AXIS = 1,
Z_AXIS = 2, Z_AXIS = 2,
C_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, E_AXIS = 3,
X_HEAD = 4, #endif
Y_HEAD = 5, X_HEAD, Y_HEAD, Z_HEAD,
Z_HEAD = 6 ALL_AXES = 0xFE,
NO_AXIS = 0xFF
}; };
#define LOOP_XYZ(VAR) for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++) #define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
#define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; 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 { typedef enum {
LINEARUNIT_MM, LINEARUNIT_MM,
@@ -63,84 +79,48 @@ typedef enum {
* Debug flags * Debug flags
* Not yet widely applied * Not yet widely applied
*/ */
enum DebugFlags { enum DebugFlags : unsigned char {
DEBUG_NONE = 0, DEBUG_NONE = 0,
DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed 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_INFO = _BV(1), ///< Print messages for code that has debug output
DEBUG_ERRORS = _BV(2), ///< Not implemented DEBUG_ERRORS = _BV(2), ///< Not implemented
DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands
DEBUG_COMMUNICATION = _BV(4), ///< Not implemented DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
DEBUG_LEVELING = _BV(5) ///< Print detailed output for homing and leveling DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling
DEBUG_MESH_ADJUST = _BV(6), ///< UBL bed leveling
DEBUG_ALL = 0xFF
}; };
enum EndstopEnum { #if ENABLED(ADVANCED_PAUSE_FEATURE)
X_MIN, enum AdvancedPauseMenuResponse : char {
Y_MIN, ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
Z_MIN, ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
Z_MIN_PROBE, ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
X_MAX,
Y_MAX,
Z_MAX,
Z2_MIN,
Z2_MAX
};
/**
* Temperature
* Stages in the ISR loop
*/
enum TempState {
PrepareTemp_0,
MeasureTemp_0,
PrepareTemp_BED,
MeasureTemp_BED,
PrepareTemp_1,
MeasureTemp_1,
PrepareTemp_2,
MeasureTemp_2,
PrepareTemp_3,
MeasureTemp_3,
Prepare_FILWIDTH,
Measure_FILWIDTH,
StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
};
#if ENABLED(EMERGENCY_PARSER)
enum e_parser_state {
state_RESET,
state_N,
state_M,
state_M1,
state_M10,
state_M108,
state_M11,
state_M112,
state_M4,
state_M41,
state_M410,
state_IGNORE // to '\n'
};
#endif
#if ENABLED(FILAMENT_CHANGE_FEATURE)
enum FilamentChangeMenuResponse {
FILAMENT_CHANGE_RESPONSE_WAIT_FOR,
FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE,
FILAMENT_CHANGE_RESPONSE_RESUME_PRINT
}; };
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
enum FilamentChangeMessage { enum AdvancedPauseMessage : char {
FILAMENT_CHANGE_MESSAGE_INIT, ADVANCED_PAUSE_MESSAGE_INIT,
FILAMENT_CHANGE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MESSAGE_UNLOAD,
FILAMENT_CHANGE_MESSAGE_INSERT, ADVANCED_PAUSE_MESSAGE_INSERT,
FILAMENT_CHANGE_MESSAGE_LOAD, ADVANCED_PAUSE_MESSAGE_LOAD,
FILAMENT_CHANGE_MESSAGE_EXTRUDE, ADVANCED_PAUSE_MESSAGE_PURGE,
FILAMENT_CHANGE_MESSAGE_OPTION, #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
FILAMENT_CHANGE_MESSAGE_RESUME, ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE,
FILAMENT_CHANGE_MESSAGE_STATUS #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 #endif
enum AdvancedPauseMode : char {
ADVANCED_PAUSE_MODE_PAUSE_PRINT,
ADVANCED_PAUSE_MODE_LOAD_FILAMENT,
ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT
};
#endif #endif
/** /**
@@ -148,7 +128,7 @@ enum TempState {
* Marlin sends messages if blocked or busy * Marlin sends messages if blocked or busy
*/ */
#if ENABLED(HOST_KEEPALIVE_FEATURE) #if ENABLED(HOST_KEEPALIVE_FEATURE)
enum MarlinBusyState { enum MarlinBusyState : char {
NOT_BUSY, // Not in a handler NOT_BUSY, // Not in a handler
IN_HANDLER, // Processing a GCode IN_HANDLER, // Processing a GCode
IN_PROCESS, // Known to be blocking command input (as in G29) IN_PROCESS, // Known to be blocking command input (as in G29)
@@ -157,32 +137,15 @@ enum TempState {
}; };
#endif #endif
#if ENABLED(MESH_BED_LEVELING)
enum MeshLevelingState {
MeshReport,
MeshStart,
MeshNext,
MeshSet,
MeshSetZOffset,
MeshReset
};
enum MBLStatus {
MBL_STATUS_NONE = 0,
MBL_STATUS_HAS_MESH_BIT = 0,
MBL_STATUS_ACTIVE_BIT = 1
};
#endif
/** /**
* SD Card * SD Card
*/ */
enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename }; enum LsAction : char { LS_SerialPrint, LS_Count, LS_GetFilename };
/** /**
* Ultra LCD * Ultra LCD
*/ */
enum LCDViewAction { enum LCDViewAction : char {
LCDVIEW_NONE, LCDVIEW_NONE,
LCDVIEW_REDRAW_NOW, LCDVIEW_REDRAW_NOW,
LCDVIEW_CALL_REDRAW_NEXT, LCDVIEW_CALL_REDRAW_NEXT,
@@ -190,4 +153,23 @@ enum LCDViewAction {
LCDVIEW_CALL_NO_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__ #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

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,29 @@
# Example Configuration for BQ [Hephestos 2](http://www.bq.com/uk/hephestos-2)
Based on the original configuration file shipped with the heavily modified Marlin fork by BQ.
The forked firmware and configuration files can be found at the [BQ Github repository](https://github.com/bq/Marlin).
NOTE: The look and feel of the LCD menu will change dramatically when using the original Marlin firmware.
## Changelog
* 2018/05/30 - Configuration updated to the latest Marlin version (43a55a9af).
ABL Bilinear 5x5 is active by default.
* 2017/07/06 - Configuration updated to the latest Marlin version and added support for the
official BQ heated bed upgrade kit.
* 2016/12/13 - Configuration updated to the latest Marlin version.
* 2016/07/13 - Configuration updated to the latest Marlin version.
* 2016/06/21 - Disabled heated bed related options, activated software endstops and SD printing now
disables the heater when finishes printing.
* 2016/03/21 - Activated 4-point auto leveling by default and updated miscellaneous z-probe values.
* 2016/03/01 - The first release of Marlin's configuration file for the
BQ Hephestos 2 3D printer.
## Support
This configuration should work easily with the stock Hephestos 2, nevertheless if you encounter any
issues you may contact me on [Github](https://github.com/jbrazio), [Twitter](https://twitter.com/jbrazio) or by mail.

View File

@@ -0,0 +1,100 @@
/**
* 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/>.
*
*/
/**
* Custom Boot Screen bitmap
*
* Place this file in the root with your configuration files
* and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
*
* Use the Marlin Bitmap Converter to make your own:
* http://marlinfw.org/tools/u8glib/converter.html
*/
#define CUSTOM_BOOTSCREEN_BMPWIDTH 64
const unsigned char custom_start_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000011,B11110000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00001111,B11111100,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00001111,B11111100,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000111,B11111000,B00000000,B00000000,B00000000,
B00000000,B00000000,B11111000,B00000111,B11111000,B00000111,B11000000,B00000000,
B00000000,B00000001,B11111100,B00000011,B11110000,B00001111,B11100000,B00000000,
B00000000,B00000011,B11111110,B00000000,B11000000,B00011111,B11110000,B00000000,
B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
B00000000,B00000011,B11111110,B00000000,B00000000,B00011111,B11110000,B00000000,
B00000000,B00000011,B11111100,B00000000,B00000000,B00001111,B11100000,B00000000,
B00000000,B00000001,B11111000,B00000000,B00000000,B00001111,B11100000,B00000000,
B00000000,B00000000,B01110000,B00000000,B00000000,B00000011,B10000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111100,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00001111,B10000000,B00000000,B00000000,B01110000,B00000000,B00000000,B00000000,
B00011111,B11000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
B00111111,B11000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
B00111111,B11100000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
B00111111,B11100000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,
B00111111,B11100000,B00000000,B00000000,B01111011,B11000000,B00001111,B00000000,
B00111111,B11000000,B00000000,B00000000,B01111111,B11110000,B00111111,B11000000,
B00011111,B10000000,B00000000,B00000000,B01111111,B11111000,B01111111,B11100000,
B00001111,B00000000,B00000000,B00000000,B01111110,B11111100,B11111001,B11110000,
B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B11100000,B11110000,
B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
B00000000,B00000000,B00000000,B00000000,B01111000,B00011101,B11100000,B01110000,
B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B11100000,B11110000,
B00000000,B00000000,B00000000,B00000000,B01111100,B01111100,B11111001,B11110000,
B00000000,B00000000,B00000000,B00000000,B00011111,B11111000,B11111111,B11110000,
B00000000,B00000000,B00000000,B00000000,B00001111,B11110000,B01111111,B11110000,
B00000000,B00000000,B00000000,B00000000,B00000111,B11100000,B00011111,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
};

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

View File

@@ -21,83 +21,80 @@
*/ */
/** /**
* Custom Bitmap for splashscreen * Custom Boot Screen bitmap
* *
* You may use one of the following tools to generate the C++ bitmap array from * Place this file in the root with your configuration files
* a black and white image: * and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
* *
* - http://www.marlinfw.org/tools/u8glib/converter.html * Use the Marlin Bitmap Converter to make your own:
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php * http://marlinfw.org/tools/u8glib/converter.html
*/ */
#include <avr/pgmspace.h>
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500 #define CUSTOM_BOOTSCREEN_BMPWIDTH 64
#define CUSTOM_BOOTSCREEN_BMPWIDTH 63
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
const unsigned char custom_start_bmp[512] PROGMEM = { const unsigned char custom_start_bmp[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00111111,B11111100,B00000000,B00000000,B00000000,
0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, B00000000,B00000000,B00000011,B11111111,B11111111,B11000000,B00000000,B00000000,
0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, B00000000,B00000000,B00011111,B11111111,B11111111,B11110000,B00000000,B00000000,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xfc, 0x00, 0x00, B00000000,B00000000,B01111111,B11111111,B11111111,B11111100,B00000000,B00000000,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, B00000000,B00000000,B11111111,B11111111,B11111111,B11111111,B00000000,B00000000,
0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B10000000,B00000000,
0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11000000,B00000000,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B00000000,
0x00, 0x0f, 0x07, 0x87, 0xff, 0xff, 0xe0, 0x00, B00000000,B00001111,B00000111,B10000111,B11111111,B11111111,B11100000,B00000000,
0x00, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0x00, B00000000,B00011111,B10001111,B11000111,B11111111,B11111111,B11110001,B00000000,
0x01, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0x80, B00000001,B00011111,B10001111,B11000111,B11111111,B11111111,B11110001,B10000000,
0x03, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0x80, B00000011,B00011111,B10001111,B11000111,B11111111,B11111111,B11110001,B10000000,
0x07, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xe1, 0xc0, B00000111,B00011111,B10001111,B11000111,B11111111,B11111111,B11100001,B11000000,
0x07, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xe0, B00000111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11100000,
0x0f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xe0, B00001111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11100000,
0x0f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xf0, B00001111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11110000,
0x1f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xf0, B00011111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11110000,
0x1f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xe1, 0xf0, B00011111,B00011111,B10001111,B11000111,B11111111,B11111111,B11100001,B11110000,
0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0xf8, B00111111,B00011111,B10001111,B11000111,B11111111,B11111111,B11110001,B11111000,
0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0xf8, B00111111,B00011111,B10001111,B11000111,B11111111,B11111111,B11110001,B11111000,
0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0xf8, B00111111,B00011111,B10001111,B11000111,B11111111,B11111111,B11110001,B11111000,
0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xe1, 0xf8, B00111111,B00011111,B10001111,B11000111,B11111111,B11111111,B11100001,B11111000,
0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, B01111111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11111100,
0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, B01111111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11111100,
0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, B01111111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11111100,
0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, B01111111,B00011111,B10001111,B11000111,B11000000,B00000000,B00000001,B11111100,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,
0x7f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xfc, B01111111,B00000000,B00000000,B00000111,B11000111,B11100011,B11110001,B11111100,
0x7f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xfc, B01111111,B00000000,B00000000,B00000111,B11000111,B11100011,B11110001,B11111100,
0x7f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xfc, B01111111,B00000000,B00000000,B00000111,B11000111,B11100011,B11110001,B11111100,
0x3f, 0x0f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, B00111111,B00001111,B11111111,B11111111,B11000111,B11100011,B11110001,B11111000,
0x3f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, B00111111,B00011111,B11111111,B11111111,B11000111,B11100011,B11110001,B11111000,
0x3f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, B00111111,B00011111,B11111111,B11111111,B11000111,B11100011,B11110001,B11111000,
0x3f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, B00111111,B00011111,B11111111,B11111111,B11000111,B11100011,B11110001,B11111000,
0x1f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf0, B00011111,B00011111,B11111111,B11111111,B11000111,B11100011,B11110001,B11110000,
0x1f, 0x0f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf0, B00011111,B00001111,B11111111,B11111111,B11000111,B11100011,B11110001,B11110000,
0x1f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xe0, B00011111,B00000000,B00000000,B00000111,B11000111,B11100011,B11110001,B11100000,
0x0f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xe0, B00001111,B00000000,B00000000,B00000111,B11000111,B11100011,B11110001,B11100000,
0x0f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xc0, B00001111,B00000000,B00000000,B00000111,B11000111,B11100011,B11110001,B11000000,
0x07, 0x0f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xc0, B00000111,B00001111,B11111111,B11111111,B11000111,B11100011,B11110001,B11000000,
0x03, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0x80, B00000011,B00011111,B11111111,B11111111,B11000111,B11100011,B11110001,B10000000,
0x03, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0x00, B00000011,B00011111,B11111111,B11111111,B11000111,B11100011,B11110001,B00000000,
0x01, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf0, 0x00, B00000001,B00011111,B11111111,B11111111,B11000111,B11100011,B11110000,B00000000,
0x00, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf0, 0x00, B00000000,B00011111,B11111111,B11111111,B11000111,B11100011,B11110000,B00000000,
0x00, 0x0f, 0xff, 0xff, 0xc3, 0xc1, 0xe0, 0x00, B00000000,B00001111,B11111111,B11111111,B11000011,B11000001,B11100000,B00000000,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B00000000,
0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11000000,B00000000,
0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B10000000,B00000000,
0x00, 0x01, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, B00000000,B00000001,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xfc, 0x00, 0x00, B00000000,B00000000,B01111111,B11111111,B11111111,B11111100,B00000000,B00000000,
0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, B00000000,B00000000,B00011111,B11111111,B11111111,B11110000,B00000000,B00000000,
0x00, 0x00, 0x07, 0xff, 0xff, 0x80, 0x00, 0x00, B00000000,B00000000,B00000111,B11111111,B11111111,B10000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B01111111,B11111000,B00000000,B00000000,B00000000,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
}; };

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,55 @@
/**
* 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/>.
*
*/
/**
* Custom Boot Screen bitmap
*
* Place this file in the root with your configuration files
* and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
*
* Use the Marlin Bitmap Converter to make your own:
* http://marlinfw.org/tools/u8glib/converter.html
*/
#define CUSTOM_BOOTSCREEN_TIMEOUT 1000
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
const unsigned char custom_start_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111100,B00000000,B00000000,
B00001111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000001,B10000110,B00011111,B11000000,
B00011000,B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00111100,B00001100,B00000000,B00000000,B00000001,B10000011,B00001100,B01100000,
B00010000,B00110000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00111100,B00001100,B00000000,B00000000,B00000001,B10000011,B00001100,B00110000,
B00110000,B00110000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00000000,B00001100,B00000000,B00000000,B00000000,B00000011,B00001100,B00011000,
B00110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00000000,B00111111,B00001111,B00111100,B00000000,B00000011,B00001100,B00001100,
B01100000,B00000001,B11011111,B00001111,B11100000,B11111110,B00000000,B01100000,B00011100,B00011100,B00000110,B00011000,B00000000,B00000110,B00001100,B00001100,
B01100000,B00000000,B11110011,B00011000,B00110001,B10000011,B00000000,B01100000,B00001100,B00001100,B00000011,B00011000,B00000000,B00011110,B00001100,B00001100,
B01100000,B00000000,B11100000,B00110000,B00111001,B10000011,B00000000,B01100000,B00001100,B00001100,B00000011,B00110000,B00000000,B00000011,B00001100,B00001100,
B01100000,B00000000,B11000000,B00110000,B00111000,B00001111,B00000000,B01100000,B00001100,B00001100,B00000011,B00110000,B00000000,B00000001,B10001100,B00001100,
B01100000,B00000000,B11000000,B00111111,B11111000,B11111011,B00000000,B01100000,B00001100,B00001100,B00000011,B00110000,B00000000,B00000001,B10001100,B00001100,
B01100000,B00110000,B11000000,B00110000,B00000001,B10000011,B00000000,B01100000,B00001100,B00001100,B00000001,B11110000,B00000001,B10000001,B10001100,B00001100,
B01100000,B00110000,B11000000,B00110000,B00000001,B10000011,B00000000,B01100000,B00001100,B00001100,B00000000,B11100000,B00000001,B10000001,B10001100,B00011000,
B00110000,B00110000,B11000000,B00011000,B00110001,B10000011,B00000000,B01100000,B00001100,B00001100,B01000000,B11100000,B00000001,B10000011,B10001100,B00110000,
B00011000,B01100000,B11000000,B00001100,B01100001,B10000111,B11000000,B11100000,B00011100,B00001100,B11000000,B01100000,B00000000,B11000011,B00001100,B01100000,
B00001111,B11000011,B11110000,B00000111,B11000000,B11111111,B11000111,B11111100,B01111111,B00000111,B10000001,B11000000,B00000000,B01111110,B00011111,B11000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B00000000,B00000000,B00000000,B00000000,B00000000
};

View File

@@ -0,0 +1,80 @@
/**
* 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/>.
*
*/
/**
* Custom Status Screen bitmap
*
* Place this file in the root with your configuration files
* and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
*
* Use the Marlin Bitmap Converter to make your own:
* http://marlinfw.org/tools/u8glib/converter.html
*/
#define STATUS_SCREENWIDTH 128
#define STATUS_SCREEN_HOTEND_TEXT_X(E) 38
#define STATUS_SCREEN_BED_TEXT_X 73
//============================================
const unsigned char status_screen0_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110000,B11111100,B00110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B11111100,B00010000,
B00000000,B00111110,B00001111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B01111000,B00010000,
B00000000,B11000001,B10000110,B00011000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100000,B00110000,B00010000,
B00000000,B11000001,B10000110,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101100,B00000000,B11010000,
B00000000,B00000001,B10000110,B00000100,B00000000,B00011111,B11100000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00101110,B00110001,B11010000,
B00000000,B00000011,B00000110,B00000100,B00000000,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00101111,B01111011,B11010000,
B00000000,B00011111,B00000110,B00000100,B00000000,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00101111,B01111011,B11010000,
B00000000,B00000011,B00000110,B00000100,B00000000,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00101110,B00110001,B11010000,
B00000000,B00000001,B10000110,B00000100,B00000000,B00011111,B11100000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00101100,B00000000,B11010000,
B00000000,B11000001,B10000110,B00001100,B00000000,B00011111,B11100000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00100000,B00110000,B00010000,
B00000000,B11000001,B10000110,B00011000,B00000000,B00111111,B11110000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00100000,B01111000,B00010000,
B00000000,B00111110,B00001111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00100000,B11111100,B00010000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00110000,B11111100,B00110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00111111,B11111111,B11110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000
};
const unsigned char status_screen1_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00110011,B10000111,B00110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00100111,B10000111,B10010000,
B00000000,B00111110,B00001111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
B00000000,B11000001,B10000110,B00011000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B10000111,B11010000,
B00000000,B11000001,B10000110,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00101111,B00000011,B11010000,
B00000000,B00000001,B10000110,B00000100,B00000000,B00011111,B11100000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00100000,B00110000,B00010000,
B00000000,B00000011,B00000110,B00000100,B00000000,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00100000,B01111000,B00010000,
B00000000,B00011111,B00000110,B00000100,B00000000,B00111111,B11110000,B00000000,B00000000,B00000100,B00010000,B01000000,B00000000,B00100000,B01111000,B00010000,
B00000000,B00000011,B00000110,B00000100,B00000000,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00100000,B00110000,B00010000,
B00000000,B00000001,B10000110,B00000100,B00000000,B00011111,B11100000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00101111,B00000011,B11010000,
B00000000,B11000001,B10000110,B00001100,B00000000,B00011111,B11100000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00101111,B10000111,B11010000,
B00000000,B11000001,B10000110,B00011000,B00000000,B00111111,B11110000,B00000000,B00000000,B00100000,B10000010,B00000000,B00000000,B00101111,B10000111,B11010000,
B00000000,B00111110,B00001111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00010000,B01000001,B00000000,B00000000,B00100111,B10000111,B10010000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11110000,B00000000,B00000000,B00001000,B00100000,B10000000,B00000000,B00110011,B10000111,B00110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B00000000,B01110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B10000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00111111,B11111111,B11110000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000
};

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