Sanity check PIDTEMPBED plus BED_LIMIT_SWITCHING

This commit is contained in:
Scott Lahteine 2016-03-25 19:05:31 -07:00
parent 8cb04816b5
commit 5955a3063f
3 changed files with 9 additions and 3 deletions

View file

@ -131,10 +131,16 @@
#error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN or DISPLAY_CHARSET_HD44780_CYRILLIC for your LCD controller. #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN or DISPLAY_CHARSET_HD44780_CYRILLIC for your LCD controller.
#endif #endif
/**
* Bed Heating Options - PID vs Limit Switching
*/
#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING)
#error To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED.
#endif
/** /**
* Mesh Bed Leveling * Mesh Bed Leveling
*/ */
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
#if ENABLED(DELTA) #if ENABLED(DELTA)
#error MESH_BED_LEVELING does not yet support DELTA printers. #error MESH_BED_LEVELING does not yet support DELTA printers.

View file

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

View file

@ -745,7 +745,7 @@ void manage_heater() {
soft_pwm_bed = 0; soft_pwm_bed = 0;
WRITE_HEATER_BED(LOW); WRITE_HEATER_BED(LOW);
} }
#else // BED_LIMIT_SWITCHING #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING
// Check if temperature is within the correct range // Check if temperature is within the correct range
if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) { if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) {
soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0; soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;