Skip to content

Commit 66bedc1

Browse files
authored
Merge pull request #6600 from thinkyhead/bugfix_first_fixes
Update git helper scripts, config comments
2 parents 0cc4b08 + 77769e2 commit 66bedc1

File tree

34 files changed

+3806
-3804
lines changed

34 files changed

+3806
-3804
lines changed

Marlin/Configuration.h

+137-140
Original file line numberDiff line numberDiff line change
@@ -987,68 +987,62 @@
987987
#define PREHEAT_2_TEMP_BED 110
988988
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
989989

990-
//
991-
// Nozzle Park -- EXPERIMENTAL
992-
//
993-
// When enabled allows the user to define a special XYZ position, inside the
994-
// machine's topology, to park the nozzle when idle or when receiving the G27
995-
// command.
996-
//
997-
// The "P" paramenter controls what is the action applied to the Z axis:
998-
// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will
999-
// be raised to reach Z-park height.
1000-
//
1001-
// P1: No matter the current Z-pos, the nozzle will be raised/lowered to
1002-
// reach Z-park height.
1003-
//
1004-
// P2: The nozzle height will be raised by Z-park amount but never going over
1005-
// the machine's limit of Z_MAX_POS.
1006-
//
990+
/**
991+
* Nozzle Park -- EXPERIMENTAL
992+
*
993+
* Park the nozzle at the given XYZ position on idle or G27.
994+
*
995+
* The "P" parameter controls the action applied to the Z axis:
996+
*
997+
* P0 (Default) If Z is below park Z raise the nozzle.
998+
* P1 Raise the nozzle always to Z-park height.
999+
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
1000+
*/
10071001
//#define NOZZLE_PARK_FEATURE
10081002

10091003
#if ENABLED(NOZZLE_PARK_FEATURE)
10101004
// Specify a park position as { X, Y, Z }
10111005
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
10121006
#endif
10131007

1014-
//
1015-
// Clean Nozzle Feature -- EXPERIMENTAL
1016-
//
1017-
// When enabled allows the user to send G12 to start the nozzle cleaning
1018-
// process, the G-Code accepts two parameters:
1019-
// "P" for pattern selection
1020-
// "S" for defining the number of strokes/repetitions
1021-
//
1022-
// Available list of patterns:
1023-
// P0: This is the default pattern, this process requires a sponge type
1024-
// material at a fixed bed location. S defines "strokes" i.e.
1025-
// back-and-forth movements between the starting and end points.
1026-
//
1027-
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
1028-
// defines the number of zig-zag triangles to be done. "S" defines the
1029-
// number of strokes aka one back-and-forth movement. Zig-zags will
1030-
// be performed in whichever dimension is smallest. As an example,
1031-
// sending "G12 P1 S1 T3" will execute:
1032-
//
1033-
// --
1034-
// | (X0, Y1) | /\ /\ /\ | (X1, Y1)
1035-
// | | / \ / \ / \ |
1036-
// A | | / \ / \ / \ |
1037-
// | | / \ / \ / \ |
1038-
// | (X0, Y0) | / \/ \/ \ | (X1, Y0)
1039-
// -- +--------------------------------+
1040-
// |________|_________|_________|
1041-
// T1 T2 T3
1042-
//
1043-
// P2: This starts a circular pattern with circle with middle in
1044-
// NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1045-
// Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1046-
//
1047-
// Caveats: End point Z should use the same value as Start point Z.
1048-
//
1049-
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
1050-
// may change to add new functionality like different wipe patterns.
1051-
//
1008+
/**
1009+
* Clean Nozzle Feature -- EXPERIMENTAL
1010+
*
1011+
* Adds the G12 command to perform a nozzle cleaning process.
1012+
*
1013+
* Parameters:
1014+
* P Pattern
1015+
* S Strokes / Repetitions
1016+
* T Triangles (P1 only)
1017+
*
1018+
* Patterns:
1019+
* P0 Straight line (default). This process requires a sponge type material
1020+
* at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
1021+
* between the start / end points.
1022+
*
1023+
* P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
1024+
* number of zig-zag triangles to do. "S" defines the number of strokes.
1025+
* Zig-zags are done in whichever is the narrower dimension.
1026+
* For example, "G12 P1 S1 T3" will execute:
1027+
*
1028+
* --
1029+
* | (X0, Y1) | /\ /\ /\ | (X1, Y1)
1030+
* | | / \ / \ / \ |
1031+
* A | | / \ / \ / \ |
1032+
* | | / \ / \ / \ |
1033+
* | (X0, Y0) | / \/ \/ \ | (X1, Y0)
1034+
* -- +--------------------------------+
1035+
* |________|_________|_________|
1036+
* T1 T2 T3
1037+
*
1038+
* P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
1039+
* "R" specifies the radius. "S" specifies the stroke count.
1040+
* Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
1041+
*
1042+
* Caveats: The ending Z should be the same as starting Z.
1043+
* Attention: EXPERIMENTAL. G-code arguments may change.
1044+
*
1045+
*/
10521046
//#define NOZZLE_CLEAN_FEATURE
10531047

