Przeglądaj źródła

Merge pull request #1200 from chertykov/Marlin_v1

Fix syntax errors in #ifdef
Bo Herrmannsen 10 lat temu
rodzic
commit
5e7bd2dc87
3 zmienionych plików z 7 dodań i 6 usunięć
  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 Wyświetl plik

1616
 #ifdef SCARA
1616
 #ifdef SCARA
1617
 	  calculate_delta(current_position);
1617
 	  calculate_delta(current_position);
1618
       plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
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
       #ifdef ENDSTOPS_ONLY_FOR_HOMING
1621
       #ifdef ENDSTOPS_ONLY_FOR_HOMING
1622
         enable_endstops(false);
1622
         enable_endstops(false);
3053
 
3053
 
3054
           if (pin_number > -1)
3054
           if (pin_number > -1)
3055
           {
3055
           {
3056
+            int target = LOW;
3057
+
3056
             st_synchronize();
3058
             st_synchronize();
3057
 
3059
 
3058
             pinMode(pin_number, INPUT);
3060
             pinMode(pin_number, INPUT);
3059
 
3061
 
3060
-            int target;
3061
             switch(pin_state){
3062
             switch(pin_state){
3062
             case 1:
3063
             case 1:
3063
               target = HIGH;
3064
               target = HIGH;

+ 3
- 3
Marlin/temperature.cpp Wyświetl plik

425
   for(int e = 0; e < EXTRUDERS; e++) 
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
     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);
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
   #endif
430
   #endif
431
 
431
 
725
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
725
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
726
       redundant_temperature = analog2temp(redundant_temperature_raw, 1);
726
       redundant_temperature = analog2temp(redundant_temperature_raw, 1);
727
     #endif
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
       filament_width_meas = analog2widthFil();
729
       filament_width_meas = analog2widthFil();
730
     #endif  
730
     #endif  
731
     //Reset the watchdog after we know we have a temperature measurement.
731
     //Reset the watchdog after we know we have a temperature measurement.
983
 #endif 
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
 void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc)
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 Wyświetl plik

162
 void setWatch();
162
 void setWatch();
163
 void updatePID();
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
 void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
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
 static int thermal_runaway_state_machine[3]; // = {0,0,0};
167
 static int thermal_runaway_state_machine[3]; // = {0,0,0};
168
 static unsigned long thermal_runaway_timer[3]; // = {0,0,0};
168
 static unsigned long thermal_runaway_timer[3]; // = {0,0,0};

Ładowanie…
Anuluj
Zapisz