瀏覽代碼

Patch to fix some compiler warnings

Scott Lahteine 6 年之前
父節點
當前提交
bfd396c13a
共有 3 個文件被更改,包括 23 次插入16 次删除
  1. 10
    8
      Marlin/Marlin_main.cpp
  2. 9
    7
      Marlin/pca9632.cpp
  3. 4
    1
      Marlin/ultralcd.cpp

+ 10
- 8
Marlin/Marlin_main.cpp 查看文件

@@ -1014,7 +1014,7 @@ void servo_init() {
1014 1014
     #if ENABLED(NEOPIXEL_RGBW_LED)
1015 1015
 
1016 1016
       const uint32_t color = pixels.Color(r, g, b, w);
1017
-      static int nextLed = 0;
1017
+      static uint16_t nextLed = 0;
1018 1018
 
1019 1019
       if (!isSequence)
1020 1020
         set_neopixel_color(color);
@@ -5602,12 +5602,14 @@ void home_all_axes() { gcode_G28(true); }
5602 5602
 
5603 5603
     bool G38_pass_fail = false;
5604 5604
 
5605
-    // Get direction of move and retract
5606
-    float retract_mm[XYZ];
5607
-    LOOP_XYZ(i) {
5608
-      float dist = destination[i] - current_position[i];
5609
-      retract_mm[i] = FABS(dist) < G38_MINIMUM_MOVE ? 0 : home_bump_mm((AxisEnum)i) * (dist > 0 ? -1 : 1);
5610
-    }
5605
+    #if ENABLED(PROBE_DOUBLE_TOUCH)
5606
+      // Get direction of move and retract
5607
+      float retract_mm[XYZ];
5608
+      LOOP_XYZ(i) {
5609
+        float dist = destination[i] - current_position[i];
5610
+        retract_mm[i] = FABS(dist) < G38_MINIMUM_MOVE ? 0 : home_bump_mm((AxisEnum)i) * (dist > 0 ? -1 : 1);
5611
+      }
5612
+    #endif
5611 5613
 
5612 5614
     stepper.synchronize();  // wait until the machine is idle
5613 5615
 
@@ -5671,7 +5673,7 @@ void home_all_axes() { gcode_G28(true); }
5671 5673
     // If any axis has enough movement, do the move
5672 5674
     LOOP_XYZ(i)
5673 5675
       if (FABS(destination[i] - current_position[i]) >= G38_MINIMUM_MOVE) {
5674
-        if (!parser.seenval('F')) feedrate_mm_s = homing_feedrate(i);
5676
+        if (!parser.seenval('F')) feedrate_mm_s = homing_feedrate((AxisEnum)i);
5675 5677
         // If G38.2 fails throw an error
5676 5678
         if (!G38_run_probe() && is_38_2) {
5677 5679
           SERIAL_ERROR_START();

+ 9
- 7
Marlin/pca9632.cpp 查看文件

@@ -88,13 +88,15 @@ static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const
88 88
   Wire.endTransmission();
89 89
 }
90 90
 
91
-static byte PCA9632_ReadRegister(const byte addr, const byte regadd) {
92
-  Wire.beginTransmission(addr);
93
-  Wire.write(regadd);
94
-  const byte value = Wire.read();
95
-  Wire.endTransmission();
96
-  return value;
97
-}
91
+#if 0
92
+  static byte PCA9632_ReadRegister(const byte addr, const byte regadd) {
93
+    Wire.beginTransmission(addr);
94
+    Wire.write(regadd);
95
+    const byte value = Wire.read();
96
+    Wire.endTransmission();
97
+    return value;
98
+  }
99
+#endif
98 100
 
99 101
 void PCA9632_SetColor(const byte r, const byte g, const byte b) {
100 102
   if (!PCA_init) {

+ 4
- 1
Marlin/ultralcd.cpp 查看文件

@@ -1838,7 +1838,6 @@ void kill_screen(const char* lcd_msg) {
1838 1838
     void _lcd_ubl_level_bed();
1839 1839
 
1840 1840
     static int16_t ubl_storage_slot = 0,
1841
-               custom_bed_temp = 50,
1842 1841
                custom_hotend_temp = 190,
1843 1842
                side_points = 3,
1844 1843
                ubl_fillin_amount = 5,
@@ -1847,6 +1846,10 @@ void kill_screen(const char* lcd_msg) {
1847 1846
                x_plot = 0,
1848 1847
                y_plot = 0;
1849 1848
 
1849
+    #if HAS_TEMP_BED
1850
+      static int16_t custom_bed_temp = 50;
1851
+    #endif
1852
+
1850 1853
     /**
1851 1854
      * UBL Build Custom Mesh Command
1852 1855
      */

Loading…
取消
儲存