10541048
#if ENABLED(NOZZLE_CLEAN_FEATURE)
@@ -1073,33 +1067,35 @@
10731067
#define NOZZLE_CLEAN_GOBACK
10741068
#endif
10751069

1076-
//
1077-
// Print job timer
1078-
//
1079-
// Enable this option to automatically start and stop the
1080-
// print job timer when M104/M109/M190 commands are received.
1081-
// M104 (extruder without wait) - high temp = none, low temp = stop timer
1082-
// M109 (extruder with wait) - high temp = start timer, low temp = stop timer
1083-
// M190 (bed with wait) - high temp = start timer, low temp = none
1084-
//
1085-
// In all cases the timer can be started and stopped using
1086-
// the following commands:
1087-
//
1088-
// - M75 - Start the print job timer
1089-
// - M76 - Pause the print job timer
1090-
// - M77 - Stop the print job timer
1070+
/**
1071+
* Print Job Timer
1072+
*
1073+
* Automatically start and stop the print job timer on M104/M109/M190.
1074+
*
1075+
* M104 (hotend, no wait) - high temp = none, low temp = stop timer
1076+
* M109 (hotend, wait) - high temp = start timer, low temp = stop timer
1077+
* M190 (bed, wait) - high temp = start timer, low temp = none
1078+
*
1079+
* The timer can also be controlled with the following commands:
1080+
*
1081+
* M75 - Start the print job timer
1082+
* M76 - Pause the print job timer
1083+
* M77 - Stop the print job timer
1084+
*/
10911085
#define PRINTJOB_TIMER_AUTOSTART
10921086

1093-
//
1094-
// Print Counter
1095-
//
1096-
// When enabled Marlin will keep track of some print statistical data such as:
1097-
// - Total print jobs
1098-
// - Total successful print jobs
1099-
// - Total failed print jobs
1100-
// - Total time printing
1101-
//
1102-
// This information can be viewed by the M78 command.
1087+
/**
1088+
* Print Counter
1089+
*
1090+
* Track statistical data such as:
1091+
*
1092+
* - Total print jobs
1093+
* - Total successful print jobs
1094+
* - Total failed print jobs
1095+
* - Total time printing
1096+
*
1097+
* View the current statistics with M78.
1098+
*/
11031099
//#define PRINTCOUNTER
11041100

11051101
//=============================================================================
@@ -1108,78 +1104,79 @@
11081104

11091105
// @section lcd
11101106

1111-
//
1112-
// LCD LANGUAGE
1113-
//
1114-
// Here you may choose the language used by Marlin on the LCD menus, the following
1115-
// list of languages are available:
1116-
// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
1117-
// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
1118-
//
1119-
// :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
1120-
//
1107+
/**
1108+
* LCD LANGUAGE
1109+
*
1110+
* Select the language to display on the LCD. These languages are available:
1111+
*
1112+
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
1113+
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
1114+
*
1115+
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
1116+
*/
11211117
#define LCD_LANGUAGE en
11221118

