Browse Source

Merge pull request #4326 from thinkyhead/rc_no_static_items_fix

Suppress compiler warnings in ultralcd.cpp
Scott Lahteine 9 years ago
parent
commit
aaa0d298b9
2 changed files with 17 additions and 16 deletions
  1. 12
    12
      Marlin/dac_mcp4728.h
  2. 5
    4
      Marlin/ultralcd.cpp

+ 12
- 12
Marlin/dac_mcp4728.h View File

33
 #if ENABLED(DAC_STEPPER_CURRENT)
33
 #if ENABLED(DAC_STEPPER_CURRENT)
34
 #include "Wire.h"
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
 #define POWERDOWNWRITE 0B10100000
46
 #define POWERDOWNWRITE 0B10100000
47
-#define GENERALCALL 0B0000000
48
-#define GAINWRITE 0B11000000
47
+#define GENERALCALL    0B00000000
48
+#define GAINWRITE      0B11000000
49
 
49
 
50
 // This is taken from the original lib, makes it easy to edit if needed
50
 // This is taken from the original lib, makes it easy to edit if needed
51
 // DAC_OR_ADDRESS defined in pins_BOARD.h  file
51
 // DAC_OR_ADDRESS defined in pins_BOARD.h  file

+ 5
- 4
Marlin/ultralcd.cpp View File

321
     if (encoderLine >= encoderTopLine + LCD_HEIGHT) { \
321
     if (encoderLine >= encoderTopLine + LCD_HEIGHT) { \
322
       encoderTopLine = encoderLine - (LCD_HEIGHT - 1); \
322
       encoderTopLine = encoderLine - (LCD_HEIGHT - 1); \
323
       lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
323
       lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
324
-    }
324
+    } \
325
+    UNUSED(_skipStatic)
325
 
326
 
326
   #if ENABLED(ENCODER_RATE_MULTIPLIER)
327
   #if ENABLED(ENCODER_RATE_MULTIPLIER)
327
 
328
 
1382
         pos_label = PSTR(MSG_MOVE_E);
1383
         pos_label = PSTR(MSG_MOVE_E);
1383
       #else
1384
       #else
1384
         switch (eindex) {
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
           case 1: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E2); break;
1387
           case 1: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E2); break;
1387
           #if EXTRUDERS > 2
1388
           #if EXTRUDERS > 2
1388
             case 2: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E3); break;
1389
             case 2: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E3); break;
1543
     // Helpers for editing PID Ki & Kd values
1544
     // Helpers for editing PID Ki & Kd values
1544
     // grab the PID value out of the temp variable; scale it; then update the PID driver
1545
     // grab the PID value out of the temp variable; scale it; then update the PID driver
1545
     void copy_and_scalePID_i(int e) {
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
         UNUSED(e);
1548
         UNUSED(e);
1548
       #endif
1549
       #endif
1549
       PID_PARAM(Ki, e) = scalePID_i(raw_Ki);
1550
       PID_PARAM(Ki, e) = scalePID_i(raw_Ki);
1550
       thermalManager.updatePID();
1551
       thermalManager.updatePID();
1551
     }
1552
     }
1552
     void copy_and_scalePID_d(int e) {
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
         UNUSED(e);
1555
         UNUSED(e);
1555
       #endif
1556
       #endif
1556
       PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
1557
       PID_PARAM(Kd, e) = scalePID_d(raw_Kd);

Loading…
Cancel
Save