Commit b5de9621 authored by MagoKimbra's avatar MagoKimbra

Insert invert rotary switch

parent bd46d0fa
......@@ -531,6 +531,8 @@
#endif
#endif
// option for invert rotary switch
//#define INVERT_ROTARY_SWITCH
// Languages
// 1 English
......
......@@ -41,7 +41,7 @@ const bool E_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
......
......@@ -1597,8 +1597,13 @@ void lcd_buttons_update()
{
#ifdef NEWPANEL
uint8_t newbutton=0;
#ifdef INVERT_ROTARY_SWITCH
if(READ(BTN_EN1)==0) newbutton|=EN_B;
if(READ(BTN_EN2)==0) newbutton|=EN_A;
#else
if(READ(BTN_EN1)==0) newbutton|=EN_A;
if(READ(BTN_EN2)==0) newbutton|=EN_B;
#endif
#if BTN_ENC > 0
if((blocking_enc<millis()) && (READ(BTN_ENC)==0))
newbutton |= EN_C;
......
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