Procházet zdrojové kódy

Merge pull request #4326 from thinkyhead/rc_no_static_items_fix

Suppress compiler warnings in ultralcd.cpp
Scott Lahteine před 8 roky
rodič
revize
aaa0d298b9
2 změnil soubory, kde provedl 17 přidání a 16 odebrání
  1. 12
    12
      Marlin/dac_mcp4728.h
  2. 5
    4
      Marlin/ultralcd.cpp

+ 12
- 12
Marlin/dac_mcp4728.h Zobrazit soubor

@@ -33,19 +33,19 @@
33 33
 #if ENABLED(DAC_STEPPER_CURRENT)
34 34
 #include "Wire.h"
35 35
 
36
-#define defaultVDD 5000
37
-#define BASE_ADDR 0x60
38
-#define RESET 0B00000110
39
-#define WAKE 0B00001001
40
-#define UPDATE 0B00001000
41
-#define MULTIWRITE 0B01000000
42
-#define SINGLEWRITE 0B01011000
43
-#define SEQWRITE 0B01010000
44
-#define VREFWRITE 0B10000000
45
-#define GAINWRITE 0B11000000
36
+#define defaultVDD     5000
37
+#define BASE_ADDR      0x60
38
+#define RESET          0B00000110
39
+#define WAKE           0B00001001
40
+#define UPDATE         0B00001000
41
+#define MULTIWRITE     0B01000000
42
+#define SINGLEWRITE    0B01011000
43
+#define SEQWRITE       0B01010000
44
+#define VREFWRITE      0B10000000
45
+#define GAINWRITE      0B11000000
46 46
 #define POWERDOWNWRITE 0B10100000
47
-#define GENERALCALL 0B0000000
48
-#define GAINWRITE 0B11000000
47
+#define GENERALCALL    0B00000000
48
+#define GAINWRITE      0B11000000
49 49
 
50 50
 // This is taken from the original lib, makes it easy to edit if needed
51 51
 // DAC_OR_ADDRESS defined in pins_BOARD.h  file

+ 5
- 4
Marlin/ultralcd.cpp Zobrazit soubor

@@ -321,7 +321,8 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
321 321
     if (encoderLine >= encoderTopLine + LCD_HEIGHT) { \
322 322
       encoderTopLine = encoderLine - (LCD_HEIGHT - 1); \
323 323
       lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
324
-    }
324
+    } \
325
+    UNUSED(_skipStatic)
325 326
 
326 327
   #if ENABLED(ENCODER_RATE_MULTIPLIER)
327 328
 
@@ -1382,7 +1383,7 @@ void kill_screen(const char* lcd_msg) {
1382 1383
         pos_label = PSTR(MSG_MOVE_E);
1383 1384
       #else
1384 1385
         switch (eindex) {
1385
-          case 0: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E1); break;
1386
+          default: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E1); break;
1386 1387
           case 1: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E2); break;
1387 1388
           #if EXTRUDERS > 2
1388 1389
             case 2: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E3); break;
@@ -1543,14 +1544,14 @@ void kill_screen(const char* lcd_msg) {
1543 1544
     // Helpers for editing PID Ki & Kd values
1544 1545
     // grab the PID value out of the temp variable; scale it; then update the PID driver
1545 1546
     void copy_and_scalePID_i(int e) {
1546
-      #if DISABLED(PID_PARAMS_PER_HOTEND)
1547
+      #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1
1547 1548
         UNUSED(e);
1548 1549
       #endif
1549 1550
       PID_PARAM(Ki, e) = scalePID_i(raw_Ki);
1550 1551
       thermalManager.updatePID();
1551 1552
     }
1552 1553
     void copy_and_scalePID_d(int e) {
1553
-      #if DISABLED(PID_PARAMS_PER_HOTEND)
1554
+      #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1
1554 1555
         UNUSED(e);
1555 1556
       #endif
1556 1557
       PID_PARAM(Kd, e) = scalePID_d(raw_Kd);

Loading…
Zrušit
Uložit