|  |  | @ -26,6 +26,9 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Test configuration values for errors at compile-time. |  |  |  |  * Test configuration values for errors at compile-time. | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #ifndef _SANITYCHECK_H_ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #define _SANITYCHECK_H_ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | /**
 |  |  |  | /**
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features. |  |  |  |  * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features. | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
	
		
		
			
				
					|  |  | @ -254,7 +257,19 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | /**
 |  |  |  | /**
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Serial |  |  |  |  * Serial | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | #if defined(USBCON) && ENABLED(SERIAL_XON_XOFF) |  |  |  | #ifndef USBCON | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops." | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #endif | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #if RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE)) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1." | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #endif | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE)) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256." | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #endif | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #elif ENABLED(SERIAL_XON_XOFF) | 
			
		
	
		
		
			
				
					
					|  |  |  |   #error "SERIAL_XON_XOFF is not supported on USB-native AVR devices." |  |  |  |   #error "SERIAL_XON_XOFF is not supported on USB-native AVR devices." | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -355,9 +370,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Babystepping |  |  |  |  * Babystepping | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | #if ENABLED(BABYSTEPPING) |  |  |  | #if ENABLED(BABYSTEPPING) | 
			
		
	
		
		
			
				
					
					|  |  |  |   #if DISABLED(ULTRA_LCD) && DISABLED(I2C_POSITION_ENCODERS) |  |  |  |   #if ENABLED(SCARA) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     #error "BABYSTEPPING requires an LCD controller." |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #elif ENABLED(SCARA) |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     #error "BABYSTEPPING is not implemented for SCARA yet." |  |  |  |     #error "BABYSTEPPING is not implemented for SCARA yet." | 
			
		
	
		
		
			
				
					
					|  |  |  |   #elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY) |  |  |  |   #elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY) | 
			
		
	
		
		
			
				
					
					|  |  |  |     #error "BABYSTEPPING only implemented for Z axis on deltabots." |  |  |  |     #error "BABYSTEPPING only implemented for Z axis on deltabots." | 
			
		
	
	
		
		
			
				
					|  |  | @ -595,7 +608,7 @@ static_assert(1 >= 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |   #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED |  |  |  |   #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED | 
			
		
	
		
		
			
				
					
					|  |  |  |     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL." |  |  |  |     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL." | 
			
		
	
		
		
			
				
					
					|  |  |  |   #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || ENABLED(ULTIPANEL)) |  |  |  |   #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || ENABLED(ULTIPANEL)) | 
			
		
	
		
		
			
				
					
					|  |  |  |     #error "DELTA_AUTO_CALIBRATION requires either a probe or an LCD Controller." |  |  |  |     #error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller." | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   #elif ABL_GRID |  |  |  |   #elif ABL_GRID | 
			
		
	
		
		
			
				
					
					|  |  |  |     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0 |  |  |  |     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |       #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers." |  |  |  |       #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers." | 
			
		
	
	
		
		
			
				
					|  |  | @ -989,10 +1002,11 @@ static_assert(1 >= 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |   #error "TEMP_SENSOR_0 is required." |  |  |  |   #error "TEMP_SENSOR_0 is required." | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL) |  |  |  | // Pins are required for heaters
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   #if !HAS_HEATER_1 |  |  |  | #if ENABLED(HEATER_0_USES_MAX6675) && !(defined(MAX6675_SS) && MAX6675_SS >= 0) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #error "MAX6675_SS (required for TEMP_SENSOR_0) not defined for this board." | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #elif (HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1 | 
			
		
	
		
		
			
				
					
					|  |  |  |   #error "HEATER_1_PIN not defined for this board." |  |  |  |   #error "HEATER_1_PIN not defined for this board." | 
			
		
	
		
		
			
				
					
					|  |  |  |   #endif |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | #if HOTENDS > 1 |  |  |  | #if HOTENDS > 1 | 
			
		
	
	
		
		
			
				
					|  |  | @ -1412,8 +1426,8 @@ static_assert(1 >= 0 | 
			
		
	
		
		
			
				
					
					|  |  |  | /**
 |  |  |  | /**
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  * Make sure HAVE_TMC2130 is warranted |  |  |  |  * Make sure HAVE_TMC2130 is warranted | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | #if ENABLED(HAVE_TMC2130) && !( \ |  |  |  | #if ENABLED(HAVE_TMC2130) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |        ENABLED(  X_IS_TMC2130 ) \ |  |  |  |   #if !( ENABLED(  X_IS_TMC2130 ) \ | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       || ENABLED( X2_IS_TMC2130 ) \ |  |  |  |       || ENABLED( X2_IS_TMC2130 ) \ | 
			
		
	
		
		
			
				
					
					|  |  |  |       || ENABLED(  Y_IS_TMC2130 ) \ |  |  |  |       || ENABLED(  Y_IS_TMC2130 ) \ | 
			
		
	
		
		
			
				
					
					|  |  |  |       || ENABLED( Y2_IS_TMC2130 ) \ |  |  |  |       || ENABLED( Y2_IS_TMC2130 ) \ | 
			
		
	
	
		
		
			
				
					|  |  | @ -1425,10 +1439,11 @@ static_assert(1 >= 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |       || ENABLED( E3_IS_TMC2130 ) \ |  |  |  |       || ENABLED( E3_IS_TMC2130 ) \ | 
			
		
	
		
		
			
				
					
					|  |  |  |       || ENABLED( E4_IS_TMC2130 ) ) |  |  |  |       || ENABLED( E4_IS_TMC2130 ) ) | 
			
		
	
		
		
			
				
					
					|  |  |  |     #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set." |  |  |  |     #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set." | 
			
		
	
		
		
			
				
					
					|  |  |  | #elif ENABLED(SENSORLESS_HOMING) && DISABLED(HAVE_TMC2130) |  |  |  |   #elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   #error "Enable HAVE_TMC2130 to use SENSORLESS_HOMING." |  |  |  |     #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD." | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | #elif defined(AUTOMATIC_CURRENT_CONTROL) |  |  |  |   #elif defined(AUTOMATIC_CURRENT_CONTROL) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration." |  |  |  |     #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration." | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | /**
 |  |  |  | /**
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -1581,3 +1596,5 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m | 
			
		
	
		
		
			
				
					
					|  |  |  |     #endif |  |  |  |     #endif | 
			
		
	
		
		
			
				
					
					|  |  |  |   #endif |  |  |  |   #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #endif // _SANITYCHECK_H_
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |