Browse Source

Merge pull request #1735 from AnHardt/compilerCandy

Remove some further warnings
Scott Lahteine 9 years ago
parent
commit
b47fa8c064

+ 1
- 4
Marlin/dogm_lcd_implementation.h View File

256
 }
256
 }
257
 
257
 
258
 static void lcd_implementation_status_screen() {
258
 static void lcd_implementation_status_screen() {
259
-
260
-  static unsigned char fan_rot = 0;
261
- 
262
   u8g.setColorIndex(1); // black on white
259
   u8g.setColorIndex(1); // black on white
263
 
260
 
264
   // Symbols menu graphics, animated fan
261
   // Symbols menu graphics, animated fan
485
   lcd_implementation_mark_as_selected(row, isSelected);
482
   lcd_implementation_mark_as_selected(row, isSelected);
486
 
483
 
487
   if (isDir) lcd_print(LCD_STR_FOLDER[0]);
484
   if (isDir) lcd_print(LCD_STR_FOLDER[0]);
488
-  while (c = *filename) {
485
+  while ((c = *filename)) {
489
     n -= lcd_print(c);
486
     n -= lcd_print(c);
490
     filename++;
487
     filename++;
491
   }
488
   }

+ 6
- 2
Marlin/stepper.cpp View File

459
       #ifdef COREXY
459
       #ifdef COREXY
460
         // Head direction in -X axis for CoreXY bots.
460
         // Head direction in -X axis for CoreXY bots.
461
         // If DeltaX == -DeltaY, the movement is only in Y axis
461
         // If DeltaX == -DeltaY, the movement is only in Y axis
462
-        if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS)))
462
+        if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
463
           if (TEST(out_bits, X_HEAD))
463
           if (TEST(out_bits, X_HEAD))
464
       #else
464
       #else
465
           if (TEST(out_bits, X_AXIS))   // stepping along -X axis (regular cartesians bot)
465
           if (TEST(out_bits, X_AXIS))   // stepping along -X axis (regular cartesians bot)
487
               }
487
               }
488
           }
488
           }
489
       #ifdef COREXY
489
       #ifdef COREXY
490
+        }
490
         // Head direction in -Y axis for CoreXY bots.
491
         // Head direction in -Y axis for CoreXY bots.
491
         // If DeltaX == DeltaY, the movement is only in X axis
492
         // If DeltaX == DeltaY, the movement is only in X axis
492
-        if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS)))
493
+        if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
493
           if (TEST(out_bits, Y_HEAD))
494
           if (TEST(out_bits, Y_HEAD))
494
       #else
495
       #else
495
           if (TEST(out_bits, Y_AXIS))   // -direction
496
           if (TEST(out_bits, Y_AXIS))   // -direction
504
               UPDATE_ENDSTOP(y, Y, max, MAX);
505
               UPDATE_ENDSTOP(y, Y, max, MAX);
505
             #endif
506
             #endif
506
           }
507
           }
508
+      #ifdef COREXY
509
+        }
510
+      #endif
507
     }
511
     }
508
 
512
 
509
     if (TEST(out_bits, Z_AXIS)) {   // -direction
513
     if (TEST(out_bits, Z_AXIS)) {   // -direction

+ 13
- 2
Marlin/temperature.cpp View File

83
 #ifdef FILAMENT_SENSOR
83
 #ifdef FILAMENT_SENSOR
84
   int current_raw_filwidth = 0;  //Holds measured filament diameter - one extruder only
84
   int current_raw_filwidth = 0;  //Holds measured filament diameter - one extruder only
85
 #endif  
85
 #endif  
86
+#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
87
+void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
88
+static int thermal_runaway_state_machine[4]; // = {0,0,0,0};
89
+static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0};
90
+static bool thermal_runaway = false;
91
+#if TEMP_SENSOR_BED != 0
92
+  static int thermal_runaway_bed_state_machine;
93
+  static unsigned long thermal_runaway_bed_timer;
94
+#endif
95
+#endif
96
+
86
 //===========================================================================
97
 //===========================================================================
87
 //=============================private variables============================
98
 //=============================private variables============================
88
 //===========================================================================
99
 //===========================================================================
1100
 }
1111
 }
1101
 
1112
 
1102
 #ifdef HEATER_0_USES_MAX6675
1113
 #ifdef HEATER_0_USES_MAX6675
1103
-  #define MAX6675_HEAT_INTERVAL 250
1104
-  long max6675_previous_millis = MAX6675_HEAT_INTERVAL;
1114
+  #define MAX6675_HEAT_INTERVAL 250u
1115
+  unsigned long max6675_previous_millis = MAX6675_HEAT_INTERVAL;
1105
   int max6675_temp = 2000;
1116
   int max6675_temp = 2000;
1106
 
1117
 
1107
   static int read_max6675() {
1118
   static int read_max6675() {

+ 4
- 14
Marlin/temperature.h View File

146
 void setWatch();
146
 void setWatch();
147
 void updatePID();
147
 void updatePID();
148
 
148
 
149
-#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
150
-void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
151
-static int thermal_runaway_state_machine[4]; // = {0,0,0,0};
152
-static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0};
153
-static bool thermal_runaway = false;
154
-#if TEMP_SENSOR_BED != 0
155
-  static int thermal_runaway_bed_state_machine;
156
-  static unsigned long thermal_runaway_bed_timer;
157
-#endif
158
-#endif
149
+void PID_autotune(float temp, int extruder, int ncycles);
150
+
151
+void setExtruderAutoFanState(int pin, bool state);
152
+void checkExtruderAutoFans();
159
 
153
 
160
 FORCE_INLINE void autotempShutdown() {
154
 FORCE_INLINE void autotempShutdown() {
161
   #ifdef AUTOTEMP
155
   #ifdef AUTOTEMP
167
   #endif
161
   #endif
168
 }
162
 }
169
 
163
 
170
-void PID_autotune(float temp, int extruder, int ncycles);
171
-
172
-void setExtruderAutoFanState(int pin, bool state);
173
-void checkExtruderAutoFans();
174
 
164
 
175
 #endif
165
 #endif

+ 1
- 1
Marlin/ultralcd_st7920_u8glib_rrd.h View File

43
 #define ST7920_NCS()             {WRITE(ST7920_CS_PIN,0);}
43
 #define ST7920_NCS()             {WRITE(ST7920_CS_PIN,0);}
44
 #define ST7920_SET_CMD()         {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
44
 #define ST7920_SET_CMD()         {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
45
 #define ST7920_SET_DAT()         {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
45
 #define ST7920_SET_DAT()         {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
46
-#define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&0xf0);ST7920_SWSPI_SND_8BIT((a)<<4);u8g_10MicroDelay();}
46
+#define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();}
47
 #define ST7920_WRITE_BYTES(p,l)  {uint8_t i;for(i=0;i<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();}
47
 #define ST7920_WRITE_BYTES(p,l)  {uint8_t i;for(i=0;i<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();}
48
 
48
 
49
 uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)
49
 uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)

Loading…
Cancel
Save