Browse Source

Merge pull request #6210 from thinkyhead/rc_gitattributes

Add .gitattributes to normalize line endings
Scott Lahteine 8 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

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
   extern void digipot_i2c_init();
778
   extern void digipot_i2c_init();
779
 #endif
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
  * Inject the next "immediate" command, when possible, onto the front of the queue.
782
  * Inject the next "immediate" command, when possible, onto the front of the queue.
790
  * Return true if any immediate commands remain to inject.
783
  * Return true if any immediate commands remain to inject.
847
  */
840
  */
848
 bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) {
841
 bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) {
849
   if (_enqueuecommand(cmd, say_ok)) {
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
     return true;
847
     return true;
852
   }
848
   }
853
   return false;
849
   return false;
3639
     do_blocking_move_to_z(delta_clip_start_height);
3635
     do_blocking_move_to_z(delta_clip_start_height);
3640
   #endif
3636
   #endif
3641
 
3637
 
3642
-  // Enable mesh leveling again
3643
   #if ENABLED(AUTO_BED_LEVELING_UBL)
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
   #endif
3640
   #endif
3646
 
3641
 
3642
+  // Enable mesh leveling again
3647
   #if ENABLED(MESH_BED_LEVELING)
3643
   #if ENABLED(MESH_BED_LEVELING)
3648
     if (mbl.reactivate()) {
3644
     if (mbl.reactivate()) {
3649
       set_bed_leveling_enabled(true);
3645
       set_bed_leveling_enabled(true);

Loading…
Cancel
Save