Ver código fonte

Merge pull request #1200 from chertykov/Marlin_v1

Fix syntax errors in #ifdef
Bo Herrmannsen 10 anos atrás
pai
commit
5e7bd2dc87
3 arquivos alterados com 7 adições e 6 exclusões
  1. 3
    2
      Marlin/Marlin_main.cpp
  2. 3
    3
      Marlin/temperature.cpp
  3. 1
    1
      Marlin/temperature.h

+ 3
- 2
Marlin/Marlin_main.cpp Ver arquivo

@@ -1616,7 +1616,7 @@ void process_commands()
1616 1616
 #ifdef SCARA
1617 1617
 	  calculate_delta(current_position);
1618 1618
       plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
1619
-#endif SCARA
1619
+#endif // SCARA
1620 1620
 
1621 1621
       #ifdef ENDSTOPS_ONLY_FOR_HOMING
1622 1622
         enable_endstops(false);
@@ -3053,11 +3053,12 @@ Sigma_Exit:
3053 3053
 
3054 3054
           if (pin_number > -1)
3055 3055
           {
3056
+            int target = LOW;
3057
+
3056 3058
             st_synchronize();
3057 3059
 
3058 3060
             pinMode(pin_number, INPUT);
3059 3061
 
3060
-            int target;
3061 3062
             switch(pin_state){
3062 3063
             case 1:
3063 3064
               target = HIGH;

+ 3
- 3
Marlin/temperature.cpp Ver arquivo

@@ -425,7 +425,7 @@ void manage_heater()
425 425
   for(int e = 0; e < EXTRUDERS; e++) 
426 426
   {
427 427
 
428
-  #ifdef THERMAL_RUNAWAY_PROTECTION_PERIOD && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
428
+#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
429 429
     thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_RUNAWAY_PROTECTION_PERIOD, THERMAL_RUNAWAY_PROTECTION_HYSTERESIS);
430 430
   #endif
431 431
 
@@ -725,7 +725,7 @@ static void updateTemperaturesFromRawValues()
725 725
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
726 726
       redundant_temperature = analog2temp(redundant_temperature_raw, 1);
727 727
     #endif
728
-    #ifdef FILAMENT_SENSOR  && (FILWIDTH_PIN > -1)    //check if a sensor is supported 
728
+    #if defined (FILAMENT_SENSOR) && (FILWIDTH_PIN > -1)    //check if a sensor is supported 
729 729
       filament_width_meas = analog2widthFil();
730 730
     #endif  
731 731
     //Reset the watchdog after we know we have a temperature measurement.
@@ -983,7 +983,7 @@ void setWatch()
983 983
 #endif 
984 984
 }
985 985
 
986
-#ifdef THERMAL_RUNAWAY_PROTECTION_PERIOD && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
986
+#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
987 987
 void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc)
988 988
 {
989 989
 /*

+ 1
- 1
Marlin/temperature.h Ver arquivo

@@ -162,7 +162,7 @@ void disable_heater();
162 162
 void setWatch();
163 163
 void updatePID();
164 164
 
165
-#ifdef THERMAL_RUNAWAY_PROTECTION_PERIOD && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
165
+#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
166 166
 void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
167 167
 static int thermal_runaway_state_machine[3]; // = {0,0,0};
168 168
 static unsigned long thermal_runaway_timer[3]; // = {0,0,0};

Carregando…
Cancelar
Salvar