1123-
//
1124-
// LCD Character Set
1125-
//
1126-
// Note: This option is NOT applicable to Graphical Displays.
1127-
//
1128-
// All character-based LCD's provide ASCII plus one of these
1129-
// language extensions:
1130-
//
1131-
// - JAPANESE ... the most common
1132-
// - WESTERN ... with more accented characters
1133-
// - CYRILLIC ... for the Russian language
1134-
//
1135-
// To determine the language extension installed on your controller:
1136-
//
1137-
// - Compile and upload with LCD_LANGUAGE set to 'test'
1138-
// - Click the controller to view the LCD menu
1139-
// - The LCD will display Japanese, Western, or Cyrillic text
1140-
//
1141-
// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
1142-
//
1143-
// :['JAPANESE', 'WESTERN', 'CYRILLIC']
1144-
//
1119+
/**
1120+
* LCD Character Set
1121+
*
1122+
* Note: This option is NOT applicable to Graphical Displays.
1123+
*
1124+
* All character-based LCDs provide ASCII plus one of these
1125+
* language extensions:
1126+
*
1127+
* - JAPANESE ... the most common
1128+
* - WESTERN ... with more accented characters
1129+
* - CYRILLIC ... for the Russian language
1130+
*
1131+
* To determine the language extension installed on your controller:
1132+
*
1133+
* - Compile and upload with LCD_LANGUAGE set to 'test'
1134+
* - Click the controller to view the LCD menu
1135+
* - The LCD will display Japanese, Western, or Cyrillic text
1136+
*
1137+
* See https: *github.com/MarlinFirmware/Marlin/wiki/LCD-Language
1138+
*
1139+
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
1140+
*/
11451141
#define DISPLAY_CHARSET_HD44780 JAPANESE
11461142

1147-
//
1148-
// LCD TYPE
1149-
//
1150-
// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2,
1151-
// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels
1152-
// (ST7565R family). (This option will be set automatically for certain displays.)
1153-
//
1154-
// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display!
1155-
// https://github.com/olikraus/U8glib_Arduino
1156-
//
1143+
/**
1144+
* LCD TYPE
1145+
*
1146+
* Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
1147+
* Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
1148+
* (These options will be enabled automatically for most displays.)
1149+
*
1150+
* IMPORTANT: The U8glib library is required for Full Graphic Display!
1151+
* https://github.com/olikraus/U8glib_Arduino
1152+
*/
11571153
//#define ULTRA_LCD // Character based
11581154
//#define DOGLCD // Full graphics display
11591155

1160-
//
1161-
// SD CARD
1162-
//
1163-
// SD Card support is disabled by default. If your controller has an SD slot,
1164-
// you must uncomment the following option or it won't work.
1165-
//
1156+
/**
1157+
* SD CARD
1158+
*
1159+
* SD Card support is disabled by default. If your controller has an SD slot,
1160+
* you must uncomment the following option or it won't work.
1161+
*
1162+
*/
11661163
//#define SDSUPPORT
11671164

1168-
//
1169-
// SD CARD: SPI SPEED
1170-
//
1171-
// Uncomment ONE of the following items to use a slower SPI transfer
1172-
// speed. This is usually required if you're getting volume init errors.
1173-
//
1165+
/**
1166+
* SD CARD: SPI SPEED
1167+
*
1168+
* Enable one of the following items for a slower SPI transfer speed.
1169+
* This may be required to resolve "volume init" errors.
1170+
*/
11741171
//#define SPI_SPEED SPI_HALF_SPEED
11751172
//#define SPI_SPEED SPI_QUARTER_SPEED
11761173
//#define SPI_SPEED SPI_EIGHTH_SPEED
11771174

1178-
//
1179-
// SD CARD: ENABLE CRC
1180-
//
1181-
// Use CRC checks and retries on the SD communication.
1182-
//
1175+
/**
1176+
* SD CARD: ENABLE CRC
1177+
*
1178+
* Use CRC checks and retries on the SD communication.
1179+
*/
11831180
//#define SD_CHECK_AND_RETRY
11841181

11851182
//
@@ -1207,7 +1204,7 @@
12071204
*/
12081205

12091206
//
1210-
// This option reverses the encoder direction everywhere
1207+
// This option reverses the encoder direction everywhere.
12111208
//
12121209
// Set this option if CLOCKWISE causes values to DECREASE
12131210
//

Marlin/Marlin_main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ void clear_command_queue() {
832832
*/
833833
inline void _commit_command(bool say_ok) {
834834
send_ok[cmd_queue_index_w] = say_ok;
835-
cmd_queue_index_w = (cmd_queue_index_w + 1) % BUFSIZE;
835+
if (++cmd_queue_index_w >= BUFSIZE) cmd_queue_index_w = 0;
836836
commands_in_queue++;
837837
}
838838

@@ -12330,7 +12330,7 @@ void loop() {
1233012330
// The queue may be reset by a command handler or by code invoked by idle() within a handler
1233112331
if (commands_in_queue) {
1233212332
--commands_in_queue;
12333-
cmd_queue_index_r = (cmd_queue_index_r + 1) % BUFSIZE;
12333+
if (++cmd_queue_index_r >= BUFSIZE) cmd_queue_index_r = 0;
1233412334
}
1233512335
}
1233612336
endstops.report_state();

0 commit comments

Comments
 (0)