Browse Source

Merge pull request #6210 from thinkyhead/rc_gitattributes

Add .gitattributes to normalize line endings
Scott Lahteine 7 years ago
parent
commit
9faa8c4704
2 changed files with 25 additions and 10 deletions
  1. 19
    0
      .gitattributes
  2. 6
    10
      Marlin/Marlin_main.cpp

+ 19
- 0
.gitattributes View File

@@ -0,0 +1,19 @@
1
+# Set the default behavior, in case people don't have core.autocrlf set.
2
+* text=auto
3
+
4
+# Files with Unix line endings
5
+*.c   text eol=lf
6
+*.cpp text eol=lf
7
+*.h   text eol=lf
8
+*.ino text eol=lf
9
+*.py  text eol=lf
10
+*.sh  text eol=lf
11
+
12
+# Files with native line endings
13
+# *.sln text
14
+
15
+# Binary files
16
+*.png binary
17
+*.jpg binary
18
+*.fon binary
19
+

+ 6
- 10
Marlin/Marlin_main.cpp View File

@@ -778,13 +778,6 @@ extern "C" {
778 778
   extern void digipot_i2c_init();
779 779
 #endif
780 780
 
781
-inline void echo_command(const char* cmd) {
782
-  SERIAL_ECHO_START;
783
-  SERIAL_ECHOPAIR(MSG_ENQUEUEING, cmd);
784
-  SERIAL_CHAR('"');
785
-  SERIAL_EOL;
786
-}
787
-
788 781
 /**
789 782
  * Inject the next "immediate" command, when possible, onto the front of the queue.
790 783
  * Return true if any immediate commands remain to inject.
@@ -847,7 +840,10 @@ inline bool _enqueuecommand(const char* cmd, bool say_ok=false) {
847 840
  */
848 841
 bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) {
849 842
   if (_enqueuecommand(cmd, say_ok)) {
850
-    echo_command(cmd);
843
+    SERIAL_ECHO_START;
844
+    SERIAL_ECHOPAIR(MSG_ENQUEUEING, cmd);
845
+    SERIAL_CHAR('"');
846
+    SERIAL_EOL;
851 847
     return true;
852 848
   }
853 849
   return false;
@@ -3639,11 +3635,11 @@ inline void gcode_G28() {
3639 3635
     do_blocking_move_to_z(delta_clip_start_height);
3640 3636
   #endif
3641 3637
 
3642
-  // Enable mesh leveling again
3643 3638
   #if ENABLED(AUTO_BED_LEVELING_UBL)
3644
-      set_bed_leveling_enabled(bed_leveling_state_at_entry);
3639
+    set_bed_leveling_enabled(bed_leveling_state_at_entry);
3645 3640
   #endif
3646 3641
 
3642
+  // Enable mesh leveling again
3647 3643
   #if ENABLED(MESH_BED_LEVELING)
3648 3644
     if (mbl.reactivate()) {
3649 3645
       set_bed_leveling_enabled(true);

Loading…
Cancel
Save