Some bug fixes

parent 90e6cf17
......@@ -109,6 +109,7 @@
#if ENABLED(LASER)
#if LASER_CONTROL == 1
#define LASER_FIRING_PIN 5
#define LASER_INTENSITY_PIN -1
#endif
#if LASER_CONTROL == 2
#define LASER_INTENSITY_PIN 6 // Digital pins 2, 3, 5, 6, 7, 8 are attached to timers we can use
......
......@@ -78,6 +78,7 @@
#undef LASER_FIRING_PIN
#if LASER_CONTROL == 1
#define LASER_FIRING_PIN 5
#define LASER_INTENSITY_PIN -1
#endif
#if LASER_CONTROL == 2
#define LASER_INTENSITY_PIN 5 // Digital pins 2, 3, 5, 6, 7, 8 are attached to timers we can use
......
......@@ -1817,9 +1817,20 @@
#error DEPENDENCY ERROR: You must enable only one of LASERBEAM or LASER, not both!
#endif
#if ENABLED(LASER) && (!PIN_EXISTS(LASER_FIRING_PIN) || !PIN_EXISTS(LASER_INTENSITY_PIN))
#if ENABLED(LASER)
#if (!ENABLED(LASER_CONTROL) || ((LASER_CONTROL > 0) && (LASER_CONTROL < 2)))
#error DEPENDENCY ERROR: You have to set LASER_CONTROL to 1 or 2
#else
#if(LASER_CONTROL == 1)
#if( !PIN_EXISTS(LASER_FIRING_PIN))
#error DEPENDENCY ERROR: You have to set LASER_FIRING_PIN
#endif
#else
#if( !PIN_EXISTS(LASER_FIRING_PIN) || !PIN_EXISTS(LASER_INTENSITY_PIN))
#error DEPENDENCY ERROR: You have to set LASER_FIRING_PIN and LASER_INTENSITY_PIN to a valid pin if you enable LASER
#endif
#endif
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && !PIN_EXISTS(FILRUNOUT)
#error DEPENDENCY ERROR: You have to set FILRUNOUT_PIN to a valid pin if you enable FILAMENT_RUNOUT_SENSOR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment