Browse Source

Solved few warnings.

daid303 12 years ago
parent
commit
72586eb30a
3 changed files with 8 additions and 2 deletions
  1. 1
    1
      Marlin/planner.cpp
  2. 1
    1
      Marlin/stepper.cpp
  3. 6
    0
      Marlin/temperature.cpp

+ 1
- 1
Marlin/planner.cpp View File

@@ -193,7 +193,7 @@ void calculate_trapezoid_for_block(block_t *block, float entry_factor, float exi
193 193
   if (plateau_steps < 0) {
194 194
     accelerate_steps = ceil(intersection_distance(block->initial_rate, block->final_rate, acceleration, block->step_event_count));
195 195
     accelerate_steps = max(accelerate_steps,0); // Check limits due to numerical round-off
196
-    accelerate_steps = min(accelerate_steps,block->step_event_count);
196
+    accelerate_steps = min((uint32_t)accelerate_steps,block->step_event_count);//(We can cast here to unsigned, because the above line ensures that we are above zero)
197 197
     plateau_steps = 0;
198 198
   }
199 199
 

+ 1
- 1
Marlin/stepper.cpp View File

@@ -52,8 +52,8 @@ volatile static unsigned long step_events_completed; // The number of step event
52 52
 #ifdef ADVANCE
53 53
   static long advance_rate, advance, final_advance = 0;
54 54
   static long old_advance = 0;
55
+  static long e_steps[3];
55 56
 #endif
56
-static long e_steps[3];
57 57
 static long acceleration_time, deceleration_time;
58 58
 //static unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
59 59
 static unsigned short acc_step_rate; // needed for deccelaration start point

+ 6
- 0
Marlin/temperature.cpp View File

@@ -906,9 +906,15 @@ ISR(TIMER0_COMPB_vect)
906 906
   static unsigned char temp_state = 0;
907 907
   static unsigned char pwm_count = 1;
908 908
   static unsigned char soft_pwm_0;
909
+  #if EXTRUDERS > 1
909 910
   static unsigned char soft_pwm_1;
911
+  #endif
912
+  #if EXTRUDERS > 2
910 913
   static unsigned char soft_pwm_2;
914
+  #endif
915
+  #if HEATER_BED_PIN > -1
911 916
   static unsigned char soft_pwm_b;
917
+  #endif
912 918
   
913 919
   if(pwm_count == 0){
914 920
     soft_pwm_0 = soft_pwm[0];

Loading…
Cancel
Save