Compare commits
352 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b788ce25f5 | |||
| 1a9a5b82a8 | |||
| cb9f103421 | |||
| 9479cd9ce7 | |||
| 477b70eccf | |||
| b2dd2dc217 | |||
| b106f59eb4 | |||
| 38f483c4a6 | |||
| f4eafed188 | |||
| 5987a5464b | |||
| 3a888e956b | |||
| 4cddc61eda | |||
| c7de99b141 | |||
| 9ad55840bb | |||
| 81011a71b1 | |||
| 2a8c00bdeb | |||
| 4ae2a76492 | |||
| a5d097abe6 | |||
| 5e0a8d2124 | |||
| 994aa9f692 | |||
| 6e67ad51b7 | |||
| 52693f72af | |||
| 991f433ac1 | |||
| 54b7da18cb | |||
| f8771e9ad5 | |||
| be1dee7caf | |||
| 68b7802fc1 | |||
| 6d407767e7 | |||
| 4a9e102c2e | |||
| 1ac6428c82 | |||
| 7c159a20e5 | |||
| 5b74e25108 | |||
| f02fa6339f | |||
| 2cc52318e3 | |||
| d602fb9421 | |||
| 8c1e4b5250 | |||
| d2a5d2d220 | |||
| 9ff3500dda | |||
| 30e5554171 | |||
| 190204e6b8 | |||
| 9d4aff6eab | |||
| d74ecde544 | |||
| ad4cf3e332 | |||
| 701ab0db8e | |||
| b3f2f44124 | |||
| a03ee01cee | |||
| 9bb87da816 | |||
| 5fbb7cbe6a | |||
| 8af96b8cdd | |||
| 5cdc4527d3 | |||
| 0206af6c07 | |||
| fb5dd40949 | |||
| 9c1366ed99 | |||
| e7c505d415 | |||
| e304aa9da7 | |||
| c1775c9005 | |||
| dbd9321380 | |||
| 7f6622e6ac | |||
| 04ffe9493b | |||
| 6c39286626 | |||
| 86b9e7ee13 | |||
| 6566031ec6 | |||
| e7a6c77d74 | |||
| 2436e2463c | |||
| 9fffe26c20 | |||
| 3ab1c95ab3 | |||
| 7f32519aa9 | |||
| ff91016e81 | |||
| 4615345773 | |||
| 25ff9813c6 | |||
| 8ba8ae85c4 | |||
| dc1cd03897 | |||
| 304ca54aba | |||
| e175f3f729 | |||
| 641fc9c833 | |||
| 6e2597593a | |||
| c29a949a13 | |||
| 26268313c4 | |||
| da8412db6a | |||
| 9bf6c900c4 | |||
| aa6e7b0300 | |||
| 0663c5a372 | |||
| ad42498dfb | |||
| 662d03896b | |||
| 8b09d27cd9 | |||
| d7c8cf3a9e | |||
| c9ae761066 | |||
| 7bed426de3 | |||
| 048de70ee6 | |||
| 6049f226bc | |||
| c02083677a | |||
| 64ed7aff53 | |||
| a694291420 | |||
| 0216e032be | |||
| 2d8aa0cea1 | |||
| d1eb100806 | |||
| 1d3c53ae2f | |||
| 97d5da4c11 | |||
| 359e0641c4 | |||
| 2c4e4edade | |||
| c6ae6c53a8 | |||
| c596e9f3f0 | |||
| 37ebee1cef | |||
| 76cbaeeb2e | |||
| 79b8ad13f1 | |||
| d0a8bc29be | |||
| 10901d9092 | |||
| dddc232294 | |||
| 1419f2637e | |||
| 91b08d2deb | |||
| 2f3af1c9da | |||
| 2d6a5201cf | |||
| a390a348d0 | |||
| b3a732b43a | |||
| bb6d74383e | |||
| 9e8b2121dd | |||
| af91b4d29f | |||
| 609325a8b4 | |||
| 3bd861bf19 | |||
| ed3de53587 | |||
| 82eddcd6e7 | |||
| 3929349c1b | |||
| e095f94f9f | |||
| 9127ec6bd7 | |||
| 7a9d26d1a0 | |||
| af0b517e8f | |||
| aeb062b33e | |||
| 15fe76dd6a | |||
| 7265db1b36 | |||
| c5104c1d2b | |||
| 8b91d1d255 | |||
| 9518cb0f2e | |||
| c2bd4928a5 | |||
| 7120df3b85 | |||
| f25156971b | |||
| 650ca3baa6 | |||
| 3ceb4a5c46 | |||
| 8511d9e781 | |||
| 7aa6d3ef09 | |||
| f7fdbb4eb3 | |||
| 7d0cd9ccf5 | |||
| ead8d29316 | |||
| 58a6d42db6 | |||
| 50833c9836 | |||
| 5d704b8494 | |||
| 3621a0a3f6 | |||
| 10b9e5ca34 | |||
| bcef7ad91b | |||
| 1666980b5b | |||
| 58a6d1b8d4 | |||
| 2151f4c50b | |||
| ee7e532761 | |||
| 4a7665a1e9 | |||
| 1e4d50b6e8 | |||
| 3ae543dd30 | |||
| 041959f903 | |||
| df922ed7c8 | |||
| 41534e78f8 | |||
| fabdb6a51e | |||
| fac1a75596 | |||
| bd5ded15e7 | |||
| 530e807bcd | |||
| 251a0268c4 | |||
| 4fdded0e2d | |||
| f4e26c785f | |||
| 9100ed15fa | |||
| dc82db35d4 | |||
| 610fb6fd35 | |||
| 594882f7a9 | |||
| 4e160fea16 | |||
| 99d5ad3b09 | |||
| a9f6080931 | |||
| 1b0301c89f | |||
| 94798e4465 | |||
| 65b59a6646 | |||
| 09f5b5d00a | |||
| 3487cbad21 | |||
| da8e07b697 | |||
| 402a13a980 | |||
| 56f7a03a5c | |||
| 3113388293 | |||
| eecfc0479a | |||
| 9984643e4c | |||
| 58114b32ba | |||
| 50a6fb637f | |||
| d71b12cd8b | |||
| 42842f71e0 | |||
| 5213de4eaa | |||
| 602c9fffe0 | |||
| 4d73906008 | |||
| 0da50d80ef | |||
| f0bbc163c6 | |||
| 78aec86650 | |||
| 6bd2a602ca | |||
| 6b923de48d | |||
| a645efd189 | |||
| a717a3eacb | |||
| da03b84eff | |||
| aa6d23c7cb | |||
| 2a1826f1ed | |||
| 8e79ea09e4 | |||
| e29dbb946e | |||
| b1f8fa881d | |||
| c2a2d04b50 | |||
| 84d0a5ebd1 | |||
| 6ed5c22d7c | |||
| 07246fdc30 | |||
| 14899ca3f7 | |||
| 2d0972d35d | |||
| c43828b2e3 | |||
| bc13685c46 | |||
| 14d374dc2b | |||
| 5dc45f2ceb | |||
| 8ed81063a2 | |||
| cb92d78a46 | |||
| d94a20e63a | |||
| b2ff518c27 | |||
| 4c1d5e8fcf | |||
| e13d6ba012 | |||
| ec08edd240 | |||
| 1c890a9da0 | |||
| e070ce987f | |||
| 45b75301a8 | |||
| 491cfc6ae0 | |||
| d42b24369f | |||
| 8280cfef43 | |||
| 785da0db6c | |||
| eaad3c451c | |||
| fd751bd3fe | |||
| 0785d312f7 | |||
| 5dc96c7324 | |||
| 2532ef1049 | |||
| dd2d4df3dc | |||
| a583d8998f | |||
| 953cf6f7d6 | |||
| fcd4fa4ab7 | |||
| 123a2b28fc | |||
| 28261437f8 | |||
| c0a48e4fe2 | |||
| 5b2353a2ab | |||
| cafd4ff6a6 | |||
| f98aff039c | |||
| 5e93e09c1a | |||
| ca5c5fdd40 | |||
| 71c1b8ca6d | |||
| e5c2fbd6ac | |||
| 3618b9c7be | |||
| 7ab7cfc96d | |||
| 92db4f2d84 | |||
| e2ce5865c9 | |||
| 6815edf8d6 | |||
| f8ff1c8d6a | |||
| 6ab5745875 | |||
| 8bb6a9b44a | |||
| 52ec2a266f | |||
| 33f6219f06 | |||
| dd6153f317 | |||
| 05af0cbb55 | |||
| ff39019034 | |||
| a5eefa9ffa | |||
| 109e8f88ce | |||
| 00413994dd | |||
| 8e39965b2d | |||
| 87f6e91f51 | |||
| 0cb0df6bee | |||
| 80e2ab6ed6 | |||
| e406791b6f | |||
| 438eb8ebb3 | |||
| 206b5ab014 | |||
| 2ab7fa652c | |||
| 87d1df38de | |||
| c392cb6d9d | |||
| 7ae0805095 | |||
| a2f86e84a4 | |||
| b8a2160f82 | |||
| 99d49108c1 | |||
| e6671b3065 | |||
| df82a0e497 | |||
| 1832269181 | |||
| 8341f282ee | |||
| 4fdf747445 | |||
| 61b6a0ea9f | |||
| 5006ca07be | |||
| 8579af67a2 | |||
| 8f49610d3a | |||
| 8fd08ba1f8 | |||
| c0c4f77c36 | |||
| b6cbad224b | |||
| c765c7484c | |||
| 3242d3dca2 | |||
| 58f774e98d | |||
| 79ff336b2b | |||
| 0d367432e6 | |||
| 959919bcfe | |||
| 4f7289e022 | |||
| af8be03165 | |||
| 88ce2c94f8 | |||
| 0a52d5c032 | |||
| 38286d9805 | |||
| 0ece75536c | |||
| 4b377bb032 | |||
| 0392a56193 | |||
| 58654b3664 | |||
| 8b324e08d9 | |||
| 1bf3881adc | |||
| e2c1ca3bca | |||
| 234b15a12c | |||
| 80a0c3b028 | |||
| e73644f3fe | |||
| 9a6d6a4405 | |||
| 777abb71b5 | |||
| ac4ffdb4e5 | |||
| 691a297b6a | |||
| bec97532ee | |||
| 406cd0cc83 | |||
| 62af625be4 | |||
| 26917ebf96 | |||
| 3d8bfb036d | |||
| a0f0af5da8 | |||
| 27c99f74ad | |||
| 050cef7b48 | |||
| 5d74ace99f | |||
| 3130fd9532 | |||
| f0c531abb6 | |||
| ce2874b732 | |||
| a55cef1165 | |||
| 682b0b440d | |||
| 7025912957 | |||
| bb6b23891c | |||
| 1b211947b8 | |||
| ea15d3edab | |||
| 47c6f8a98b | |||
| ccb2c3bb85 | |||
| e74b9776e5 | |||
| e61bbe1499 | |||
| ffd7062e21 | |||
| 7255ca0bc6 | |||
| f7c56bc5e4 | |||
| e4c973487b | |||
| d4ab268bbf | |||
| b4dbf606b7 | |||
| f6a1d772c2 | |||
| ae208fa92f | |||
| f11d496899 | |||
| a3d0fe53cf | |||
| 395d11b06f | |||
| e79b328103 | |||
| 1c19d9a86a | |||
| 6043f88b35 | |||
| 2087e6fbcf | |||
| c67086bdba | |||
| 24e6dbcf48 |
+443
-157
File diff suppressed because it is too large
Load Diff
+410
-223
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-01-01"
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-01-09"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* 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 Bitmap for splashscreen
|
||||
*
|
||||
* You may use one of the following tools to generate the C++ bitmap array from
|
||||
* a black and white image:
|
||||
*
|
||||
* - http://www.marlinfw.org/tools/u8glib/converter.html
|
||||
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||
*/
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 60
|
||||
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
|
||||
|
||||
const unsigned char custom_start_bmp[574] PROGMEM = {
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x23, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x21, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x4c, 0x80, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x5e, 0x80, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x92, 0x40, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0xa1, 0x40, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x1, 0x21, 0x20, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x2, 0x7f, 0x90, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x2, 0x0, 0x10, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x7, 0xff, 0xf8, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x4, 0x0, 0x8, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x8, 0x0, 0x4, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x8, 0x0, 0x6, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x30, 0x1e, 0x1, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x20, 0x7f, 0x81, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x41, 0xff, 0xe0, 0x80, 0x0, 0x0,
|
||||
0x0, 0x0, 0x43, 0xfc, 0xf0, 0x80, 0x0, 0x0,
|
||||
0x0, 0x0, 0x87, 0x3b, 0x78, 0x40, 0x0, 0x0,
|
||||
0x0, 0x1, 0x8e, 0xdb, 0xfc, 0x60, 0x0, 0x0,
|
||||
0x0, 0x1, 0xf, 0xeb, 0xcc, 0x20, 0x0, 0x0,
|
||||
0x0, 0x2, 0x1f, 0xed, 0xb6, 0x10, 0x0, 0x0,
|
||||
0x0, 0x2, 0x1f, 0xde, 0xb6, 0x10, 0x0, 0x0,
|
||||
0x0, 0x4, 0x39, 0xcd, 0x7f, 0x8, 0x0, 0x0,
|
||||
0x0, 0x4, 0x36, 0xe0, 0xff, 0x8, 0x0, 0x0,
|
||||
0x0, 0x8, 0x7e, 0xc0, 0xbb, 0x84, 0x0, 0x0,
|
||||
0x0, 0x18, 0x7f, 0x0, 0x5d, 0x86, 0x0, 0x0,
|
||||
0x0, 0x10, 0x7f, 0xc0, 0xed, 0x82, 0x0, 0x0,
|
||||
0x0, 0x20, 0x3c, 0xc0, 0x73, 0x1, 0x0, 0x0,
|
||||
0x0, 0x20, 0x3b, 0x33, 0x7f, 0x1, 0x0, 0x0,
|
||||
0x0, 0x70, 0x1b, 0xe7, 0x7e, 0x3, 0x80, 0x0,
|
||||
0x0, 0xc8, 0x1d, 0xee, 0xde, 0x4, 0xc0, 0x0,
|
||||
0x0, 0x88, 0xf, 0xde, 0xdc, 0x4, 0x40, 0x0,
|
||||
0x1, 0x24, 0xf, 0xdf, 0x3c, 0x9, 0x20, 0x0,
|
||||
0x1, 0x26, 0x7, 0xdb, 0xf8, 0x19, 0x20, 0x0,
|
||||
0x2, 0x72, 0x3, 0xe7, 0xf0, 0x13, 0x90, 0x0,
|
||||
0x2, 0x51, 0x1, 0xff, 0xe0, 0x22, 0x90, 0x0,
|
||||
0x4, 0x89, 0x0, 0x7f, 0x80, 0x24, 0x48, 0x0,
|
||||
0x9, 0x4, 0x80, 0x1e, 0x0, 0x48, 0x24, 0x0,
|
||||
0xb, 0xfe, 0x40, 0x0, 0x0, 0xdf, 0xf4, 0x0,
|
||||
0x10, 0x0, 0x40, 0x0, 0x0, 0x80, 0x2, 0x0,
|
||||
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x10, 0x22, 0x10, 0x3c, 0x3c, 0xe, 0x1f, 0x0,
|
||||
0x10, 0x22, 0x10, 0x4, 0x22, 0x11, 0x4, 0x0,
|
||||
0x10, 0x22, 0x10, 0x8, 0x22, 0x11, 0x4, 0x0,
|
||||
0x10, 0x22, 0x10, 0x8, 0x3c, 0x11, 0x4, 0x0,
|
||||
0x10, 0x22, 0x10, 0x10, 0x22, 0x11, 0x4, 0x0,
|
||||
0x10, 0x22, 0x10, 0x20, 0x22, 0x11, 0x4, 0x0,
|
||||
0x1e, 0x1c, 0x1e, 0x3c, 0x3c, 0xe, 0x4, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
# USB Files Source Documentation
|
||||
|
||||
## Source
|
||||
|
||||
We sourced the USB files in Marlin from the Atmel ASF (Advanced Software Framework). The framework provides a variety of examples which were utilized in this project.
|
||||
|
||||
Atmel doesn't provide these files in a source repository but they can be extracted from ASF, which can be downloaded from Atmel.
|
||||
|
||||
[Advanced Software Framework](https://www.microchip.com/en-us/tools-resources/develop/libraries/advanced-software-framework)
|
||||
|
||||
## Modifications
|
||||
|
||||
The files are mostly unmodified except for minor cosmetic changes but some more significant changes were needed.
|
||||
|
||||
The changes that prompted the addition of this README file are listed below. Other changes may have been made prior to this.
|
||||
|
||||
1. Modified `uotghs_device_due.c` to resolve race conditions that could leave interrupts asserted when freezing the peripheral clock, resulting in hangs and watchdog resets due to the ensuing interrupt storm.
|
||||
|
||||
## Version Information
|
||||
|
||||
We don't know the exact version of ASF used as the source. However, the copyright information in the files indicates they are from 2015.
|
||||
|
||||
## Upgrade Considerations
|
||||
|
||||
We looked at the ASF 3.52.0 files released in 2022 but saw no immediate benefits to justify an upgrade. It's important to note that the files in Marlin don't follow the same folder structure as the files in ASF, which complicates the process of comparing and applying updated files.
|
||||
|
||||
When these files are updated it's important to carefully compare them to Marlin's versions so any improvements in the Marlin sources are brought forward.
|
||||
|
||||
It would be best to make Marlin's directory structure align with ASF or at least document the source of each file to ease future updates.
|
||||
@@ -116,6 +116,23 @@
|
||||
//#define dbg_print printf
|
||||
#define dbg_print(...)
|
||||
|
||||
// Marlin modification: Redefine the otg_freeze_clock and otg_unfreeze_clock macros
|
||||
// to add memory barriers to ensure that any accesses to USB registers aren't re-ordered
|
||||
// to occur while the clock is frozen.
|
||||
#undef otg_freeze_clock
|
||||
#undef otg_unfreeze_clock
|
||||
|
||||
#define otg_freeze_clock() do { \
|
||||
__DSB(); \
|
||||
Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK); \
|
||||
} while (0)
|
||||
|
||||
#define otg_unfreeze_clock() \
|
||||
do { \
|
||||
Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_FRZCLK); \
|
||||
__DSB(); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* \ingroup udd_group
|
||||
* \defgroup udd_udphs_group USB On-The-Go High-Speed Port for device mode (UOTGHS)
|
||||
@@ -611,6 +628,18 @@ ISR(UDD_USB_INT_FUN)
|
||||
// The wakeup interrupt is automatic acked when a suspend occur
|
||||
udd_disable_wake_up_interrupt();
|
||||
udd_enable_suspend_interrupt();
|
||||
|
||||
// Marlin modification: The RESET, SOF, and MSOF interrupts were previously
|
||||
// enabled in udd_attach, which caused a race condition where they could
|
||||
// be raised and unclearable with the clock is frozen. They are now
|
||||
// enabled here, after the clock has been unfrozen in response to the wake
|
||||
// interrupt.
|
||||
udd_enable_reset_interrupt();
|
||||
udd_enable_sof_interrupt();
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
udd_enable_msof_interrupt();
|
||||
#endif
|
||||
|
||||
udd_sleep_mode(true); // Enter in IDLE mode
|
||||
#ifdef UDC_RESUME_EVENT
|
||||
UDC_RESUME_EVENT();
|
||||
@@ -776,6 +805,27 @@ void udd_disable(void)
|
||||
cpu_irq_restore(flags);
|
||||
}
|
||||
|
||||
// Marlin modification: The original implementation did not use a memory
|
||||
// barrier between disabling and clearing interrupts. This sometimes
|
||||
// allowed interrupts to remain raised and unclearable after the clock
|
||||
// was frozen. This helper was added to ensure that memory barriers
|
||||
// are used consistently from all places where interrupts are disabled.
|
||||
static void disable_and_ack_sync_interrupts()
|
||||
{
|
||||
// Disable USB line events
|
||||
udd_disable_reset_interrupt();
|
||||
udd_disable_sof_interrupt();
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
udd_disable_msof_interrupt();
|
||||
#endif
|
||||
__DSB();
|
||||
udd_ack_reset();
|
||||
udd_ack_sof();
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
udd_ack_msof();
|
||||
#endif
|
||||
__DSB();
|
||||
}
|
||||
|
||||
void udd_attach(void)
|
||||
{
|
||||
@@ -796,17 +846,16 @@ void udd_attach(void)
|
||||
udd_attach_device();
|
||||
|
||||
// Enable USB line events
|
||||
udd_enable_reset_interrupt();
|
||||
udd_enable_suspend_interrupt();
|
||||
udd_enable_wake_up_interrupt();
|
||||
udd_enable_sof_interrupt();
|
||||
#ifdef USB_DEVICE_HS_SUPPORT
|
||||
udd_enable_msof_interrupt();
|
||||
#endif
|
||||
// Reset following interrupts flag
|
||||
udd_ack_reset();
|
||||
udd_ack_sof();
|
||||
udd_ack_msof();
|
||||
|
||||
// Marlin modification: The RESET, SOF, and MSOF interrupts were previously
|
||||
// enabled here, which caused a race condition where they could be raised
|
||||
// and unclearable with the clock is frozen. They are now enabled in the
|
||||
// wake interrupt handler, after the clock has been unfrozen. They are now
|
||||
// explicitly disabled here to ensure that they cannot be raised before
|
||||
// the clock is frozen.
|
||||
disable_and_ack_sync_interrupts();
|
||||
|
||||
// The first suspend interrupt must be forced
|
||||
// The first suspend interrupt is not detected else raise it
|
||||
@@ -824,6 +873,12 @@ void udd_detach(void)
|
||||
|
||||
// Detach device from the bus
|
||||
udd_detach_device();
|
||||
|
||||
// Marlin modification: Added the explicit disabling of the RESET, SOF, and
|
||||
// MSOF interrupts here, to ensure that they cannot be raised after the
|
||||
// clock is frozen.
|
||||
disable_and_ack_sync_interrupts();
|
||||
|
||||
otg_freeze_clock();
|
||||
udd_sleep_mode(false);
|
||||
}
|
||||
@@ -2043,6 +2098,12 @@ static bool udd_ep_interrupt(void)
|
||||
dbg_print("I ");
|
||||
udd_disable_in_send_interrupt(ep);
|
||||
// One bank is free then send a ZLP
|
||||
|
||||
// Marlin modification: Add a barrier to ensure in_send is disabled
|
||||
// before it is cleared. This was not an observed problem, but
|
||||
// other interrupts were seen to misbehave without this barrier.
|
||||
__DSB();
|
||||
|
||||
udd_ack_in_send(ep);
|
||||
udd_ack_fifocon(ep);
|
||||
udd_ep_finish_job(ptr_job, false, ep);
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <freertos/queue.h>
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
#if ENABLED(FT_MOTION)
|
||||
#include "../../module/ft_motion.h"
|
||||
#endif
|
||||
|
||||
#define DMA_BUF_COUNT 8 // number of DMA buffers to store data
|
||||
#define DMA_BUF_LEN 4092 // maximum size in bytes
|
||||
#define I2S_SAMPLE_SIZE 4 // 4 bytes, 32 bits per sample
|
||||
@@ -134,8 +138,8 @@ static void IRAM_ATTR i2s_intr_handler_default(void *arg) {
|
||||
|
||||
if (high_priority_task_awoken == pdTRUE) portYIELD_FROM_ISR();
|
||||
|
||||
// clear interrupt
|
||||
I2S0.int_clr.val = I2S0.int_st.val; //clear pending interrupt
|
||||
// Clear pending interrupt
|
||||
I2S0.int_clr.val = I2S0.int_st.val;
|
||||
}
|
||||
|
||||
void stepperTask(void *parameter) {
|
||||
@@ -148,29 +152,43 @@ void stepperTask(void *parameter) {
|
||||
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
|
||||
dma.rw_pos = 0;
|
||||
|
||||
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.mode);
|
||||
|
||||
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
|
||||
if (!nextMainISR) {
|
||||
Stepper::pulse_phase_isr();
|
||||
nextMainISR = Stepper::block_phase_isr();
|
||||
}
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
else if (!nextAdvanceISR) {
|
||||
Stepper::advance_isr();
|
||||
nextAdvanceISR = Stepper::la_interval;
|
||||
|
||||
#if ENABLED(FT_MOTION)
|
||||
|
||||
if (using_ftMotion) {
|
||||
if (!nextMainISR) stepper.ftMotion_stepper();
|
||||
nextMainISR = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
else
|
||||
i2s_push_sample();
|
||||
|
||||
nextMainISR--;
|
||||
if (!using_ftMotion) {
|
||||
if (!nextMainISR) {
|
||||
Stepper::pulse_phase_isr();
|
||||
nextMainISR = Stepper::block_phase_isr();
|
||||
}
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
else if (!nextAdvanceISR) {
|
||||
Stepper::advance_isr();
|
||||
nextAdvanceISR = Stepper::la_interval;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
i2s_push_sample();
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
|
||||
nextAdvanceISR = Stepper::la_interval;
|
||||
nextMainISR--;
|
||||
|
||||
if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER)
|
||||
nextAdvanceISR--;
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
|
||||
nextAdvanceISR = Stepper::la_interval;
|
||||
|
||||
if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER)
|
||||
nextAdvanceISR--;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __PLAT_LINUX__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
@@ -57,4 +58,49 @@ uint16_t MarlinHAL::adc_value() {
|
||||
|
||||
void MarlinHAL::reboot() { /* Reset the application state and GPIO */ }
|
||||
|
||||
// ------------------------
|
||||
// BSD String
|
||||
// ------------------------
|
||||
|
||||
/**
|
||||
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef HAS_LIBBSD
|
||||
|
||||
/**
|
||||
* Copy string src to buffer dst of size dsize. At most dsize-1
|
||||
* chars will be copied. Always NUL terminates (unless dsize == 0).
|
||||
* Returns strlen(src); if retval >= dsize, truncation occurred.
|
||||
*/
|
||||
size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) {
|
||||
const char *osrc = src;
|
||||
size_t nleft = dsize;
|
||||
|
||||
// Copy as many bytes as will fit.
|
||||
if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break;
|
||||
|
||||
// Not enough room in dst, add NUL and traverse rest of src.
|
||||
if (nleft == 0) {
|
||||
if (dsize != 0) *dst = '\0'; // NUL-terminate dst
|
||||
while (*src++) { /* nada */ }
|
||||
}
|
||||
|
||||
return (src - osrc - 1); // count does not include NUL
|
||||
}
|
||||
|
||||
#endif // HAS_LIBBSD
|
||||
|
||||
#endif // __PLAT_LINUX__
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
#include <iostream>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAS_LIBBSD
|
||||
#include <bsd/string.h>
|
||||
#endif
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
#include <algorithm>
|
||||
@@ -162,4 +167,13 @@ public:
|
||||
}
|
||||
|
||||
static void set_pwm_frequency(const pin_t, int) {}
|
||||
|
||||
#ifndef HAS_LIBBSD
|
||||
/**
|
||||
* Redirect missing strlcpy here
|
||||
*/
|
||||
static size_t _strlcpy(char *dst, const char *src, size_t dsize);
|
||||
#define strlcpy hal._strlcpy
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
|
||||
#include <pinmapping.h>
|
||||
|
||||
#define strlcpy(A, B, C) strncpy(A, B, (C) - 1)
|
||||
#define strlcpy_P(A, B, C) strncpy_P(A, B, (C) - 1)
|
||||
|
||||
#define HIGH 0x01
|
||||
#define LOW 0x00
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2023 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __PLAT_NATIVE_SIM__
|
||||
|
||||
#ifndef HAS_LIBBSD
|
||||
|
||||
#include "HAL.h"
|
||||
|
||||
/**
|
||||
* Copy string src to buffer dst of size dsize. At most dsize-1
|
||||
* chars will be copied. Always NUL terminates (unless dsize == 0).
|
||||
* Returns strlen(src); if retval >= dsize, truncation occurred.
|
||||
*/
|
||||
size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) {
|
||||
const char *osrc = src;
|
||||
size_t nleft = dsize;
|
||||
|
||||
// Copy as many bytes as will fit.
|
||||
if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break;
|
||||
|
||||
// Not enough room in dst, add NUL and traverse rest of src.
|
||||
if (nleft == 0) {
|
||||
if (dsize != 0) *dst = '\0'; // NUL-terminate dst
|
||||
while (*src++) { /* nada */ }
|
||||
}
|
||||
|
||||
return (src - osrc - 1); // count does not include NUL
|
||||
}
|
||||
|
||||
#endif // HAS_LIBBSD
|
||||
#endif // __PLAT_NATIVE_SIM__
|
||||
@@ -263,4 +263,14 @@ public:
|
||||
analogWrite(pin, v);
|
||||
}
|
||||
|
||||
static void set_pwm_frequency(const pin_t, int) {}
|
||||
|
||||
#ifndef HAS_LIBBSD
|
||||
/**
|
||||
* Redirect missing strlcpy here
|
||||
*/
|
||||
static size_t _strlcpy(char *dst, const char *src, size_t dsize);
|
||||
#define strlcpy hal._strlcpy
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "tft_spi.h"
|
||||
#include "pinconfig.h"
|
||||
|
||||
//#define DEBUG_TFT_IO
|
||||
#define DEBUG_OUT ENABLED(DEBUG_TFT_IO)
|
||||
#include "../../../core/debug_out.h"
|
||||
|
||||
SPI_HandleTypeDef TFT_SPI::SPIx;
|
||||
DMA_HandleTypeDef TFT_SPI::DMAtx;
|
||||
|
||||
@@ -43,8 +47,9 @@ void TFT_SPI::init() {
|
||||
if ((spiInstance = (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK)) == NP) return;
|
||||
if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI)) return;
|
||||
|
||||
#if PIN_EXISTS(TFT_MISO) && TFT_MISO_PIN != TFT_MOSI_PIN
|
||||
if (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO)) return;
|
||||
#if PIN_EXISTS(TFT_MISO)
|
||||
// Check these pins in code because they are sometimes defined as analog pin references
|
||||
if ((TFT_MISO_PIN != TFT_MOSI_PIN) && (spiInstance != (SPI_TypeDef *)pinmap_peripheral(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO))) return;
|
||||
#endif
|
||||
|
||||
SPIx.Instance = spiInstance;
|
||||
@@ -76,10 +81,13 @@ void TFT_SPI::init() {
|
||||
|
||||
pinmap_pinout(digitalPinToPinName(TFT_SCK_PIN), PinMap_SPI_SCLK);
|
||||
pinmap_pinout(digitalPinToPinName(TFT_MOSI_PIN), PinMap_SPI_MOSI);
|
||||
#if PIN_EXISTS(TFT_MISO) && TFT_MISO_PIN != TFT_MOSI_PIN
|
||||
pinmap_pinout(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO);
|
||||
#if PIN_EXISTS(TFT_MISO)
|
||||
// Check these pins in code because they are sometimes defined as analog pin references
|
||||
if (TFT_MISO_PIN != TFT_MOSI_PIN) pinmap_pinout(digitalPinToPinName(TFT_MISO_PIN), PinMap_SPI_MISO);
|
||||
#endif
|
||||
|
||||
//pin_PullConfig(get_GPIO_Port(STM_PORT(digitalPinToPinName(TFT_SCK_PIN))), STM_LL_GPIO_PIN(digitalPinToPinName(TFT_SCK_PIN)), GPIO_PULLDOWN);
|
||||
|
||||
#ifdef SPI1_BASE
|
||||
if (SPIx.Instance == SPI1) {
|
||||
__HAL_RCC_SPI1_CLK_ENABLE();
|
||||
@@ -151,29 +159,47 @@ void TFT_SPI::dataTransferBegin(uint16_t dataSize) {
|
||||
WRITE(TFT_CS_PIN, LOW);
|
||||
}
|
||||
|
||||
#ifdef TFT_DEFAULT_DRIVER
|
||||
#include "../../../lcd/tft_io/tft_ids.h"
|
||||
#endif
|
||||
#include "../../../lcd/tft_io/tft_ids.h"
|
||||
|
||||
uint32_t TFT_SPI::getID() {
|
||||
uint32_t id;
|
||||
id = readID(LCD_READ_ID);
|
||||
DEBUG_ECHOLNPGM("TFT_SPI::getID()");
|
||||
|
||||
uint32_t id = readID(LCD_READ_ID);
|
||||
#if ENABLED(DEBUG_TFT_IO)
|
||||
char debug_register[3], debug_value[5];
|
||||
sprintf_P(debug_register, PSTR("%02X"), LCD_READ_ID);
|
||||
sprintf_P(debug_value, PSTR("%04X"), uint16_t(id));
|
||||
DEBUG_ECHOLNPGM(" readID(0x", debug_register, ") : 0x", debug_value);
|
||||
#endif
|
||||
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) {
|
||||
id = readID(LCD_READ_ID4);
|
||||
#ifdef TFT_DEFAULT_DRIVER
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
|
||||
id = TFT_DEFAULT_DRIVER;
|
||||
#if ENABLED(DEBUG_TFT_IO)
|
||||
sprintf_P(debug_register, PSTR("%02X"), LCD_READ_ID4);
|
||||
sprintf_P(debug_value, PSTR("%04X"), uint16_t(id));
|
||||
DEBUG_ECHOLNPGM(" readID(0x", debug_register, ") : 0x", debug_value);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TFT_DEFAULT_DRIVER
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) {
|
||||
id = TFT_DEFAULT_DRIVER;
|
||||
#if ENABLED(DEBUG_TFT_IO)
|
||||
sprintf_P(debug_value, PSTR("%04X"), uint16_t(id));
|
||||
DEBUG_ECHOLNPGM(" Fallback to TFT_DEFAULT_DRIVER : 0x", debug_value);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
uint32_t TFT_SPI::readID(const uint16_t inReg) {
|
||||
uint32_t data = 0;
|
||||
#if PIN_EXISTS(TFT_MISO)
|
||||
const uint32_t oldPrescaler = SPIx.Init.BaudRatePrescaler;
|
||||
|
||||
uint32_t BaudRatePrescaler = SPIx.Init.BaudRatePrescaler;
|
||||
SPIx.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64;
|
||||
|
||||
dataTransferBegin(DATASIZE_8BIT);
|
||||
writeReg(inReg);
|
||||
|
||||
@@ -185,10 +211,8 @@ uint32_t TFT_SPI::readID(const uint16_t inReg) {
|
||||
__HAL_SPI_ENABLE(&SPIx);
|
||||
SET_BIT(SPIx.Instance->CR1, SPI_CR1_CSTART);
|
||||
|
||||
#if TFT_MISO_PIN != TFT_MOSI_PIN
|
||||
SPIx.Instance->TXDR = 0;
|
||||
#endif
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_EOT)) {}
|
||||
if (SPIx.Init.Direction == SPI_DIRECTION_2LINES) SPIx.Instance->TXDR = 0;
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_EOT)) { /* nada */ }
|
||||
data = (data << 8) | SPIx.Instance->RXDR;
|
||||
__HAL_SPI_DISABLE(&SPIx);
|
||||
__HAL_SPI_CLEAR_EOTFLAG(&SPIx);
|
||||
@@ -197,19 +221,22 @@ uint32_t TFT_SPI::readID(const uint16_t inReg) {
|
||||
#else
|
||||
__HAL_SPI_ENABLE(&SPIx);
|
||||
for (uint32_t i = 0; i < 4; i++) {
|
||||
#if TFT_MISO_PIN != TFT_MOSI_PIN
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) {}
|
||||
if (SPIx.Init.Direction == SPI_DIRECTION_2LINES) {
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) { /* nada */ }
|
||||
SPIx.Instance->DR = 0;
|
||||
#endif
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_RXNE)) {}
|
||||
}
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_RXNE)) { /* nada */ }
|
||||
data = (data << 8) | SPIx.Instance->DR;
|
||||
}
|
||||
#endif
|
||||
|
||||
dataTransferEnd();
|
||||
SPIx.Init.BaudRatePrescaler = oldPrescaler;
|
||||
#if DISABLED(DEBUG_TFT_IO)
|
||||
SPIx.Init.BaudRatePrescaler = BaudRatePrescaler;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DEBUG_ECHOLNPGM(" raw data : ", data);
|
||||
return data >> 7;
|
||||
}
|
||||
|
||||
@@ -238,13 +265,13 @@ bool TFT_SPI::isBusy() {
|
||||
// Check if SPI data transfer is completed
|
||||
if (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_EOT)) return true;
|
||||
#else
|
||||
// Check if SPI is idle
|
||||
if (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) return true;
|
||||
// Check if SPI transmit butter is empty and SPI is idle
|
||||
if ((!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) || (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY))) return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
abort();
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TFT_SPI::abort() {
|
||||
@@ -263,9 +290,7 @@ void TFT_SPI::abort() {
|
||||
}
|
||||
|
||||
void TFT_SPI::transmit(uint16_t data) {
|
||||
#if TFT_MISO_PIN == TFT_MOSI_PIN
|
||||
SPI_1LINE_TX(&SPIx);
|
||||
#endif
|
||||
if (SPIx.Init.Direction == SPI_DIRECTION_1LINE) SPI_1LINE_TX(&SPIx);
|
||||
|
||||
#ifdef STM32H7xx
|
||||
MODIFY_REG(SPIx.Instance->CR2, SPI_CR2_TSIZE, 1);
|
||||
@@ -274,30 +299,26 @@ void TFT_SPI::transmit(uint16_t data) {
|
||||
|
||||
SPIx.Instance->TXDR = data;
|
||||
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) {}
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) { /* nada */ }
|
||||
|
||||
__HAL_SPI_CLEAR_EOTFLAG(&SPIx);
|
||||
__HAL_SPI_CLEAR_TXTFFLAG(&SPIx);
|
||||
__HAL_SPI_DISABLE(&SPIx);
|
||||
#else
|
||||
__HAL_SPI_ENABLE(&SPIx);
|
||||
SPIx.Instance->DR = data;
|
||||
while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {}
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) { /* nada */ } // Wait for data transfer to actually start
|
||||
while ( __HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) { /* nada */ } // Wait until SPI is idle
|
||||
#endif
|
||||
|
||||
__HAL_SPI_DISABLE(&SPIx);
|
||||
|
||||
#if TFT_MISO_PIN != TFT_MOSI_PIN
|
||||
__HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received data is not read
|
||||
#endif
|
||||
if (SPIx.Init.Direction == SPI_DIRECTION_2LINES) __HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received data is not read
|
||||
}
|
||||
|
||||
void TFT_SPI::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
|
||||
DMAtx.Init.MemInc = memoryIncrease;
|
||||
HAL_DMA_Init(&DMAtx);
|
||||
|
||||
#if TFT_MISO_PIN == TFT_MOSI_PIN
|
||||
SPI_1LINE_TX(&SPIx);
|
||||
#endif
|
||||
if (SPIx.Init.Direction == SPI_DIRECTION_1LINE) SPI_1LINE_TX(&SPIx);
|
||||
|
||||
dataTransferBegin();
|
||||
|
||||
@@ -316,7 +337,7 @@ void TFT_SPI::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t coun
|
||||
SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request
|
||||
#endif
|
||||
|
||||
TERN_(TFT_SHARED_IO, while (isBusy()));
|
||||
TERN_(TFT_SHARED_IO, while (isBusy()) { /* nada */ });
|
||||
}
|
||||
|
||||
void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
|
||||
@@ -324,9 +345,10 @@ void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count)
|
||||
|
||||
HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
|
||||
#ifdef STM32H7xx
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) {}
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_SR_EOT)) { /* nada */ }
|
||||
#else
|
||||
while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {}
|
||||
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) { /* nada */ }
|
||||
while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) { /* nada */ }
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
@@ -337,8 +359,7 @@ void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count)
|
||||
DMAtx.Init.MemInc = memoryIncrease;
|
||||
HAL_DMA_Init(&DMAtx);
|
||||
|
||||
if (TFT_MISO_PIN == TFT_MOSI_PIN)
|
||||
SPI_1LINE_TX(&SPIx);
|
||||
if (SPIx.Init.Direction == SPI_DIRECTION_1LINE) SPI_1LINE_TX(&SPIx);
|
||||
|
||||
dataTransferBegin();
|
||||
|
||||
|
||||
@@ -219,7 +219,9 @@
|
||||
#include "feature/fanmux.h"
|
||||
#endif
|
||||
|
||||
#include "module/tool_change.h"
|
||||
#if HAS_TOOLCHANGE
|
||||
#include "module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if HAS_FANCHECK
|
||||
#include "feature/fancheck.h"
|
||||
@@ -776,7 +778,7 @@ void idle(const bool no_stepper_sleep/*=false*/) {
|
||||
if (marlin_state == MF_INITIALIZING) goto IDLE_DONE;
|
||||
|
||||
// TODO: Still causing errors
|
||||
(void)check_tool_sensor_stats(active_extruder, true);
|
||||
TERN_(TOOL_SENSOR, (void)check_tool_sensor_stats(active_extruder, true));
|
||||
|
||||
// Handle filament runout sensors
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
@@ -1530,6 +1532,10 @@ void setup() {
|
||||
i2c.onRequest(i2c_on_request);
|
||||
#endif
|
||||
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
SETUP_RUN(emi_init());
|
||||
#endif
|
||||
|
||||
#if DO_SWITCH_EXTRUDER
|
||||
SETUP_RUN(move_extruder_servo(0)); // Initialize extruder servo
|
||||
#endif
|
||||
|
||||
@@ -33,19 +33,14 @@
|
||||
//
|
||||
enum MarlinDebugFlags : uint8_t {
|
||||
MARLIN_DEBUG_NONE = 0,
|
||||
MARLIN_DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed
|
||||
MARLIN_DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output
|
||||
MARLIN_DEBUG_ERRORS = _BV(2), ///< Not implemented
|
||||
MARLIN_DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands
|
||||
MARLIN_DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
MARLIN_DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling
|
||||
MARLIN_DEBUG_MESH_ADJUST = _BV(6), ///< UBL bed leveling
|
||||
#else
|
||||
MARLIN_DEBUG_LEVELING = 0,
|
||||
MARLIN_DEBUG_MESH_ADJUST = 0,
|
||||
#endif
|
||||
MARLIN_DEBUG_ALL = 0xFF
|
||||
MARLIN_DEBUG_ECHO = TERN0(DEBUG_FLAGS_GCODE, _BV(0)), //!< Echo commands in order as they are processed
|
||||
MARLIN_DEBUG_INFO = TERN0(DEBUG_FLAGS_GCODE, _BV(1)), //!< Print messages for code that has debug output
|
||||
MARLIN_DEBUG_ERRORS = TERN0(DEBUG_FLAGS_GCODE, _BV(2)), //!< Not implemented
|
||||
MARLIN_DEBUG_DRYRUN = _BV(3), //!< Ignore temperature setting and E movement commands
|
||||
MARLIN_DEBUG_COMMUNICATION = TERN0(DEBUG_FLAGS_GCODE, _BV(4)), //!< Not implemented
|
||||
MARLIN_DEBUG_LEVELING = TERN0(DEBUG_LEVELING_FEATURE, _BV(5)), //!< Print detailed output for homing and leveling
|
||||
MARLIN_DEBUG_MESH_ADJUST = TERN0(DEBUG_LEVELING_FEATURE, _BV(6)), //!< UBL bed leveling
|
||||
MARLIN_DEBUG_ALL = MARLIN_DEBUG_ECHO|MARLIN_DEBUG_INFO|MARLIN_DEBUG_ERRORS|MARLIN_DEBUG_COMMUNICATION|MARLIN_DEBUG_LEVELING|MARLIN_DEBUG_MESH_ADJUST
|
||||
};
|
||||
|
||||
extern uint8_t marlin_debug_flags;
|
||||
|
||||
@@ -37,10 +37,6 @@
|
||||
#include "../../../gcode/gcode.h"
|
||||
#include "../../../libs/least_squares_fit.h"
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
#include "../../../core/debug_out.h"
|
||||
|
||||
@@ -685,11 +681,11 @@ void unified_bed_leveling::G29() {
|
||||
ui.release();
|
||||
#endif
|
||||
|
||||
#ifdef Z_PROBE_END_SCRIPT
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||
#ifdef EVENT_GCODE_AFTER_G29
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29);
|
||||
if (probe_deployed) {
|
||||
planner.synchronize();
|
||||
gcode.process_subcommands_now(F(Z_PROBE_END_SCRIPT));
|
||||
gcode.process_subcommands_now(F(EVENT_GCODE_AFTER_G29));
|
||||
}
|
||||
#else
|
||||
UNUSED(probe_deployed);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#if ENABLED(MAX7219_DEBUG)
|
||||
|
||||
#define MAX7219_ERRORS // Disable to save 406 bytes of Program Memory
|
||||
#define MAX7219_ERRORS // Requires ~400 bytes of flash
|
||||
|
||||
#include "max7219.h"
|
||||
|
||||
|
||||
@@ -43,10 +43,6 @@
|
||||
|
||||
typedef int8_t mixer_perc_t;
|
||||
|
||||
#ifndef MIXING_VIRTUAL_TOOLS
|
||||
#define MIXING_VIRTUAL_TOOLS 1
|
||||
#endif
|
||||
|
||||
enum MixTool {
|
||||
FIRST_USER_VIRTUAL_TOOL = 0
|
||||
, LAST_USER_VIRTUAL_TOOL = MIXING_VIRTUAL_TOOLS - 1
|
||||
|
||||
@@ -89,7 +89,9 @@ static xyze_pos_t resume_position;
|
||||
PauseMode pause_mode = PAUSE_MODE_PAUSE_PRINT;
|
||||
#endif
|
||||
|
||||
fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#endif
|
||||
|
||||
#if HAS_MEDIA
|
||||
#include "../sd/cardreader.h"
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
* This may be combined with related G-codes if features are consolidated.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
float unload_length, load_length;
|
||||
} fil_change_settings_t;
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
@@ -69,7 +65,20 @@ enum PauseMessage : char {
|
||||
extern PauseMode pause_mode;
|
||||
#endif
|
||||
|
||||
extern fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
typedef struct FilamentChangeSettings {
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
float load_length, unload_length;
|
||||
#else
|
||||
static constexpr float load_length = FILAMENT_CHANGE_FAST_LOAD_LENGTH,
|
||||
unload_length = FILAMENT_CHANGE_UNLOAD_LENGTH;
|
||||
#endif
|
||||
} fil_change_settings_t;
|
||||
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
extern fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#else
|
||||
constexpr fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#endif
|
||||
|
||||
extern uint8_t did_pause_print;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "solenoid.h"
|
||||
|
||||
#include "../module/motion.h" // for active_extruder
|
||||
#include "../module/tool_change.h"
|
||||
#include "../module/tool_change.h" // for parking_extruder_set_parked
|
||||
|
||||
// Used primarily with MANUAL_SOLENOID_CONTROL
|
||||
static void set_solenoid(const uint8_t num, const uint8_t state) {
|
||||
|
||||
@@ -501,8 +501,10 @@ void GcodeSuite::G26() {
|
||||
// or if the parameter parsing did not go OK, abort
|
||||
if (homing_needed_error()) return;
|
||||
|
||||
// Change the tool first, if specified
|
||||
if (parser.seenval('T')) tool_change(parser.value_int());
|
||||
#if HAS_TOOLCHANGE
|
||||
// Change the tool first, if specified
|
||||
if (parser.seenval('T')) tool_change(parser.value_int());
|
||||
#endif
|
||||
|
||||
g26_helper_t g26;
|
||||
|
||||
|
||||
@@ -29,10 +29,6 @@
|
||||
#include "../../module/probe.h"
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BLTOUCH)
|
||||
#include "../../feature/bltouch.h"
|
||||
#endif
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
#include "../../../core/debug_out.h"
|
||||
|
||||
@@ -991,10 +987,10 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
TERN_(HAS_BED_PROBE, probe.move_z_after_probing());
|
||||
|
||||
#ifdef Z_PROBE_END_SCRIPT
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||
#ifdef EVENT_GCODE_AFTER_G29
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29);
|
||||
planner.synchronize();
|
||||
process_subcommands_now(F(Z_PROBE_END_SCRIPT));
|
||||
process_subcommands_now(F(EVENT_GCODE_AFTER_G29));
|
||||
#endif
|
||||
|
||||
probe.use_probing_tool(false);
|
||||
|
||||
@@ -639,8 +639,8 @@ void GcodeSuite::G28() {
|
||||
#endif
|
||||
|
||||
#ifdef XY_AFTER_HOMING
|
||||
constexpr xy_pos_t xy_after XY_AFTER_HOMING;
|
||||
do_blocking_move_to(xy_after);
|
||||
if (!axes_should_home(_BV(X_AXIS) | _BV(Y_AXIS)))
|
||||
do_blocking_move_to(xy_pos_t(XY_AFTER_HOMING));
|
||||
#endif
|
||||
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
@@ -35,10 +35,6 @@
|
||||
#include "../../module/probe.h"
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
@@ -37,10 +37,6 @@
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||
#include "../../libs/least_squares_fit.h"
|
||||
#endif
|
||||
@@ -216,7 +212,7 @@ void GcodeSuite::G34() {
|
||||
// Probe a Z height for each stepper.
|
||||
// Probing sanity check is disabled, as it would trigger even in normal cases because
|
||||
// current_position.z has been manually altered in the "dirty trick" above.
|
||||
const float z_probed_height = probe.probe_at_point(DIFF_TERN(HAS_HOME_OFFSET, ppos, xy_pos_t(home_offset)), raise_after, 0, true, false, (Z_PROBE_LOW_POINT) - z_probe * 0.5f, z_probe * 0.5f);
|
||||
const float z_probed_height = probe.probe_at_point(RAW_X_POSITION(z_stepper_align.xy[iprobe].x), RAW_Y_POSITION(z_stepper_align.xy[iprobe].y), raise_after, 0, true, false);
|
||||
if (isnan(z_probed_height)) {
|
||||
SERIAL_ECHOLNPGM(STR_ERR_PROBING_FAILED);
|
||||
LCD_MESSAGE(MSG_LCD_PROBING_FAILED);
|
||||
|
||||
@@ -33,10 +33,13 @@
|
||||
#include "../../lcd/marlinui.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/tool_change.h"
|
||||
#include "../../module/endstops.h"
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if !AXIS_CAN_CALIBRATE(X)
|
||||
#undef CALIBRATION_MEASURE_LEFT
|
||||
#undef CALIBRATION_MEASURE_RIGHT
|
||||
@@ -855,6 +858,10 @@ void GcodeSuite::G425() {
|
||||
TEMPORARY_BED_LEVELING_STATE(false);
|
||||
SET_SOFT_ENDSTOP_LOOSE(true);
|
||||
|
||||
#if ENABLED(EMI_MITIGATION) && ENABLED(NOZZLE_AS_PROBE)
|
||||
enable_emi_pins(true);
|
||||
#endif
|
||||
|
||||
measurements_t m;
|
||||
const float uncertainty = parser.floatval('U', CALIBRATION_MEASUREMENT_UNCERTAIN);
|
||||
|
||||
@@ -882,6 +889,10 @@ void GcodeSuite::G425() {
|
||||
|
||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||
|
||||
#if ENABLED(EMI_MITIGATION) && ENABLED(NOZZLE_AS_PROBE)
|
||||
enable_emi_pins(false);
|
||||
#endif
|
||||
|
||||
#ifdef CALIBRATION_SCRIPT_POST
|
||||
process_subcommands_now(F(CALIBRATION_SCRIPT_POST));
|
||||
#endif
|
||||
|
||||
@@ -25,13 +25,14 @@
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/tool_change.h"
|
||||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
#include "../../module/motion.h"
|
||||
#if HAS_TOOLCHANGE
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#include "../../MarlinCore.h" // for SP_X_STR, etc.
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
#include "../../module/motion.h" // for active_extruder
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M217 - Set toolchange parameters
|
||||
@@ -121,7 +122,7 @@ void GcodeSuite::M217() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z_AXIS
|
||||
#if HAS_Z_AXIS && HAS_TOOLCHANGE
|
||||
if (parser.seenval('Z')) { toolchange_settings.z_raise = parser.value_linear_units(); }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../gcode.h"
|
||||
|
||||
/**
|
||||
@@ -27,18 +28,25 @@
|
||||
*/
|
||||
void GcodeSuite::M111() {
|
||||
if (parser.seenval('S')) marlin_debug_flags = parser.value_byte();
|
||||
|
||||
static PGMSTR(str_debug_1, STR_DEBUG_ECHO);
|
||||
static PGMSTR(str_debug_2, STR_DEBUG_INFO);
|
||||
static PGMSTR(str_debug_4, STR_DEBUG_ERRORS);
|
||||
#if ENABLED(DEBUG_FLAGS_GCODE)
|
||||
static PGMSTR(str_debug_1, STR_DEBUG_ECHO);
|
||||
static PGMSTR(str_debug_2, STR_DEBUG_INFO);
|
||||
static PGMSTR(str_debug_4, STR_DEBUG_ERRORS);
|
||||
#endif
|
||||
static PGMSTR(str_debug_8, STR_DEBUG_DRYRUN);
|
||||
static PGMSTR(str_debug_16, STR_DEBUG_COMMUNICATION);
|
||||
#if ENABLED(DEBUG_FLAGS_GCODE)
|
||||
static PGMSTR(str_debug_16, STR_DEBUG_COMMUNICATION);
|
||||
#endif
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
static PGMSTR(str_debug_detail, STR_DEBUG_DETAIL);
|
||||
#endif
|
||||
|
||||
static PGM_P const debug_strings[] PROGMEM = {
|
||||
str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16,
|
||||
TERN(DEBUG_FLAGS_GCODE, str_debug_1, nullptr),
|
||||
TERN(DEBUG_FLAGS_GCODE, str_debug_2, nullptr),
|
||||
TERN(DEBUG_FLAGS_GCODE, str_debug_4, nullptr),
|
||||
str_debug_8,
|
||||
TERN(DEBUG_FLAGS_GCODE, str_debug_16, nullptr),
|
||||
TERN_(DEBUG_LEVELING_FEATURE, str_debug_detail)
|
||||
};
|
||||
|
||||
@@ -47,31 +55,29 @@ void GcodeSuite::M111() {
|
||||
if (marlin_debug_flags) {
|
||||
uint8_t comma = 0;
|
||||
for (uint8_t i = 0; i < COUNT(debug_strings); ++i) {
|
||||
if (TEST(marlin_debug_flags, i)) {
|
||||
PGM_P const pstr = (PGM_P)pgm_read_ptr(&debug_strings[i]);
|
||||
if (pstr && TEST(marlin_debug_flags, i)) {
|
||||
if (comma++) SERIAL_CHAR(',');
|
||||
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&debug_strings[i]));
|
||||
SERIAL_ECHOPGM_P(pstr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHOPGM(STR_DEBUG_OFF);
|
||||
#if !defined(__AVR__) || !defined(USBCON)
|
||||
#if !(defined(__AVR__) && defined(USBCON))
|
||||
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
|
||||
SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
|
||||
SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
SERIAL_ECHOPGM("\nDropped bytes: ", MYSERIAL1.dropped());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
SERIAL_ECHOPGM("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
|
||||
#endif
|
||||
#endif // !__AVR__ || !USBCON
|
||||
#endif // !(__AVR__ && USBCON)
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_TOOLCHANGE
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/tool_change.h"
|
||||
|
||||
@@ -71,8 +75,10 @@ void GcodeSuite::T(const int8_t tool_index) {
|
||||
|
||||
tool_change(tool_index
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
, TERN(PARKING_EXTRUDER, false, tool_index == active_extruder) // For PARKING_EXTRUDER motion is decided in tool_change()
|
||||
|| parser.boolval('S')
|
||||
, parser.boolval('S')
|
||||
|| TERN(PARKING_EXTRUDER, false, tool_index == active_extruder) // For PARKING_EXTRUDER motion is decided in tool_change()
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
#endif // HAS_TOOLCHANGE
|
||||
|
||||
@@ -38,14 +38,14 @@ void say_shaping() {
|
||||
SERIAL_ECHOPGM(" with ");
|
||||
switch (ftMotion.cfg.mode) {
|
||||
default: break;
|
||||
case ftMotionMode_ZV: SERIAL_ECHOPGM("ZV"); break;
|
||||
case ftMotionMode_ZVD: SERIAL_ECHOPGM("ZVD"); break;
|
||||
case ftMotionMode_ZVDD: SERIAL_ECHOPGM("ZVDD"); break;
|
||||
case ftMotionMode_ZVDDD: SERIAL_ECHOPGM("ZVDDD"); break;
|
||||
case ftMotionMode_EI: SERIAL_ECHOPGM("EI"); break;
|
||||
case ftMotionMode_2HEI: SERIAL_ECHOPGM("2 Hump EI"); break;
|
||||
case ftMotionMode_3HEI: SERIAL_ECHOPGM("3 Hump EI"); break;
|
||||
case ftMotionMode_MZV: SERIAL_ECHOPGM("MZV"); break;
|
||||
case ftMotionMode_ZV: SERIAL_ECHOPGM("ZV"); break;
|
||||
case ftMotionMode_ZVD: SERIAL_ECHOPGM("ZVD"); break;
|
||||
case ftMotionMode_ZVDD: SERIAL_ECHOPGM("ZVDD"); break;
|
||||
case ftMotionMode_ZVDDD: SERIAL_ECHOPGM("ZVDDD"); break;
|
||||
case ftMotionMode_EI: SERIAL_ECHOPGM("EI"); break;
|
||||
case ftMotionMode_2HEI: SERIAL_ECHOPGM("2 Hump EI"); break;
|
||||
case ftMotionMode_3HEI: SERIAL_ECHOPGM("3 Hump EI"); break;
|
||||
case ftMotionMode_MZV: SERIAL_ECHOPGM("MZV"); break;
|
||||
//case ftMotionMode_DISCTF: SERIAL_ECHOPGM("discrete transfer functions"); break;
|
||||
//case ftMotionMode_ULENDO_FBS: SERIAL_ECHOPGM("Ulendo FBS."); return;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void say_shaping() {
|
||||
SERIAL_ECHO_TERNARY(dynamic, "X/A ", "base dynamic", "static", " compensator frequency: ");
|
||||
SERIAL_ECHO(p_float_t(ftMotion.cfg.baseFreq[X_AXIS], 2), F("Hz"));
|
||||
#if HAS_DYNAMIC_FREQ
|
||||
if (dynamic) SERIAL_ECHO(" scaling: ", p_float_t(ftMotion.cfg.dynFreqK[X_AXIS], 8), F("Hz/"), z_based ? F("mm") : F("g"));
|
||||
if (dynamic) SERIAL_ECHO(F(" scaling: "), p_float_t(ftMotion.cfg.dynFreqK[X_AXIS], 2), F("Hz/"), z_based ? F("mm") : F("g"));
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
@@ -88,7 +88,7 @@ void say_shaping() {
|
||||
SERIAL_ECHO_TERNARY(dynamic, "Y/B ", "base dynamic", "static", " compensator frequency: ");
|
||||
SERIAL_ECHO(p_float_t(ftMotion.cfg.baseFreq[Y_AXIS], 2), F(" Hz"));
|
||||
#if HAS_DYNAMIC_FREQ
|
||||
if (dynamic) SERIAL_ECHO(F(" scaling: "), p_float_t(ftMotion.cfg.dynFreqK[Y_AXIS], 8), F("Hz/"), z_based ? F("mm") : F("g"));
|
||||
if (dynamic) SERIAL_ECHO(F(" scaling: "), p_float_t(ftMotion.cfg.dynFreqK[Y_AXIS], 2), F("Hz/"), z_based ? F("mm") : F("g"));
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
@@ -96,7 +96,10 @@ void say_shaping() {
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
SERIAL_ECHO_TERNARY(ftMotion.cfg.linearAdvEna, "Linear Advance ", "en", "dis", "abled");
|
||||
SERIAL_ECHOLN(F(". Gain: "), p_float_t(ftMotion.cfg.linearAdvK, 5));
|
||||
if (ftMotion.cfg.linearAdvEna)
|
||||
SERIAL_ECHOLNPGM(". Gain: ", ftMotion.cfg.linearAdvK);
|
||||
else
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -129,14 +132,17 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
|
||||
* M493: Set Fixed-time Motion Control parameters
|
||||
*
|
||||
* S<mode> Set the motion / shaping mode. Shaping requires an X axis, at the minimum.
|
||||
* 0: NORMAL
|
||||
* 1: FIXED-TIME
|
||||
* 10: ZV
|
||||
* 11: ZVD
|
||||
* 12: EI
|
||||
* 13: 2HEI
|
||||
* 14: 3HEI
|
||||
* 15: MZV
|
||||
*
|
||||
* 0: Standard Motion
|
||||
* 1: Fixed-Time Motion
|
||||
* 10: ZV : Zero Vibration
|
||||
* 11: ZVD : Zero Vibration and Derivative
|
||||
* 12: ZVDD : Zero Vibration, Derivative, and Double Derivative
|
||||
* 13: ZVDDD : Zero Vibration, Derivative, Double Derivative, and Triple Derivative
|
||||
* 14: EI : Extra-Intensive
|
||||
* 15: 2HEI : 2-Hump Extra-Intensive
|
||||
* 16: 3HEI : 3-Hump Extra-Intensive
|
||||
* 17: MZV : Mass-based Zero Vibration
|
||||
*
|
||||
* P<bool> Enable (1) or Disable (0) Linear Advance pressure control
|
||||
*
|
||||
@@ -147,11 +153,15 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
|
||||
* 1: Z-based (Requires a Z axis)
|
||||
* 2: Mass-based (Requires X and E axes)
|
||||
*
|
||||
* A<Hz> Set static/base frequency for the X axis
|
||||
* F<Hz> Set frequency scaling for the X axis
|
||||
* A<Hz> Set static/base frequency for the X axis
|
||||
* F<Hz> Set frequency scaling for the X axis
|
||||
* I 0.0 Set damping ratio for the X axis
|
||||
* Q 0.00 Set the vibration tolerance for the X axis
|
||||
*
|
||||
* B<Hz> Set static/base frequency for the Y axis
|
||||
* H<Hz> Set frequency scaling for the Y axis
|
||||
* J 0.0 Set damping ratio for the Y axis
|
||||
* R 0.00 Set the vibration tolerance for the Y axis
|
||||
*/
|
||||
void GcodeSuite::M493() {
|
||||
struct { bool update_n:1, update_a:1, reset_ft:1, report_h:1; } flag = { false };
|
||||
|
||||
@@ -20,19 +20,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../feature/pause.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../module/printcounter.h"
|
||||
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
#include "../../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M603: Configure filament change
|
||||
*
|
||||
@@ -80,4 +76,4 @@ void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ADVANCED_PAUSE_FEATURE
|
||||
#endif // CONFIGURE_FILAMENT_CHANGE
|
||||
|
||||
+17
-10
@@ -122,14 +122,16 @@ void GcodeSuite::say_units() {
|
||||
* Return -1 if the T parameter is out of range
|
||||
*/
|
||||
int8_t GcodeSuite::get_target_extruder_from_command() {
|
||||
if (parser.seenval('T')) {
|
||||
const int8_t e = parser.value_byte();
|
||||
if (e < EXTRUDERS) return e;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
|
||||
SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e);
|
||||
return -1;
|
||||
}
|
||||
#if HAS_TOOLCHANGE
|
||||
if (parser.seenval('T')) {
|
||||
const int8_t e = parser.value_byte();
|
||||
if (e < EXTRUDERS) return e;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
|
||||
SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
return active_extruder;
|
||||
}
|
||||
|
||||
@@ -669,7 +671,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes
|
||||
case 114: M114(); break; // M114: Report current position
|
||||
case 115: M115(); break; // M115: Report capabilities
|
||||
|
||||
#if ENABLED(CAPABILITIES_REPORT)
|
||||
case 115: M115(); break; // M115: Report capabilities
|
||||
#endif
|
||||
|
||||
case 117: TERN_(HAS_STATUS_MESSAGE, M117()); break; // M117: Set LCD message text, if possible
|
||||
|
||||
@@ -945,7 +950,9 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
case 600: M600(); break; // M600: Pause for Filament Change
|
||||
case 603: M603(); break; // M603: Configure Filament Change
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
case 603: M603(); break; // M603: Configure Filament Change
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_DUPLICATION_MODE
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
*
|
||||
* M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
|
||||
* M114 - Report current position.
|
||||
* M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
|
||||
* M115 - Report capabilities. (Requires CAPABILITIES_REPORT)
|
||||
* M117 - Display a message on the controller screen. (Requires an LCD)
|
||||
* M118 - Display a message in the host console.
|
||||
*
|
||||
@@ -760,7 +760,10 @@ private:
|
||||
#endif
|
||||
|
||||
static void M114();
|
||||
static void M115();
|
||||
|
||||
#if ENABLED(CAPABILITIES_REPORT)
|
||||
static void M115();
|
||||
#endif
|
||||
|
||||
#if HAS_STATUS_MESSAGE
|
||||
static void M117();
|
||||
@@ -1282,7 +1285,7 @@ private:
|
||||
static void M710_report(const bool forReplay=true);
|
||||
#endif
|
||||
|
||||
static void T(const int8_t tool_index);
|
||||
static void T(const int8_t tool_index) IF_DISABLED(HAS_TOOLCHANGE, { UNUSED(tool_index); });
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -20,8 +20,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(CAPABILITIES_REPORT)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../queue.h" // for getting the command port
|
||||
|
||||
#if ENABLED(M115_GEOMETRY_REPORT)
|
||||
@@ -271,3 +274,5 @@ void GcodeSuite::M115() {
|
||||
|
||||
#endif // EXTENDED_CAPABILITIES_REPORT
|
||||
}
|
||||
|
||||
#endif // CAPABILITIES_REPORT
|
||||
|
||||
@@ -27,7 +27,11 @@
|
||||
* M119: Output endstop states to serial output
|
||||
*/
|
||||
void GcodeSuite::M119() {
|
||||
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
enable_emi_pins(true);
|
||||
#endif
|
||||
endstops.report_states();
|
||||
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
enable_emi_pins(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
#include "../../feature/probe_temp_comp.h"
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* G30: Do a single Z probe at the given XY (default: current)
|
||||
*
|
||||
|
||||
@@ -37,14 +37,6 @@ GCodeQueue queue;
|
||||
#include "../MarlinCore.h"
|
||||
#include "../core/bug_on.h"
|
||||
|
||||
#if ENABLED(PRINTER_EVENT_LEDS)
|
||||
#include "../feature/leds/printer_event_leds.h"
|
||||
#endif
|
||||
|
||||
#if HAS_ETHERNET
|
||||
#include "../feature/ethernet.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BINARY_FILE_TRANSFER)
|
||||
#include "../feature/binary_stream.h"
|
||||
#endif
|
||||
|
||||
@@ -45,10 +45,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M104: Set Hotend Temperature target and return immediately
|
||||
* M109: Set Hotend Temperature target and wait
|
||||
|
||||
@@ -579,6 +579,18 @@
|
||||
#error "Y_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||
#elif defined(NUM_Z_STEPPER_DRIVERS)
|
||||
#error "NUM_Z_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||
#elif defined(SNMM)
|
||||
#error "SNMM is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead."
|
||||
#elif defined(MK2_MULTIPLEXER)
|
||||
#error "MK2_MULTIPLEXER is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead."
|
||||
#elif defined(PRUSA_MMU2)
|
||||
#error "PRUSA_MMU2 is obsolete. Define MMU_MODEL as PRUSA_MMU2 instead."
|
||||
#elif defined(PRUSA_MMU2_S_MODE)
|
||||
#error "PRUSA_MMU2_S_MODE is obsolete. Define MMU_MODEL as PRUSA_MMU2S instead."
|
||||
#elif defined(SMUFF_EMU_MMU2)
|
||||
#error "SMUFF_EMU_MMU2 is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2 instead."
|
||||
#elif defined(SMUFF_EMU_MMU2S)
|
||||
#error "SMUFF_EMU_MMU2S is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2S instead."
|
||||
#elif defined(LEVEL_BED_CORNERS)
|
||||
#error "LEVEL_BED_CORNERS is now LCD_BED_TRAMMING."
|
||||
#elif defined(LEVEL_CORNERS_INSET_LFRB) || defined(LEVEL_CORNERS_HEIGHT) || defined(LEVEL_CORNERS_Z_HOP) || defined(LEVEL_CORNERS_USE_PROBE) || defined(LEVEL_CORNERS_PROBE_TOLERANCE) || defined(LEVEL_CORNERS_VERIFY_RAISED) || defined(LEVEL_CORNERS_AUDIO_FEEDBACK)
|
||||
@@ -673,8 +685,30 @@
|
||||
#error "SDIO_SUPPORT is now ONBOARD_SDIO."
|
||||
#elif defined(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
|
||||
#error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING is now CTC_A10S_A13."
|
||||
#elif defined(Z_PROBE_END_SCRIPT)
|
||||
#error "Z_PROBE_END_SCRIPT is now EVENT_GCODE_AFTER_G29."
|
||||
#endif
|
||||
|
||||
// Changes to Probe Temp Compensation (#17392)
|
||||
#if HAS_PTC && TEMP_SENSOR_PROBE && TEMP_SENSOR_BED
|
||||
#if defined(PTC_PARK_POS_X) || defined(PTC_PARK_POS_Y) || defined(PTC_PARK_POS_Z)
|
||||
#error "PTC_PARK_POS_[XYZ] is now PTC_PARK_POS (array)."
|
||||
#elif defined(PTC_PROBE_POS_X) || defined(PTC_PROBE_POS_Y)
|
||||
#error "PTC_PROBE_POS_[XY] is now PTC_PROBE_POS (array)."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Consolidate TMC26X, validate migration (#24373)
|
||||
#define _ISMAX_1(A) defined(A##_MAX_CURRENT)
|
||||
#define _ISSNS_1(A) defined(A##_SENSE_RESISTOR)
|
||||
#if DO(ISMAX,||,ALL_AXIS_NAMES)
|
||||
#error "*_MAX_CURRENT is now set with *_CURRENT."
|
||||
#elif DO(ISSNS,||,ALL_AXIS_NAMES)
|
||||
#error "*_SENSE_RESISTOR (in Milli-Ohms) is now set with *_RSENSE (in Ohms), so you must divide values by 1000."
|
||||
#endif
|
||||
#undef _ISMAX_1
|
||||
#undef _ISSNS_1
|
||||
|
||||
// L64xx stepper drivers have been removed
|
||||
#define _L6470 0x6470
|
||||
#define _L6474 0x6474
|
||||
|
||||
@@ -82,33 +82,36 @@
|
||||
/**
|
||||
* Multi-Material-Unit supported models
|
||||
*/
|
||||
#define PRUSA_MMU1 1
|
||||
#define PRUSA_MMU2 2
|
||||
#define PRUSA_MMU2S 3
|
||||
#define EXTENDABLE_EMU_MMU2 12
|
||||
#define EXTENDABLE_EMU_MMU2S 13
|
||||
|
||||
#ifdef MMU_MODEL
|
||||
#define HAS_MMU 1
|
||||
#define SINGLENOZZLE
|
||||
#if MMU_MODEL == PRUSA_MMU1
|
||||
|
||||
#define _PRUSA_MMU1 1
|
||||
#define _PRUSA_MMU2 2
|
||||
#define _PRUSA_MMU2S 3
|
||||
#define _EXTENDABLE_EMU_MMU2 12
|
||||
#define _EXTENDABLE_EMU_MMU2S 13
|
||||
#define _MMU CAT(_,MMU_MODEL)
|
||||
|
||||
#if _MMU == _PRUSA_MMU1
|
||||
#define HAS_PRUSA_MMU1 1
|
||||
#elif MMU_MODEL % 10 == PRUSA_MMU2
|
||||
#elif _MMU % 10 == _PRUSA_MMU2
|
||||
#define HAS_PRUSA_MMU2 1
|
||||
#elif MMU_MODEL % 10 == PRUSA_MMU2S
|
||||
#elif _MMU % 10 == _PRUSA_MMU2S
|
||||
#define HAS_PRUSA_MMU2 1
|
||||
#define HAS_PRUSA_MMU2S 1
|
||||
#endif
|
||||
#if MMU_MODEL >= EXTENDABLE_EMU_MMU2
|
||||
#if _MMU == _EXTENDABLE_EMU_MMU2 || _MMU == _EXTENDABLE_EMU_MMU2S
|
||||
#define HAS_EXTENDABLE_MMU 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef PRUSA_MMU1
|
||||
#undef PRUSA_MMU2
|
||||
#undef PRUSA_MMU2S
|
||||
#undef EXTENDABLE_EMU_MMU2
|
||||
#undef EXTENDABLE_EMU_MMU2S
|
||||
#undef _MMU
|
||||
#undef _PRUSA_MMU1
|
||||
#undef _PRUSA_MMU2
|
||||
#undef _PRUSA_MMU2S
|
||||
#undef _EXTENDABLE_EMU_MMU2
|
||||
#undef _EXTENDABLE_EMU_MMU2S
|
||||
#endif
|
||||
|
||||
#if ENABLED(E_DUAL_STEPPER_DRIVERS) // E0/E1 steppers act in tandem as E0
|
||||
|
||||
@@ -132,6 +135,9 @@
|
||||
#if MIXING_STEPPERS == 2
|
||||
#define HAS_DUAL_MIXING 1
|
||||
#endif
|
||||
#ifndef MIXING_VIRTUAL_TOOLS
|
||||
#define MIXING_VIRTUAL_TOOLS 1
|
||||
#endif
|
||||
|
||||
#elif ENABLED(SWITCHING_TOOLHEAD) // Toolchanger
|
||||
|
||||
@@ -566,8 +572,8 @@
|
||||
#define MKS_MINI_12864
|
||||
#endif
|
||||
|
||||
// MKS_MINI_12864_V3 and BTT_MINI_12864 have identical pinouts to FYSETC_MINI_12864_2_1
|
||||
#if ANY(MKS_MINI_12864_V3, BTT_MINI_12864)
|
||||
// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 have identical pinouts to FYSETC_MINI_12864_2_1
|
||||
#if ANY(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864)
|
||||
#define FYSETC_MINI_12864_2_1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -803,6 +803,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND || HAS_PRUSA_MMU2 || (ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1)
|
||||
#define HAS_TOOLCHANGE 1
|
||||
#endif
|
||||
|
||||
#if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || ALL(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS))
|
||||
#define HAS_MIXER_SYNC_CHANNEL 1
|
||||
#endif
|
||||
@@ -1305,6 +1309,12 @@
|
||||
#define HAS_ZV_SHAPING 1
|
||||
#endif
|
||||
|
||||
// FT Motion unified window and batch size
|
||||
#if ALL(FT_MOTION, FTM_UNIFIED_BWS)
|
||||
#define FTM_WINDOW_SIZE FTM_BW_SIZE
|
||||
#define FTM_BATCH_SIZE FTM_BW_SIZE
|
||||
#endif
|
||||
|
||||
// Toolchange Event G-code
|
||||
#if !HAS_MULTI_EXTRUDER || !(defined(EVENT_GCODE_TOOLCHANGE_T0) || defined(EVENT_GCODE_TOOLCHANGE_T1) || defined(EVENT_GCODE_TOOLCHANGE_T2) || defined(EVENT_GCODE_TOOLCHANGE_T3) || defined(EVENT_GCODE_TOOLCHANGE_T4) || defined(EVENT_GCODE_TOOLCHANGE_T5) || defined(EVENT_GCODE_TOOLCHANGE_T6) || defined(EVENT_GCODE_TOOLCHANGE_T7))
|
||||
#undef TC_GCODE_USE_GLOBAL_X
|
||||
|
||||
@@ -30,6 +30,16 @@
|
||||
// Extras for CI testing
|
||||
#endif
|
||||
|
||||
// Arduino IDE with Teensy Additions
|
||||
#ifdef TEENSYDUINO
|
||||
#undef max
|
||||
#define max(a,b) ((a)>(b)?(a):(b))
|
||||
#undef min
|
||||
#define min(a,b) ((a)<(b)?(a):(b))
|
||||
#undef NOT_A_PIN // Override Teensyduino legacy CapSense define work-around
|
||||
#define NOT_A_PIN 0 // For PINS_DEBUGGING
|
||||
#endif
|
||||
|
||||
// ADC
|
||||
#ifdef BOARD_ADC_VREF_MV
|
||||
#define ADC_VREF_MV BOARD_ADC_VREF_MV
|
||||
@@ -64,16 +74,6 @@
|
||||
#undef OTA_FIRMWARE_UPDATE
|
||||
#endif
|
||||
|
||||
#ifdef TEENSYDUINO
|
||||
#undef max
|
||||
#define max(a,b) ((a)>(b)?(a):(b))
|
||||
#undef min
|
||||
#define min(a,b) ((a)<(b)?(a):(b))
|
||||
|
||||
#undef NOT_A_PIN // Override Teensyduino legacy CapSense define work-around
|
||||
#define NOT_A_PIN 0 // For PINS_DEBUGGING
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Axis lengths and center
|
||||
*/
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
#include "../core/utility.h"
|
||||
#include "../core/mstring.h"
|
||||
#include "../core/serial.h"
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
#include "../lulzbot_emi_filtering.h"
|
||||
#endif
|
||||
#include "../core/endianness.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -116,17 +116,6 @@
|
||||
constexpr float arm[] = AXIS_RELATIVE_MODES;
|
||||
static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements.");
|
||||
|
||||
// Consolidate TMC26X, validate migration (#24373)
|
||||
#define _ISMAX_1(A) defined(A##_MAX_CURRENT)
|
||||
#define _ISSNS_1(A) defined(A##_SENSE_RESISTOR)
|
||||
#if DO(ISMAX,||,ALL_AXIS_NAMES)
|
||||
#error "*_MAX_CURRENT is now set with *_CURRENT."
|
||||
#elif DO(ISSNS,||,ALL_AXIS_NAMES)
|
||||
#error "*_SENSE_RESISTOR (in Milli-Ohms) is now set with *_RSENSE (in Ohms), so you must divide values by 1000."
|
||||
#endif
|
||||
#undef _ISMAX_1
|
||||
#undef _ISSNS_1
|
||||
|
||||
/**
|
||||
* RADDS is forbidden for non-DUE boards, for now.
|
||||
*/
|
||||
@@ -160,16 +149,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
* Probe temp compensation requirements
|
||||
*/
|
||||
#if HAS_PTC
|
||||
#if TEMP_SENSOR_PROBE && TEMP_SENSOR_BED
|
||||
#if defined(PTC_PARK_POS_X) || defined(PTC_PARK_POS_Y) || defined(PTC_PARK_POS_Z)
|
||||
#error "PTC_PARK_POS_[XYZ] is now PTC_PARK_POS (array)."
|
||||
#elif !defined(PTC_PARK_POS)
|
||||
#error "PTC_PARK_POS is required for Probe Temperature Compensation."
|
||||
#elif defined(PTC_PROBE_POS_X) || defined(PTC_PROBE_POS_Y)
|
||||
#error "PTC_PROBE_POS_[XY] is now PTC_PROBE_POS (array)."
|
||||
#elif !defined(PTC_PROBE_POS)
|
||||
#error "PTC_PROBE_POS is required for Probe Temperature Compensation."
|
||||
#endif
|
||||
#if TEMP_SENSOR_PROBE && TEMP_SENSOR_BED && !(defined(PTC_PARK_POS) && defined(PTC_PROBE_POS))
|
||||
#error "PTC_PARK_POS and PTC_PROBE_POS are required for Probe Temperature Compensation."
|
||||
#endif
|
||||
|
||||
#if ENABLED(PTC_PROBE)
|
||||
@@ -611,23 +592,6 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
#error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sanity checking for all Průša MMU
|
||||
*/
|
||||
#ifdef SNMM
|
||||
#error "SNMM is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead."
|
||||
#elif ENABLED(MK2_MULTIPLEXER)
|
||||
#error "MK2_MULTIPLEXER is obsolete. Define MMU_MODEL as PRUSA_MMU1 instead."
|
||||
#elif ENABLED(PRUSA_MMU2)
|
||||
#error "PRUSA_MMU2 is obsolete. Define MMU_MODEL as PRUSA_MMU2 instead."
|
||||
#elif ENABLED(PRUSA_MMU2_S_MODE)
|
||||
#error "PRUSA_MMU2_S_MODE is obsolete. Define MMU_MODEL as PRUSA_MMU2S instead."
|
||||
#elif ENABLED(SMUFF_EMU_MMU2)
|
||||
#error "SMUFF_EMU_MMU2 is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2 instead."
|
||||
#elif ENABLED(SMUFF_EMU_MMU2S)
|
||||
#error "SMUFF_EMU_MMU2S is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2S instead."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Multi-Material-Unit 2 / EXTENDABLE_EMU_MMU2 requirements
|
||||
*/
|
||||
@@ -1553,7 +1517,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
#error "SCARA machines can only use AUTO_BED_LEVELING_BILINEAR or MESH_BED_LEVELING."
|
||||
#elif ENABLED(AUTO_BED_LEVELING_LINEAR) && !(WITHIN(GRID_MAX_POINTS_X, 2, 255) && WITHIN(GRID_MAX_POINTS_Y, 2, 255))
|
||||
#error "GRID_MAX_POINTS_[XY] must be between 2 and 255 with AUTO_BED_LEVELING_LINEAR."
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) && !(WITHIN(GRID_MAX_POINTS_X, 3, 255) && WITHIN(GRID_MAX_POINTS_Y, 3, 255))
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) && !(WITHIN(GRID_MAX_POINTS_X, 2, 255) && WITHIN(GRID_MAX_POINTS_Y, 2, 255))
|
||||
#error "GRID_MAX_POINTS_[XY] must be between 3 and 255 with AUTO_BED_LEVELING_BILINEAR."
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#if ENABLED(POLAR)
|
||||
@@ -1686,18 +1650,18 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
|
||||
#ifdef SENSORLESS_BACKOFF_MM
|
||||
constexpr float sbm[] = SENSORLESS_BACKOFF_MM;
|
||||
static_assert(COUNT(sbm) == NUM_AXES, "SENSORLESS_BACKOFF_MM must have " _NUM_AXES_STR "elements (and no others).");
|
||||
NUM_AXIS_CODE(
|
||||
static_assert(sbm[X_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.X must be greater than or equal to 0."),
|
||||
static_assert(sbm[Y_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Y must be greater than or equal to 0."),
|
||||
static_assert(sbm[Z_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Z must be greater than or equal to 0."),
|
||||
static_assert(sbm[I_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.I must be greater than or equal to 0."),
|
||||
static_assert(sbm[J_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.J must be greater than or equal to 0."),
|
||||
static_assert(sbm[K_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.K must be greater than or equal to 0."),
|
||||
static_assert(sbm[U_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.U must be greater than or equal to 0."),
|
||||
static_assert(sbm[V_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.V must be greater than or equal to 0."),
|
||||
static_assert(sbm[W_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.W must be greater than or equal to 0.")
|
||||
);
|
||||
//static_assert(COUNT(sbm) == NUM_AXES, "SENSORLESS_BACKOFF_MM must have " _NUM_AXES_STR "elements (and no others).");
|
||||
//NUM_AXIS_CODE(
|
||||
// static_assert(sbm[X_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.X must be greater than or equal to 0."),
|
||||
// static_assert(sbm[Y_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Y must be greater than or equal to 0."),
|
||||
// static_assert(sbm[Z_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Z must be greater than or equal to 0."),
|
||||
// static_assert(sbm[I_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.I must be greater than or equal to 0."),
|
||||
// static_assert(sbm[J_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.J must be greater than or equal to 0."),
|
||||
// static_assert(sbm[K_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.K must be greater than or equal to 0."),
|
||||
// static_assert(sbm[U_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.U must be greater than or equal to 0."),
|
||||
// static_assert(sbm[V_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.V must be greater than or equal to 0."),
|
||||
// static_assert(sbm[W_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.W must be greater than or equal to 0.")
|
||||
//);
|
||||
#endif
|
||||
|
||||
#if ENABLED(CODEPENDENT_XY_HOMING)
|
||||
@@ -2275,7 +2239,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FYSETC/MKS/BTT Mini Panel Requirements
|
||||
* FYSETC/MKS/BTT/BEEZ Mini Panel Requirements
|
||||
*/
|
||||
#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1)
|
||||
#ifndef NEO_RGB
|
||||
@@ -2283,9 +2247,9 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
#define FAUX_RGB 1
|
||||
#endif
|
||||
#if defined(NEOPIXEL_TYPE) && NEOPIXEL_TYPE != NEO_RGB
|
||||
#error "Your FYSETC/MKS/BTT Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB."
|
||||
#error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB."
|
||||
#elif defined(NEOPIXEL_PIXELS) && NEOPIXEL_PIXELS < 3
|
||||
#error "Your FYSETC/MKS/BTT Mini Panel requires NEOPIXEL_PIXELS >= 3."
|
||||
#error "Your FYSETC/MKS/BTT/BEEZ Mini Panel requires NEOPIXEL_PIXELS >= 3."
|
||||
#endif
|
||||
#if FAUX_RGB
|
||||
#undef NEO_RGB
|
||||
@@ -2618,8 +2582,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
+ (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
|
||||
+ (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
|
||||
+ (ENABLED(MKS_MINI_12864) && NONE(MKS_LCD12864A, MKS_LCD12864B)) \
|
||||
+ (ENABLED(FYSETC_MINI_12864_2_1) && NONE(MKS_MINI_12864_V3, BTT_MINI_12864)) \
|
||||
+ COUNT_ENABLED(MKS_MINI_12864_V3, BTT_MINI_12864) \
|
||||
+ (ENABLED(FYSETC_MINI_12864_2_1) && NONE(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864)) \
|
||||
+ COUNT_ENABLED(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864) \
|
||||
+ (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
|
||||
+ (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \
|
||||
+ (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \
|
||||
@@ -4159,8 +4123,12 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
||||
/**
|
||||
* Fixed-Time Motion limitations
|
||||
*/
|
||||
#if ALL(FT_MOTION, MIXING_EXTRUDER)
|
||||
#error "FT_MOTION does not currently support MIXING_EXTRUDER."
|
||||
#if ENABLED(FT_MOTION)
|
||||
#if ENABLED(MIXING_EXTRUDER)
|
||||
#error "FT_MOTION does not currently support MIXING_EXTRUDER."
|
||||
#elif DISABLED(FTM_UNIFIED_BWS)
|
||||
#error "FT_MOTION requires FTM_UNIFIED_BWS to be enabled because FBS is not yet implemented."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Multi-Stepping Limit
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2024-01-01"
|
||||
#define STRING_DISTRIBUTION_DATE "2024-01-09"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,6 +42,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if DISABLED(DEBUG_FLAGS_GCODE)
|
||||
#warning "DEBUG_FLAGS_GCODE is recommended if you have space. Some hosts rely on it."
|
||||
#endif
|
||||
|
||||
#if DISABLED(CAPABILITIES_REPORT)
|
||||
#warning "CAPABILITIES_REPORT is recommended if you have space. Some hosts rely on it."
|
||||
#endif
|
||||
|
||||
#if ENABLED(LA_DEBUG)
|
||||
#warning "WARNING! Disable LA_DEBUG for the final build!"
|
||||
#endif
|
||||
@@ -695,16 +703,16 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FYSETC/MKS/BTT Mini Panel backlighting
|
||||
* FYSETC/MKS/BTT/BEEZ Mini Panel backlighting
|
||||
*/
|
||||
#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS)
|
||||
#warning "Your FYSETC/MKS/BTT Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS."
|
||||
#warning "Your FYSETC/MKS/BTT/BEEZ Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS."
|
||||
#endif
|
||||
|
||||
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
|
||||
#warning "Your FYSETC Mini Panel works best with RGB_LED."
|
||||
#elif ANY(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
|
||||
#warning "Your FYSETC/MKS/BTT Mini Panel works best with LED_USER_PRESET_STARTUP."
|
||||
#warning "Your FYSETC/MKS/BTT/BEEZ Mini Panel works best with LED_USER_PRESET_STARTUP."
|
||||
#endif
|
||||
|
||||
#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && ALL(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT
|
||||
@@ -818,3 +826,10 @@
|
||||
#if PIN_EXISTS(BEEPER) && ALL(SPEAKER, NO_SPEAKER)
|
||||
#warning "The BEEPER cannot produce tones so you can disable SPEAKER."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Fixed-Time Motion
|
||||
*/
|
||||
#if ALL(FT_MOTION, I2S_STEPPER_STREAM)
|
||||
#warning "FT_MOTION has not been tested with I2S_STEPPER_STREAM."
|
||||
#endif
|
||||
|
||||
@@ -2910,7 +2910,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
case ADVANCED_LOAD:
|
||||
if (draw) {
|
||||
drawMenuItem(row, ICON_WriteEEPROM, F("Load Length"));
|
||||
@@ -2927,7 +2927,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra
|
||||
else
|
||||
modifyValue(fc_settings[0].unload_length, 0, EXTRUDE_MAXLENGTH, 1);
|
||||
break;
|
||||
#endif // ADVANCED_PAUSE_FEATURE
|
||||
#endif // CONFIGURE_FILAMENT_CHANGE
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
case ADVANCED_COLD_EXTRUDE:
|
||||
|
||||
@@ -2306,7 +2306,7 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
void setFilLoad() { setPFloatOnClick(0, EXTRUDE_MAXLENGTH, UNITFDIGITS); }
|
||||
void setFilUnload() { setPFloatOnClick(0, EXTRUDE_MAXLENGTH, UNITFDIGITS); }
|
||||
#endif
|
||||
@@ -3302,7 +3302,7 @@ void drawFilSetMenu() {
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
EDIT_ITEM(ICON_ExtrudeMinT, MSG_EXTRUDER_MIN_TEMP, onDrawPIntMenu, setExtMinT, &hmiData.extMinT);
|
||||
#endif
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
EDIT_ITEM(ICON_FilLoad, MSG_FILAMENT_LOAD, onDrawPFloatMenu, setFilLoad, &fc_settings[0].load_length);
|
||||
EDIT_ITEM(ICON_FilUnload, MSG_FILAMENT_UNLOAD, onDrawPFloatMenu, setFilUnload, &fc_settings[0].unload_length);
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
|
||||
#if ENABLED(TOUCH_UI_PORTRAIT)
|
||||
#include "../theme/_bootscreen_portrait.h"
|
||||
#include "../theme/_bootscreen_logo_portrait.h"
|
||||
#else
|
||||
#include "../theme/_bootscreen_landscape.h"
|
||||
#endif
|
||||
|
||||
@@ -31,10 +31,16 @@ using namespace ExtUI;
|
||||
|
||||
void EndstopStatesScreen::onEntry() {
|
||||
BaseScreen::onEntry();
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
enable_emi_pins(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
void EndstopStatesScreen::onExit() {
|
||||
BaseScreen::onExit();
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
enable_emi_pins(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define GRID_COLS 6
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1655,9 +1655,9 @@ void RTS::handleData() {
|
||||
|
||||
case AutolevelVal: {
|
||||
uint8_t meshPoint = (recdat.addr - AutolevelVal) / 2,
|
||||
yPnt = floor(meshPoint / GRID_MAX_POINTS_X),
|
||||
xPnt = meshPoint - (yPnt * GRID_MAX_POINTS_X);
|
||||
if (yPnt % 2 != 0) xPnt = (GRID_MAX_POINTS_X - 1) - xPnt; // zag row
|
||||
yPnt = meshPoint / (GRID_MAX_POINTS_X),
|
||||
xPnt = meshPoint - yPnt * (GRID_MAX_POINTS_X);
|
||||
if (yPnt % 2 != 0) xPnt = (GRID_MAX_POINTS_X) - 1 - xPnt; // zag row
|
||||
|
||||
float meshVal = float(recdat.data[0] - (recdat.data[0] >= 32768 ? 65536 : 0)) / 1000;
|
||||
|
||||
|
||||
@@ -63,9 +63,7 @@ void TFT::lcdInit() {
|
||||
#if PIN_EXISTS(TFT_BACKLIGHT)
|
||||
OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH);
|
||||
#endif
|
||||
#if HAS_LOGO_IN_FLASH
|
||||
delay(2000);
|
||||
#endif
|
||||
TERN_(HAS_LOGO_IN_FLASH, delay(2000));
|
||||
}
|
||||
|
||||
void TFT::lcdClear(uint16_t color) {
|
||||
|
||||
@@ -323,7 +323,7 @@ void NextionTFT::panelInfo(uint8_t req) {
|
||||
SEND_PRINT_INFO("t8", getFilamentUsed_str);
|
||||
break;
|
||||
|
||||
case 28: // Filament laod/unload
|
||||
case 28: // Filament load/unload
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#define SEND_PAUSE_INFO(A, B) SEND_VALasTXT(A, fc_settings[getActiveTool()].B)
|
||||
#else
|
||||
|
||||
@@ -136,7 +136,7 @@ void menu_backlash();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
constexpr float extrude_maxlength = TERN(PREVENT_LENGTHY_EXTRUDE, EXTRUDE_MAXLENGTH, 999);
|
||||
|
||||
EDIT_ITEM_FAST(float4, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength);
|
||||
|
||||
@@ -39,10 +39,6 @@
|
||||
#include "../../feature/cooler.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// "Temperature" submenu items
|
||||
//
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
#include "../../module/temperature.h"
|
||||
#include "../../MarlinCore.h"
|
||||
|
||||
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
@@ -58,7 +58,7 @@ void TFT_String::set_font(const uint8_t *font) {
|
||||
for (glyph = 0; glyph < EXTRA_GLYPHS; glyph++) glyphs_extra[glyph] = nullptr;
|
||||
#endif
|
||||
|
||||
DEBUG_ECHOLNPGM("Format: ", ((unifont_t *)font_header)->format);
|
||||
DEBUG_ECHOLNPGM("format: ", ((unifont_t *)font_header)->format);
|
||||
DEBUG_ECHOLNPGM("capitalAHeight: ", ((unifont_t *)font_header)->capitalAHeight);
|
||||
DEBUG_ECHOLNPGM("fontStartEncoding: ", ((unifont_t *)font_header)->fontStartEncoding);
|
||||
DEBUG_ECHOLNPGM("fontEndEncoding: ", ((unifont_t *)font_header)->fontEndEncoding);
|
||||
|
||||
@@ -111,37 +111,37 @@ void TFT_IO::initTFT() {
|
||||
switch (lcd_id) {
|
||||
case LTDC_RGB:
|
||||
break;
|
||||
case ST7796: // ST7796S 480x320
|
||||
DEBUG_ECHO_MSG(" ST7796S");
|
||||
case ST7796:
|
||||
DEBUG_ECHO_MSG(" ST7796S"); // 480x320
|
||||
write_esc_sequence(st7796s_init);
|
||||
break;
|
||||
case ST7789: // ST7789V 320x240
|
||||
DEBUG_ECHO_MSG(" ST7789V");
|
||||
case ST7789:
|
||||
DEBUG_ECHO_MSG(" ST7789V"); // 320x240
|
||||
write_esc_sequence(st7789v_init);
|
||||
break;
|
||||
case SSD1963: // SSD1963
|
||||
case SSD1963:
|
||||
DEBUG_ECHO_MSG(" SSD1963");
|
||||
write_esc_sequence(ssd1963_init);
|
||||
break;
|
||||
case ST7735: // ST7735 160x128
|
||||
DEBUG_ECHO_MSG(" ST7735");
|
||||
case ST7735:
|
||||
DEBUG_ECHO_MSG(" ST7735"); // 160x128
|
||||
write_esc_sequence(st7735_init);
|
||||
break;
|
||||
case R61505: // R61505U 320x240
|
||||
DEBUG_ECHO_MSG(" R61505U");
|
||||
case R61505:
|
||||
DEBUG_ECHO_MSG(" R61505U"); // 320x240
|
||||
write_esc_sequence(r61505_init);
|
||||
break;
|
||||
case ILI9328: // ILI9328 320x240
|
||||
DEBUG_ECHO_MSG(" ILI9328");
|
||||
case ILI9328:
|
||||
DEBUG_ECHO_MSG(" ILI9328"); // 320x240
|
||||
write_esc_sequence(ili9328_init);
|
||||
break;
|
||||
case ILI9341: // ILI9341 320x240
|
||||
DEBUG_ECHO_MSG(" ILI9341");
|
||||
case ILI9341:
|
||||
DEBUG_ECHO_MSG(" ILI9341"); // 320x240
|
||||
write_esc_sequence(ili9341_init);
|
||||
break;
|
||||
case ILI9488: // ILI9488 480x320
|
||||
case ILI9488_ID1: // 0x8066 ILI9488 480x320
|
||||
DEBUG_ECHO_MSG(" ILI9488");
|
||||
case ILI9488:
|
||||
case ILI9488_ID1:
|
||||
DEBUG_ECHO_MSG(" ILI9488"); // 480x320
|
||||
write_esc_sequence(ili9488_init);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef TFT_DRIVER
|
||||
#define TFT_DRIVER AUTO
|
||||
#define TFT_DRIVER AUTO
|
||||
#endif
|
||||
|
||||
#define ESC_REG(x) 0xFFFF, 0x00FF & (uint16_t)x
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/******************************
|
||||
* lulzbot_emi_filtering.cpp *
|
||||
******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2020 *
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "MarlinCore.h"
|
||||
|
||||
#include "lulzbot_emi_filtering.h"
|
||||
|
||||
/******************************** EMI MITIGATION *******************************/
|
||||
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
void emi_init(void) {
|
||||
enable_emi_pins(false);
|
||||
|
||||
#define EMI_SHUTOFF(pin) SET_OUTPUT(pin); WRITE(pin, LOW);
|
||||
|
||||
#if MB(ARCHIM2)
|
||||
//EMI_SHUTOFF(GPIO_PB1_J20_5)
|
||||
EMI_SHUTOFF(GPIO_PB0_J20_6)
|
||||
EMI_SHUTOFF(GPIO_PB3_J20_7)
|
||||
EMI_SHUTOFF(GPIO_PB2_J20_8)
|
||||
EMI_SHUTOFF(GPIO_PB6_J20_9)
|
||||
EMI_SHUTOFF(GPIO_PB5_J20_10)
|
||||
EMI_SHUTOFF(GPIO_PB8_J20_11)
|
||||
EMI_SHUTOFF(GPIO_PB4_J20_12)
|
||||
EMI_SHUTOFF(GPIO_PB9_J20_13)
|
||||
EMI_SHUTOFF(GPIO_PB7_J20_14)
|
||||
//EMI_SHUTOFF(GPIO_PB15_J20_15)
|
||||
//EMI_SHUTOFF(GPIO_PB15_J20_16)
|
||||
EMI_SHUTOFF(GPIO_PB14_J20_17)
|
||||
EMI_SHUTOFF(GPIO_PA18_J20_21)
|
||||
EMI_SHUTOFF(GPIO_PA17_J20_22)
|
||||
#endif
|
||||
}
|
||||
|
||||
#define SET_PIN_STATE(pin, enable) \
|
||||
if(enable) { \
|
||||
/* Set as inputs with pull-up resistor */ \
|
||||
SET_INPUT(pin); \
|
||||
WRITE(pin, HIGH); \
|
||||
} else { \
|
||||
SET_OUTPUT(pin); \
|
||||
WRITE(pin, LOW); \
|
||||
}
|
||||
|
||||
/* Enable the probe pins only only when homing/probing,
|
||||
* as this helps reduce EMI by grounding the lines.
|
||||
*/
|
||||
void enable_emi_pins(const bool enable) {
|
||||
#if DISABLED(ENDSTOPS_ALWAYS_ON_DEFAULT) && ENABLED(NOZZLE_AS_PROBE)
|
||||
#if PIN_EXISTS(Z_MIN_PIN)
|
||||
SET_PIN_STATE(Z_MIN_PIN, enable);
|
||||
#endif
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MIN_PROBE) && ENABLED(NOZZLE_AS_PROBE)
|
||||
SET_PIN_STATE(Z_MIN_PROBE_PIN, enable)
|
||||
#endif
|
||||
|
||||
/* Wait to charge up the lines */
|
||||
if(enable) delay(5);
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/****************************
|
||||
* drunken_octopus_extras.h *
|
||||
****************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2020 *
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include <stdbool.h>
|
||||
|
||||
/******************************** EMI MITIGATION *******************************/
|
||||
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
void emi_init(void);
|
||||
void enable_emi_pins(const bool);
|
||||
#endif
|
||||
@@ -55,8 +55,8 @@ FTMotion ftMotion;
|
||||
ft_config_t FTMotion::cfg;
|
||||
bool FTMotion::busy; // = false
|
||||
ft_command_t FTMotion::stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE] = {0U}; // Stepper commands buffer.
|
||||
uint32_t FTMotion::stepperCmdBuff_produceIdx = 0, // Index of next stepper command write to the buffer.
|
||||
FTMotion::stepperCmdBuff_consumeIdx = 0; // Index of next stepper command read from the buffer.
|
||||
int32_t FTMotion::stepperCmdBuff_produceIdx = 0, // Index of next stepper command write to the buffer.
|
||||
FTMotion::stepperCmdBuff_consumeIdx = 0; // Index of next stepper command read from the buffer.
|
||||
|
||||
bool FTMotion::sts_stepperBusy = false; // The stepper buffer has items and is in use.
|
||||
|
||||
@@ -123,6 +123,8 @@ uint32_t FTMotion::interpIdx = 0, // Index of current data point b
|
||||
float FTMotion::e_advanced_z1 = 0.0f; // (ms) Unit delay of advanced extruder position.
|
||||
#endif
|
||||
|
||||
constexpr uint32_t last_batchIdx = (FTM_WINDOW_SIZE) - (FTM_BATCH_SIZE);
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
// Function definitions.
|
||||
//-----------------------------------------------------------------
|
||||
@@ -145,8 +147,16 @@ void FTMotion::runoutBlock() {
|
||||
ratio.reset();
|
||||
|
||||
max_intervals = cfg.modeHasShaper() ? shaper_intervals : 0;
|
||||
if (max_intervals <= TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, min_max_intervals - (FTM_BATCH_SIZE))) max_intervals = min_max_intervals;
|
||||
max_intervals += TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_WINDOW_SIZE) - makeVector_batchIdx;
|
||||
if (max_intervals <= TERN(FTM_UNIFIED_BWS, FTM_BATCH_SIZE, min_max_intervals - (FTM_BATCH_SIZE)))
|
||||
max_intervals = min_max_intervals;
|
||||
|
||||
max_intervals += (
|
||||
#if ENABLED(FTM_UNIFIED_BWS)
|
||||
FTM_WINDOW_SIZE - makeVector_batchIdx
|
||||
#else
|
||||
FTM_WINDOW_SIZE - ((last_batchIdx < (FTM_BATCH_SIZE)) ? 0 : makeVector_batchIdx)
|
||||
#endif
|
||||
);
|
||||
blockProcRdy = blockDataIsRunout = true;
|
||||
runoutEna = blockProcDn = false;
|
||||
}
|
||||
@@ -198,7 +208,7 @@ void FTMotion::loop() {
|
||||
);
|
||||
|
||||
// Shift the time series back in the window
|
||||
#define TSHIFT(A) memcpy(traj.A, &traj.A[FTM_BATCH_SIZE], (FTM_WINDOW_SIZE - FTM_BATCH_SIZE) * sizeof(traj.A[0]))
|
||||
#define TSHIFT(A) memcpy(traj.A, &traj.A[FTM_BATCH_SIZE], last_batchIdx * sizeof(traj.A[0]))
|
||||
LOGICAL_AXIS_CODE(
|
||||
TSHIFT(e),
|
||||
TSHIFT(x), TSHIFT(y), TSHIFT(z),
|
||||
@@ -219,7 +229,7 @@ void FTMotion::loop() {
|
||||
&& (interpIdx - interpIdx_z1 < (FTM_STEPS_PER_LOOP))
|
||||
) {
|
||||
convertToSteps(interpIdx);
|
||||
if (++interpIdx == TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE)) {
|
||||
if (++interpIdx == FTM_BATCH_SIZE) {
|
||||
batchRdyForInterp = false;
|
||||
interpIdx = 0;
|
||||
}
|
||||
@@ -449,7 +459,7 @@ void FTMotion::reset() {
|
||||
endPosn_prevBlock.reset();
|
||||
|
||||
makeVector_idx = makeVector_idx_z1 = 0;
|
||||
makeVector_batchIdx = 0;
|
||||
makeVector_batchIdx = TERN(FTM_UNIFIED_BWS, 0, _MAX(last_batchIdx, FTM_BATCH_SIZE));
|
||||
|
||||
steps.reset();
|
||||
interpIdx = interpIdx_z1 = 0;
|
||||
@@ -464,10 +474,11 @@ void FTMotion::reset() {
|
||||
}
|
||||
|
||||
// Private functions.
|
||||
|
||||
// Auxiliary function to get number of step commands in the buffer.
|
||||
uint32_t FTMotion::stepperCmdBuffItems() {
|
||||
const uint32_t udiff = stepperCmdBuff_produceIdx - stepperCmdBuff_consumeIdx;
|
||||
return stepperCmdBuff_produceIdx < stepperCmdBuff_consumeIdx ? (FTM_STEPPERCMD_BUFF_SIZE) + udiff : udiff;
|
||||
int32_t FTMotion::stepperCmdBuffItems() {
|
||||
const int32_t udiff = stepperCmdBuff_produceIdx - stepperCmdBuff_consumeIdx;
|
||||
return (udiff < 0) ? udiff + (FTM_STEPPERCMD_BUFF_SIZE) : udiff;
|
||||
}
|
||||
|
||||
// Initializes storage variables before startup.
|
||||
@@ -544,9 +555,9 @@ void FTMotion::loadBlockData(block_t * const current_block) {
|
||||
const float T1 = (F_n - f_s) * oneOverAccel,
|
||||
T3 = (F_n - f_e) * oneOverAccel;
|
||||
|
||||
N1 = ceil(T1 * (FTM_FS)); // Accel datapoints based on Hz frequency
|
||||
N2 = ceil(T2 * (FTM_FS)); // Coast
|
||||
N3 = ceil(T3 * (FTM_FS)); // Decel
|
||||
N1 = CEIL(T1 * (FTM_FS)); // Accel datapoints based on Hz frequency
|
||||
N2 = CEIL(T2 * (FTM_FS)); // Coast
|
||||
N3 = CEIL(T3 * (FTM_FS)); // Decel
|
||||
|
||||
const float T1_P = N1 * (FTM_TS), // (s) Accel datapoints x timestep resolution
|
||||
T2_P = N2 * (FTM_TS), // (s) Coast
|
||||
@@ -677,8 +688,8 @@ void FTMotion::makeVector() {
|
||||
#endif
|
||||
|
||||
// Filled up the queue with regular and shaped steps
|
||||
if (++makeVector_batchIdx == TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, (FTM_WINDOW_SIZE - FTM_BATCH_SIZE))) {
|
||||
makeVector_batchIdx = 0;
|
||||
if (++makeVector_batchIdx == FTM_WINDOW_SIZE) {
|
||||
makeVector_batchIdx = last_batchIdx;
|
||||
batchRdy = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,12 +102,11 @@ class FTMotion {
|
||||
}
|
||||
|
||||
static ft_command_t stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of stepper commands.
|
||||
static uint32_t stepperCmdBuff_produceIdx, // Index of next stepper command write to the buffer.
|
||||
stepperCmdBuff_consumeIdx; // Index of next stepper command read from the buffer.
|
||||
static int32_t stepperCmdBuff_produceIdx, // Index of next stepper command write to the buffer.
|
||||
stepperCmdBuff_consumeIdx; // Index of next stepper command read from the buffer.
|
||||
|
||||
static bool sts_stepperBusy; // The stepper buffer has items and is in use.
|
||||
|
||||
|
||||
// Public methods
|
||||
static void init();
|
||||
static void startBlockProc(); // Set controller states to begin processing a block.
|
||||
@@ -153,10 +152,10 @@ class FTMotion {
|
||||
static uint32_t N1, N2, N3;
|
||||
static uint32_t max_intervals;
|
||||
|
||||
static constexpr uint32_t _ftm_size = TERN(FTM_UNIFIED_BWS, FTM_BW_SIZE, FTM_BATCH_SIZE),
|
||||
_ftm_wind = TERN(FTM_UNIFIED_BWS, 2, CEIL((FTM_WINDOW_SIZE) / _ftm_size)),
|
||||
shaper_intervals = _ftm_size * CEIL((FTM_ZMAX) / _ftm_size),
|
||||
min_max_intervals = _ftm_size * _ftm_wind;
|
||||
#define _DIVCEIL(A,B) (((A) + (B) - 1) / (B))
|
||||
static constexpr uint32_t _ftm_ratio = TERN(FTM_UNIFIED_BWS, 2, _DIVCEIL(FTM_WINDOW_SIZE, FTM_BATCH_SIZE)),
|
||||
shaper_intervals = (FTM_BATCH_SIZE) * _DIVCEIL(FTM_ZMAX, FTM_BATCH_SIZE),
|
||||
min_max_intervals = (FTM_BATCH_SIZE) * _ftm_ratio;
|
||||
|
||||
// Make vector variables.
|
||||
static uint32_t makeVector_idx,
|
||||
@@ -203,7 +202,7 @@ class FTMotion {
|
||||
#endif
|
||||
|
||||
// Private methods
|
||||
static uint32_t stepperCmdBuffItems();
|
||||
static int32_t stepperCmdBuffItems();
|
||||
static void loadBlockData(block_t *const current_block);
|
||||
static void makeVector();
|
||||
static void convertToSteps(const uint32_t idx);
|
||||
|
||||
@@ -24,35 +24,28 @@
|
||||
#include "../core/types.h"
|
||||
|
||||
typedef enum FXDTICtrlMode : uint8_t {
|
||||
ftMotionMode_DISABLED = 0U,
|
||||
ftMotionMode_ENABLED = 1U,
|
||||
//ftMotionMode_ULENDO_FBS = 2U,
|
||||
ftMotionMode_ZV = 10U,
|
||||
ftMotionMode_ZVD = 11U,
|
||||
ftMotionMode_ZVDD = 12U,
|
||||
ftMotionMode_ZVDDD = 13U,
|
||||
ftMotionMode_EI = 14U,
|
||||
ftMotionMode_2HEI = 15U,
|
||||
ftMotionMode_3HEI = 16U,
|
||||
ftMotionMode_MZV = 17U,
|
||||
//ftMotionMode_DISCTF = 20U
|
||||
ftMotionMode_DISABLED = 0, // Standard Motion
|
||||
ftMotionMode_ENABLED = 1, // Time-Based Motion
|
||||
ftMotionMode_ZV = 10, // Zero Vibration
|
||||
ftMotionMode_ZVD = 11, // Zero Vibration and Derivative
|
||||
ftMotionMode_ZVDD = 12, // Zero Vibration, Derivative, and Double Derivative
|
||||
ftMotionMode_ZVDDD = 13, // Zero Vibration, Derivative, Double Derivative, and Triple Derivative
|
||||
ftMotionMode_EI = 14, // Extra-Intensive
|
||||
ftMotionMode_2HEI = 15, // 2-Hump Extra-Intensive
|
||||
ftMotionMode_3HEI = 16, // 3-Hump Extra-Intensive
|
||||
ftMotionMode_MZV = 17 // Mass-based Zero Vibration
|
||||
} ftMotionMode_t;
|
||||
|
||||
enum dynFreqMode_t : uint8_t {
|
||||
dynFreqMode_DISABLED = 0U,
|
||||
dynFreqMode_Z_BASED = 1U,
|
||||
dynFreqMode_MASS_BASED = 2U
|
||||
dynFreqMode_DISABLED = 0,
|
||||
dynFreqMode_Z_BASED = 1,
|
||||
dynFreqMode_MASS_BASED = 2
|
||||
};
|
||||
|
||||
#define IS_EI_MODE(N) WITHIN(N, ftMotionMode_EI, ftMotionMode_3HEI)
|
||||
|
||||
#if ENABLED(FTM_UNIFIED_BWS)
|
||||
typedef struct XYZEarray<float, FTM_BW_SIZE> xyze_trajectory_t;
|
||||
typedef struct XYZEarray<float, FTM_BW_SIZE> xyze_trajectoryMod_t;
|
||||
#else
|
||||
typedef struct XYZEarray<float, FTM_WINDOW_SIZE> xyze_trajectory_t;
|
||||
typedef struct XYZEarray<float, FTM_BATCH_SIZE> xyze_trajectoryMod_t;
|
||||
#endif
|
||||
typedef struct XYZEarray<float, FTM_WINDOW_SIZE> xyze_trajectory_t;
|
||||
typedef struct XYZEarray<float, FTM_BATCH_SIZE> xyze_trajectoryMod_t;
|
||||
|
||||
enum {
|
||||
LIST_N(DOUBLE(LOGICAL_AXES),
|
||||
|
||||
@@ -2133,6 +2133,10 @@ void prepare_line_to_destination() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
enable_emi_pins(true);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Back away to prevent an early sensorless trigger
|
||||
//
|
||||
@@ -2404,6 +2408,10 @@ void prepare_line_to_destination() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(EMI_MITIGATION)
|
||||
enable_emi_pins(false);
|
||||
#endif
|
||||
|
||||
// Clear retracted status if homing the Z axis
|
||||
#if ENABLED(FWRETRACT)
|
||||
if (axis == Z_AXIS) fwretract.current_hop = 0.0;
|
||||
|
||||
@@ -328,6 +328,9 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
|
||||
#endif
|
||||
|
||||
void Probe::set_probing_paused(const bool dopause) {
|
||||
#if ENABLED(EMI_MITIGATION) && ENABLED(NOZZLE_AS_PROBE)
|
||||
enable_emi_pins(p);
|
||||
#endif
|
||||
TERN_(PROBING_HEATERS_OFF, thermalManager.pause_heaters(dopause));
|
||||
TERN_(PROBING_FANS_OFF, thermalManager.set_fans_paused(dopause));
|
||||
TERN_(PROBING_ESTEPPERS_OFF, if (dopause) stepper.disable_e_steppers());
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
// Change EEPROM version if the structure changes
|
||||
#define EEPROM_VERSION "V89"
|
||||
#define EEPROM_VERSION "V90"
|
||||
#define EEPROM_OFFSET 100
|
||||
|
||||
// Check the integrity of data offsets.
|
||||
@@ -508,7 +508,7 @@ typedef struct SettingsDataStruct {
|
||||
//
|
||||
// ADVANCED_PAUSE_FEATURE
|
||||
//
|
||||
#if HAS_EXTRUDERS
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
fil_change_settings_t fc_settings[EXTRUDERS]; // M603 T U L
|
||||
#endif
|
||||
|
||||
@@ -1551,11 +1551,8 @@ void MarlinSettings::postprocess() {
|
||||
//
|
||||
// Advanced Pause filament load & unload lengths
|
||||
//
|
||||
#if HAS_EXTRUDERS
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
{
|
||||
#if DISABLED(ADVANCED_PAUSE_FEATURE)
|
||||
const fil_change_settings_t fc_settings[EXTRUDERS] = { 0, 0 };
|
||||
#endif
|
||||
_FIELD_TEST(fc_settings);
|
||||
EEPROM_WRITE(fc_settings);
|
||||
}
|
||||
@@ -2626,11 +2623,8 @@ void MarlinSettings::postprocess() {
|
||||
//
|
||||
// Advanced Pause filament load & unload lengths
|
||||
//
|
||||
#if HAS_EXTRUDERS
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
{
|
||||
#if DISABLED(ADVANCED_PAUSE_FEATURE)
|
||||
fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#endif
|
||||
_FIELD_TEST(fc_settings);
|
||||
EEPROM_READ(fc_settings);
|
||||
}
|
||||
@@ -3549,7 +3543,7 @@ void MarlinSettings::reset() {
|
||||
//
|
||||
// Advanced Pause filament load & unload lengths
|
||||
//
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
EXTRUDER_LOOP() {
|
||||
fc_settings[e].unload_length = FILAMENT_CHANGE_UNLOAD_LENGTH;
|
||||
fc_settings[e].load_length = FILAMENT_CHANGE_FAST_LOAD_LENGTH;
|
||||
@@ -3924,7 +3918,7 @@ void MarlinSettings::reset() {
|
||||
//
|
||||
// Advanced Pause filament load & unload lengths
|
||||
//
|
||||
TERN_(ADVANCED_PAUSE_FEATURE, gcode.M603_report(forReplay));
|
||||
TERN_(CONFIGURE_FILAMENT_CHANGE, gcode.M603_report(forReplay));
|
||||
|
||||
//
|
||||
// Tool-changing Parameters
|
||||
|
||||
@@ -1508,14 +1508,12 @@ void Stepper::isr() {
|
||||
#if ENABLED(FT_MOTION)
|
||||
|
||||
if (using_ftMotion) {
|
||||
if (!nextMainISR) {
|
||||
nextMainISR = FTM_MIN_TICKS;
|
||||
ftMotion_stepper();
|
||||
endstops.update();
|
||||
TERN_(BABYSTEPPING, if (babystep.has_steps()) babystepping_isr());
|
||||
if (!nextMainISR) { // Main ISR is ready to fire during this iteration?
|
||||
nextMainISR = FTM_MIN_TICKS; // Set to minimum interval (a limit on the top speed)
|
||||
ftMotion_stepper(); // Run FTM Stepping
|
||||
}
|
||||
interval = nextMainISR;
|
||||
nextMainISR -= interval;
|
||||
interval = nextMainISR; // Interval is either some old nextMainISR or FTM_MIN_TICKS
|
||||
nextMainISR = 0; // For FT Motion fire again ASAP
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -3161,7 +3159,7 @@ void Stepper::init() {
|
||||
factor2 += -7.58095488 * zeta2;
|
||||
const float zeta3 = zeta2 * zeta;
|
||||
factor2 += 43.073216 * zeta3;
|
||||
factor2 = floor(factor2);
|
||||
factor2 = FLOOR(factor2);
|
||||
}
|
||||
|
||||
const bool was_on = hal.isr_state();
|
||||
@@ -3448,7 +3446,8 @@ void Stepper::report_positions() {
|
||||
// Use one byte to restore one stepper command in the format:
|
||||
// |X_step|X_direction|Y_step|Y_direction|Z_step|Z_direction|E_step|E_direction|
|
||||
const ft_command_t command = ftMotion.stepperCmdBuff[ftMotion.stepperCmdBuff_consumeIdx];
|
||||
if (++ftMotion.stepperCmdBuff_consumeIdx == (FTM_STEPPERCMD_BUFF_SIZE)) ftMotion.stepperCmdBuff_consumeIdx = 0U;
|
||||
if (++ftMotion.stepperCmdBuff_consumeIdx == (FTM_STEPPERCMD_BUFF_SIZE))
|
||||
ftMotion.stepperCmdBuff_consumeIdx = 0;
|
||||
|
||||
if (abort_current_block) return;
|
||||
|
||||
@@ -3492,6 +3491,8 @@ void Stepper::report_positions() {
|
||||
U_APPLY_STEP(axis_did_move.u, false), V_APPLY_STEP(axis_did_move.v, false), W_APPLY_STEP(axis_did_move.w, false)
|
||||
);
|
||||
|
||||
TERN_(I2S_STEPPER_STREAM, i2s_push_sample());
|
||||
|
||||
// Begin waiting for the minimum pulse duration
|
||||
START_TIMED_PULSE();
|
||||
|
||||
@@ -3533,6 +3534,12 @@ void Stepper::report_positions() {
|
||||
U_APPLY_STEP(!STEP_STATE_U, false), V_APPLY_STEP(!STEP_STATE_V, false), W_APPLY_STEP(!STEP_STATE_W, false)
|
||||
);
|
||||
|
||||
// Check endstops on every step
|
||||
IF_DISABLED(ENDSTOP_INTERRUPTS_FEATURE, endstops.update());
|
||||
|
||||
// Also handle babystepping here
|
||||
TERN_(BABYSTEPPING, if (babystep.has_steps()) babystepping_isr());
|
||||
|
||||
} // Stepper::ftMotion_stepper
|
||||
|
||||
void Stepper::ftMotion_blockQueueUpdate() {
|
||||
|
||||
@@ -182,10 +182,6 @@
|
||||
#include "../feature/joystick.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
#include "tool_change.h"
|
||||
#endif
|
||||
|
||||
#if HAS_BEEPER
|
||||
#include "../libs/buzzer.h"
|
||||
#endif
|
||||
@@ -849,9 +845,9 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
#if ANY(PIDTEMPBED, PIDTEMPCHAMBER)
|
||||
FSTR_P const estring = GHV(F("chamber"), F("bed"), FPSTR(NUL_STR));
|
||||
say_default_(); SERIAL_ECHO(estring, F("Kp "), tune_pid.p);
|
||||
say_default_(); SERIAL_ECHO(estring, F("Ki "), tune_pid.i);
|
||||
say_default_(); SERIAL_ECHO(estring, F("Kd "), tune_pid.d);
|
||||
say_default_(); SERIAL_ECHOLN(estring, F("Kp "), tune_pid.p);
|
||||
say_default_(); SERIAL_ECHOLN(estring, F("Ki "), tune_pid.i);
|
||||
say_default_(); SERIAL_ECHOLN(estring, F("Kd "), tune_pid.d);
|
||||
#else
|
||||
say_default_(); SERIAL_ECHOLNPGM("Kp ", tune_pid.p);
|
||||
say_default_(); SERIAL_ECHOLNPGM("Ki ", tune_pid.i);
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_TOOLCHANGE
|
||||
|
||||
#include "tool_change.h"
|
||||
|
||||
#include "motion.h"
|
||||
@@ -1629,3 +1631,5 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
}
|
||||
|
||||
#endif // TOOLCHANGE_MIGRATION_FEATURE
|
||||
|
||||
#endif // HAS_TOOLCHANGE
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
//
|
||||
// I2S (steppers & other output-only pins)
|
||||
//
|
||||
#define I2S_STEPPER_STREAM
|
||||
#ifndef I2S_STEPPER_STREAM
|
||||
#define I2S_STEPPER_STREAM
|
||||
#endif
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define I2S_WS 17
|
||||
#define I2S_BCK 22
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
//
|
||||
// I2S (steppers & other output-only pins)
|
||||
//
|
||||
#define I2S_STEPPER_STREAM
|
||||
#ifndef I2S_STEPPER_STREAM
|
||||
#define I2S_STEPPER_STREAM
|
||||
#endif
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define I2S_WS 25
|
||||
#define I2S_BCK 26
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
//
|
||||
// Enable I2S stepper stream
|
||||
//
|
||||
#define I2S_STEPPER_STREAM
|
||||
#ifndef I2S_STEPPER_STREAM
|
||||
#define I2S_STEPPER_STREAM
|
||||
#endif
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define I2S_WS 26
|
||||
#define I2S_BCK 25
|
||||
@@ -169,7 +171,7 @@
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
#define LCD_RESET_PIN -1
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
// MKS_MINI_12864_V3, BTT_MINI_12864, FYSETC_MINI_12864_2_1
|
||||
// MKS_MINI_12864_V3, BTT_MINI_12864, FYSETC_MINI_12864_2_1, BEEZ_MINI_12864
|
||||
#define DOGLCD_CS EXP1_03_PIN
|
||||
#define DOGLCD_A0 EXP1_04_PIN
|
||||
#define LCD_RESET_PIN EXP1_05_PIN
|
||||
|
||||
@@ -85,7 +85,9 @@
|
||||
//
|
||||
// Enable I2S stepper stream
|
||||
//
|
||||
#define I2S_STEPPER_STREAM
|
||||
#ifndef I2S_STEPPER_STREAM
|
||||
#define I2S_STEPPER_STREAM
|
||||
#endif
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define I2S_WS 26
|
||||
#define I2S_BCK 25
|
||||
|
||||
@@ -51,7 +51,9 @@
|
||||
//
|
||||
// Enable I2S stepper stream
|
||||
//
|
||||
#define I2S_STEPPER_STREAM
|
||||
#ifndef I2S_STEPPER_STREAM
|
||||
#define I2S_STEPPER_STREAM
|
||||
#endif
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define I2S_WS 26
|
||||
#define I2S_BCK 25
|
||||
|
||||
@@ -34,4 +34,6 @@
|
||||
//
|
||||
// I2S (steppers & other output-only pins)
|
||||
//
|
||||
#define I2S_STEPPER_STREAM
|
||||
#ifndef I2S_STEPPER_STREAM
|
||||
#define I2S_STEPPER_STREAM
|
||||
#endif
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
*
|
||||
* Only the following displays are supported:
|
||||
* ZONESTAR_LCD
|
||||
* CTC_A10S_A13G
|
||||
* CTC_A10S_A13
|
||||
* REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
*/
|
||||
|
||||
@@ -209,10 +209,10 @@
|
||||
#elif IS_RRD_FG_SC
|
||||
|
||||
// Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics
|
||||
// display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb
|
||||
// display using an adapter board. See https://go.aisler.net/benlye/anet-lcd-adapter/pcb
|
||||
// See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748
|
||||
|
||||
#if ENABLED(CTC_A10S_A13G)
|
||||
#if ENABLED(CTC_A10S_A13)
|
||||
|
||||
/**
|
||||
* CTC_A10S_A13 pinout
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 display pinout
|
||||
* FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout
|
||||
*
|
||||
* Board Display
|
||||
* ------ ------
|
||||
@@ -251,13 +251,13 @@
|
||||
* EXP1 EXP1
|
||||
*
|
||||
*
|
||||
* ----- ------
|
||||
* --- ------
|
||||
* | 1 | RST -- |10 9 | --
|
||||
* | 2 | PA3 RX2 RESET_BTN | 8 7 | SD_DETECT
|
||||
* | 3 | PA2 TX2 LCD_MOSI | 6 5 EN2
|
||||
* | 4 | GND -- | 4 3 | EN1
|
||||
* | 5 | 5V LCD_SCK | 2 1 | --
|
||||
* ----- ------
|
||||
* --- ------
|
||||
* TFT EXP2
|
||||
|
||||
*
|
||||
|
||||
@@ -275,11 +275,11 @@
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
|
||||
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
|
||||
#error "CAUTION! FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
|
||||
#error "CAUTION! FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 display pinout
|
||||
* FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout
|
||||
*
|
||||
* Board Display
|
||||
* ------ ------
|
||||
|
||||
@@ -71,10 +71,10 @@ if pioutil.is_pio_build():
|
||||
config = env.GetProjectConfig()
|
||||
result = check_envs("env:"+build_env, board_envs, config)
|
||||
|
||||
if not result:
|
||||
err = "Error: Build environment '%s' is incompatible with %s. Use one of these environments: %s" % \
|
||||
( build_env, motherboard, ", ".join([ e[4:] for e in board_envs if e.startswith("env:") ]) )
|
||||
raise SystemExit(err)
|
||||
# if not result:
|
||||
# err = "Error: Build environment '%s' is incompatible with %s. Use one of these: %s" % \
|
||||
# ( build_env, motherboard, ", ".join([ e[4:] for e in board_envs if e.startswith("env:") ]) )
|
||||
# raise SystemExit(err)
|
||||
|
||||
#
|
||||
# Check for Config files in two common incorrect places
|
||||
|
||||
@@ -18,6 +18,7 @@ opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_
|
||||
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE \
|
||||
FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME \
|
||||
LCD_BED_TRAMMING BED_TRAMMING_USE_PROBE
|
||||
opt_disable CONFIGURE_FILAMENT_CHANGE
|
||||
exec_test $1 $2 "BigTreeTech GTR | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors w/ distinct states" "$3"
|
||||
|
||||
restore_configs
|
||||
|
||||
@@ -16,6 +16,7 @@ exec_test $1 $2 "Archim 1 base configuration" "$3"
|
||||
# Test Archim 2
|
||||
#
|
||||
use_example_configs UltiMachine/Archim2
|
||||
opt_enable USB_FLASH_DRIVE_SUPPORT
|
||||
exec_test $1 $2 "Archim 2 base configuration" "$3"
|
||||
|
||||
restore_configs
|
||||
|
||||
@@ -87,7 +87,7 @@ opt_disable X_DRIVER_TYPE Y_DRIVER_TYPE Z_DRIVER_TYPE
|
||||
exec_test $1 $2 "E Axis Only | DOGM MarlinUI" "$3"
|
||||
|
||||
#
|
||||
# Mixing Extruder with 5 steppers, Greek
|
||||
# Mixing Extruder with 5 steppers, Russian
|
||||
#
|
||||
restore_configs
|
||||
opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \
|
||||
@@ -98,7 +98,7 @@ opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \
|
||||
XY_AFTER_HOMING EVENT_GCODE_AFTER_HOMING \
|
||||
FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE INPUT_SHAPING_X INPUT_SHAPING_Y
|
||||
opt_disable DISABLE_OTHER_EXTRUDERS
|
||||
exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Greek" "$3"
|
||||
exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Russian" "$3"
|
||||
|
||||
#
|
||||
# Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Marlin Binary File Transfer (BFT)
|
||||
Marlin is capable of transferring binary data to the internal storage (SD card) via serial when built with `BINARY_FILE_TRANSFER` enabled. The following is a description of the binary protocol that must be used to conduct transfers once the printer is in binary mode after running `M28 B1`.
|
||||
Marlin is capable of transferring binary data to the internal storage (SD card) via serial when built with `BINARY_FILE_TRANSFER` enabled. The following is a description of the binary protocol that must be used to conduct transfers once the printer is in binary mode after running `M28 B1`.
|
||||
|
||||
## Data Endianness
|
||||
All data structures are **little-endian**! This means that when constructing the packets with multi-byte values, the lower bits are packed first. For example, each packet should start with a 16-bit start token with the value of `0xB5AD`. The data itself should start with a value of `0xAD` followed by `0xB5` etc.
|
||||
|
||||
+11
-9
@@ -13,15 +13,17 @@
|
||||
# Espressif ESP32
|
||||
#
|
||||
[env:esp32]
|
||||
platform = espressif32@2.1.0
|
||||
board = esp32dev
|
||||
build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
|
||||
lib_ignore = NativeEthernet
|
||||
upload_speed = 500000
|
||||
monitor_speed = 250000
|
||||
monitor_filters = colorize, time, send_on_enter, log2file, esp32_exception_decoder
|
||||
#upload_port = marlinesp.local
|
||||
platform = espressif32@2.1.0
|
||||
platform_packages = espressif/toolchain-xtensa-esp32s3
|
||||
board = esp32dev
|
||||
build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0 -std=gnu++17
|
||||
build_unflags = -std=gnu11 -std=gnu++11
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
|
||||
lib_ignore = NativeEthernet
|
||||
upload_speed = 500000
|
||||
monitor_speed = 250000
|
||||
monitor_filters = colorize, time, send_on_enter, log2file, esp32_exception_decoder
|
||||
#upload_port = marlinesp.local
|
||||
#board_build.flash_mode = qio
|
||||
|
||||
[env:FYSETC_E4]
|
||||
|
||||
+4
-1
@@ -259,7 +259,8 @@ MIXING_EXTRUDER = build_src_filter=+<src/feature/mixing.c
|
||||
HAS_PRUSA_MMU1 = build_src_filter=+<src/feature/mmu/mmu.cpp>
|
||||
HAS_PRUSA_MMU2 = build_src_filter=+<src/feature/mmu/mmu2.cpp> +<src/gcode/feature/prusa_MMU2>
|
||||
PASSWORD_FEATURE = build_src_filter=+<src/feature/password> +<src/gcode/feature/password>
|
||||
ADVANCED_PAUSE_FEATURE = build_src_filter=+<src/feature/pause.cpp> +<src/gcode/feature/pause/M600.cpp> +<src/gcode/feature/pause/M603.cpp>
|
||||
ADVANCED_PAUSE_FEATURE = build_src_filter=+<src/feature/pause.cpp> +<src/gcode/feature/pause/M600.cpp>
|
||||
CONFIGURE_FILAMENT_CHANGE = build_src_filter=+<src/gcode/feature/pause/M603.cpp>
|
||||
PSU_CONTROL = build_src_filter=+<src/feature/power.cpp>
|
||||
HAS_POWER_MONITOR = build_src_filter=+<src/feature/power_monitor.cpp> +<src/gcode/feature/power_monitor>
|
||||
POWER_LOSS_RECOVERY = build_src_filter=+<src/feature/powerloss.cpp> +<src/gcode/feature/powerloss>
|
||||
@@ -305,6 +306,7 @@ SERVO_DETACH_GCODE = build_src_filter=+<src/gcode/control/M2
|
||||
HAS_DUPLICATION_MODE = build_src_filter=+<src/gcode/control/M605.cpp>
|
||||
SPI_FLASH_BACKUP = build_src_filter=+<src/gcode/control/M993_M994.cpp>
|
||||
PLATFORM_M997_SUPPORT = build_src_filter=+<src/gcode/control/M997.cpp>
|
||||
HAS_TOOLCHANGE = build_src_filter=+<src/gcode/control/T.cpp>
|
||||
FT_MOTION = build_src_filter=+<src/module/ft_motion.cpp> +<src/gcode/feature/ft_motion>
|
||||
LIN_ADVANCE = build_src_filter=+<src/gcode/feature/advance>
|
||||
PHOTO_GCODE = build_src_filter=+<src/gcode/feature/camera>
|
||||
@@ -322,6 +324,7 @@ CNC_COORDINATE_SYSTEMS = build_src_filter=+<src/gcode/geometry/G
|
||||
HAS_HOME_OFFSET = build_src_filter=+<src/gcode/geometry/M206_M428.cpp>
|
||||
EXPECTED_PRINTER_CHECK = build_src_filter=+<src/gcode/host/M16.cpp>
|
||||
HOST_KEEPALIVE_FEATURE = build_src_filter=+<src/gcode/host/M113.cpp>
|
||||
CAPABILITIES_REPORT = build_src_filter=+<src/gcode/host/M115.cpp>
|
||||
AUTO_REPORT_POSITION = build_src_filter=+<src/gcode/host/M154.cpp>
|
||||
REPETIER_GCODE_M360 = build_src_filter=+<src/gcode/host/M360.cpp>
|
||||
HAS_GCODE_M876 = build_src_filter=+<src/gcode/host/M876.cpp>
|
||||
|
||||
+7
-2
@@ -36,7 +36,8 @@ build_src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
|
||||
[simulator_common]
|
||||
platform = native
|
||||
framework =
|
||||
build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS -I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/u8g
|
||||
build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS
|
||||
-I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/u8g
|
||||
build_src_flags = -Wall -Wno-expansion-to-defined -Wno-deprecated-declarations -Wcast-align
|
||||
release_flags = -g0 -O3 -flto
|
||||
debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
|
||||
@@ -99,6 +100,7 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
|
||||
[simulator_macos]
|
||||
build_unflags = -lGL -fstack-protector-strong
|
||||
build_flags =
|
||||
-DHAS_LIBBSD
|
||||
-I/opt/local/include
|
||||
-I/opt/local/include/freetype2
|
||||
-I/opt/local/include/SDL2/
|
||||
@@ -135,5 +137,8 @@ custom_gcc = g++
|
||||
[env:simulator_windows]
|
||||
extends = simulator_common
|
||||
build_src_flags = ${simulator_common.build_src_flags} -fpermissive
|
||||
build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
|
||||
build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags}
|
||||
-IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows
|
||||
-ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
|
||||
-DHAS_LIBBSD
|
||||
build_type = debug
|
||||
|
||||
+93
-3
@@ -13,7 +13,13 @@
|
||||
[platformio]
|
||||
src_dir = Marlin
|
||||
boards_dir = buildroot/share/PlatformIO/boards
|
||||
default_envs = mega2560
|
||||
default_envs = Mini
|
||||
MiniV2
|
||||
Taz6
|
||||
Taz6DualZ
|
||||
Workhorse
|
||||
WorkhorseDualZ
|
||||
TazPro
|
||||
include_dir = Marlin
|
||||
extra_configs =
|
||||
Marlin/config.ini
|
||||
@@ -107,11 +113,9 @@ default_src_filter = +<src/*> -<src/config> -<src/tests>
|
||||
+<src/gcode/control/M111.cpp>
|
||||
+<src/gcode/control/M120_M121.cpp>
|
||||
+<src/gcode/control/M999.cpp>
|
||||
+<src/gcode/control/T.cpp>
|
||||
+<src/gcode/geometry/G92.cpp>
|
||||
+<src/gcode/host/M110.cpp>
|
||||
+<src/gcode/host/M114.cpp>
|
||||
+<src/gcode/host/M115.cpp>
|
||||
+<src/gcode/host/M118.cpp>
|
||||
+<src/gcode/host/M119.cpp>
|
||||
+<src/gcode/motion/G0_G1.cpp>
|
||||
@@ -140,6 +144,92 @@ monitor_eol = LF
|
||||
monitor_echo = yes
|
||||
monitor_filters = colorize, time, send_on_enter
|
||||
|
||||
#################################
|
||||
# #
|
||||
# Unique Core Architectures #
|
||||
# #
|
||||
# Add a new "env" below if no #
|
||||
# entry has values suitable to #
|
||||
# build for a given board. #
|
||||
# #
|
||||
#################################
|
||||
|
||||
#################################
|
||||
# #
|
||||
# AVR Architecture #
|
||||
# #
|
||||
#################################
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Lulzbot Mini
|
||||
#
|
||||
[env:Mini]
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
build_flags = ${common.build_flags} -DMini
|
||||
board = megaatmega2560
|
||||
|
||||
#
|
||||
# Lulzbot Mini V2
|
||||
#
|
||||
[env:MiniV2]
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
build_flags = ${common.build_flags} -DMiniV2
|
||||
board = megaatmega2560
|
||||
|
||||
#
|
||||
# Taz 6
|
||||
#
|
||||
[env:Taz6]
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
build_flags = ${common.build_flags} -DTaz6
|
||||
board = megaatmega2560
|
||||
|
||||
[env:Taz6DualZ]
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
build_flags = ${common.build_flags} -DTaz6 -DTazDualZ
|
||||
board = megaatmega2560
|
||||
|
||||
#
|
||||
# Taz Workhorse
|
||||
#
|
||||
[env:Workhorse]
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
build_flags = ${common.build_flags} -DWorkhorse
|
||||
board = megaatmega2560
|
||||
|
||||
[env:WorkhorseDualZ]
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
build_flags = ${common.build_flags} -DWorkhorse -DTazDualZ
|
||||
board = megaatmega2560
|
||||
|
||||
[env:TazPro]
|
||||
platform = atmelsam
|
||||
extends = env:DUE
|
||||
board = marlin_archim
|
||||
build_flags = ${common.build_flags}
|
||||
-DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON -DTazPro
|
||||
board_build.variants_dir = buildroot/share/PlatformIO/variants/
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
Marlin/src/HAL/DUE/upload_extra_script.py
|
||||
|
||||
[env:TazProNebula]
|
||||
platform = atmelsam
|
||||
extends = env:DUE
|
||||
board = marlin_archim
|
||||
build_flags = ${common.build_flags}
|
||||
-DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON -DTazPro -DTOOLHEAD_Twin_Nebula_175
|
||||
board_build.variants_dir = buildroot/share/PlatformIO/variants/
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
Marlin/src/HAL/DUE/upload_extra_script.py
|
||||
|
||||
#
|
||||
# Just print the dependency tree
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user