Browse Source

Sanity check PIDTEMPBED plus BED_LIMIT_SWITCHING

Scott Lahteine 8 years ago
parent
commit
5955a3063f

+ 7
- 1
Marlin/SanityCheck.h View File

132
 #endif
132
 #endif
133
 
133
 
134
 /**
134
 /**
135
- * Mesh Bed Leveling
135
+ * Bed Heating Options - PID vs Limit Switching
136
  */
136
  */
137
+#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING)
138
+  #error To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED.
139
+#endif
137
 
140
 
141
+/**
142
+ * Mesh Bed Leveling
143
+ */
138
 #if ENABLED(MESH_BED_LEVELING)
144
 #if ENABLED(MESH_BED_LEVELING)
139
   #if ENABLED(DELTA)
145
   #if ENABLED(DELTA)
140
     #error MESH_BED_LEVELING does not yet support DELTA printers.
146
     #error MESH_BED_LEVELING does not yet support DELTA printers.

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

286
 // If this is enabled, find your own PID constants below.
286
 // If this is enabled, find your own PID constants below.
287
 #define PIDTEMPBED
287
 #define PIDTEMPBED
288
 
288
 
289
-#define BED_LIMIT_SWITCHING
289
+//#define BED_LIMIT_SWITCHING
290
 
290
 
291
 // This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
291
 // This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
292
 // all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
292
 // all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)

+ 1
- 1
Marlin/temperature.cpp View File

745
         soft_pwm_bed = 0;
745
         soft_pwm_bed = 0;
746
         WRITE_HEATER_BED(LOW);
746
         WRITE_HEATER_BED(LOW);
747
       }
747
       }
748
-    #else // BED_LIMIT_SWITCHING
748
+    #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING
749
       // Check if temperature is within the correct range
749
       // Check if temperature is within the correct range
750
       if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
750
       if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
751
         soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;
751
         soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;

Loading…
Cancel
Save