Sfoglia il codice sorgente

Patch to fix some compiler warnings

Scott Lahteine 8 anni fa
parent
commit
bfd396c13a
3 ha cambiato i file con 23 aggiunte e 16 eliminazioni
  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 Vedi File

1014
     #if ENABLED(NEOPIXEL_RGBW_LED)
1014
     #if ENABLED(NEOPIXEL_RGBW_LED)
1015
 
1015
 
1016
       const uint32_t color = pixels.Color(r, g, b, w);
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
       if (!isSequence)
1019
       if (!isSequence)
1020
         set_neopixel_color(color);
1020
         set_neopixel_color(color);
5602
 
5602
 
5603
     bool G38_pass_fail = false;
5603
     bool G38_pass_fail = false;
5604
 
5604
 
5605
-    // Get direction of move and retract
5605
+    #if ENABLED(PROBE_DOUBLE_TOUCH)
5606
-    float retract_mm[XYZ];
5606
+      // Get direction of move and retract
5607
-    LOOP_XYZ(i) {
5607
+      float retract_mm[XYZ];
5608
-      float dist = destination[i] - current_position[i];
5608
+      LOOP_XYZ(i) {
5609
-      retract_mm[i] = FABS(dist) < G38_MINIMUM_MOVE ? 0 : home_bump_mm((AxisEnum)i) * (dist > 0 ? -1 : 1);
5609
+        float dist = destination[i] - current_position[i];
5610
-    }
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
     stepper.synchronize();  // wait until the machine is idle
5614
     stepper.synchronize();  // wait until the machine is idle
5613
 
5615
 
5671
     // If any axis has enough movement, do the move
5673
     // If any axis has enough movement, do the move
5672
     LOOP_XYZ(i)
5674
     LOOP_XYZ(i)
5673
       if (FABS(destination[i] - current_position[i]) >= G38_MINIMUM_MOVE) {
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
         // If G38.2 fails throw an error
5677
         // If G38.2 fails throw an error
5676
         if (!G38_run_probe() && is_38_2) {
5678
         if (!G38_run_probe() && is_38_2) {
5677
           SERIAL_ERROR_START();
5679
           SERIAL_ERROR_START();

+ 9
- 7
Marlin/pca9632.cpp Vedi File

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

+ 4
- 1
Marlin/ultralcd.cpp Vedi File

1838
     void _lcd_ubl_level_bed();
1838
     void _lcd_ubl_level_bed();
1839
 
1839
 
1840
     static int16_t ubl_storage_slot = 0,
1840
     static int16_t ubl_storage_slot = 0,
1841
-               custom_bed_temp = 50,
1842
                custom_hotend_temp = 190,
1841
                custom_hotend_temp = 190,
1843
                side_points = 3,
1842
                side_points = 3,
1844
                ubl_fillin_amount = 5,
1843
                ubl_fillin_amount = 5,
1847
                x_plot = 0,
1846
                x_plot = 0,
1848
                y_plot = 0;
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
      * UBL Build Custom Mesh Command
1854
      * UBL Build Custom Mesh Command
1852
      */
1855
      */

Loading…
Annulla
Salva