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,9 +256,6 @@ static void _draw_heater_status(int x, int heater) {
256 256
 }
257 257
 
258 258
 static void lcd_implementation_status_screen() {
259
-
260
-  static unsigned char fan_rot = 0;
261
- 
262 259
   u8g.setColorIndex(1); // black on white
263 260
 
264 261
   // Symbols menu graphics, animated fan
@@ -485,7 +482,7 @@ static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const c
485 482
   lcd_implementation_mark_as_selected(row, isSelected);
486 483
 
487 484
   if (isDir) lcd_print(LCD_STR_FOLDER[0]);
488
-  while (c = *filename) {
485
+  while ((c = *filename)) {
489 486
     n -= lcd_print(c);
490 487
     filename++;
491 488
   }

+ 6
- 2
Marlin/stepper.cpp View File

@@ -459,7 +459,7 @@ ISR(TIMER1_COMPA_vect) {
459 459
       #ifdef COREXY
460 460
         // Head direction in -X axis for CoreXY bots.
461 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 463
           if (TEST(out_bits, X_HEAD))
464 464
       #else
465 465
           if (TEST(out_bits, X_AXIS))   // stepping along -X axis (regular cartesians bot)
@@ -487,9 +487,10 @@ ISR(TIMER1_COMPA_vect) {
487 487
               }
488 488
           }
489 489
       #ifdef COREXY
490
+        }
490 491
         // Head direction in -Y axis for CoreXY bots.
491 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 494
           if (TEST(out_bits, Y_HEAD))
494 495
       #else
495 496
           if (TEST(out_bits, Y_AXIS))   // -direction
@@ -504,6 +505,9 @@ ISR(TIMER1_COMPA_vect) {
504 505
               UPDATE_ENDSTOP(y, Y, max, MAX);
505 506
             #endif
506 507
           }
508
+      #ifdef COREXY
509
+        }
510
+      #endif
507 511
     }
508 512
 
509 513
     if (TEST(out_bits, Z_AXIS)) {   // -direction

+ 13
- 2
Marlin/temperature.cpp View File

@@ -83,6 +83,17 @@ unsigned char soft_pwm_bed;
83 83
 #ifdef FILAMENT_SENSOR
84 84
   int current_raw_filwidth = 0;  //Holds measured filament diameter - one extruder only
85 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 98
 //=============================private variables============================
88 99
 //===========================================================================
@@ -1100,8 +1111,8 @@ void disable_heater() {
1100 1111
 }
1101 1112
 
1102 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 1116
   int max6675_temp = 2000;
1106 1117
 
1107 1118
   static int read_max6675() {

+ 4
- 14
Marlin/temperature.h View File

@@ -146,16 +146,10 @@ void disable_heater();
146 146
 void setWatch();
147 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 154
 FORCE_INLINE void autotempShutdown() {
161 155
   #ifdef AUTOTEMP
@@ -167,9 +161,5 @@ FORCE_INLINE void autotempShutdown() {
167 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 165
 #endif

+ 1
- 1
Marlin/ultralcd_st7920_u8glib_rrd.h View File

@@ -43,7 +43,7 @@ static void ST7920_SWSPI_SND_8BIT(uint8_t val)
43 43
 #define ST7920_NCS()             {WRITE(ST7920_CS_PIN,0);}
44 44
 #define ST7920_SET_CMD()         {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
45 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 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 49
 uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)

Loading…
Cancel
Save