Browse Source

Cleanup rotary encoder encrot* defines

The encrot values are used in only one place, and don’t vary, so remove
redundant references.
pull/1/head
Scott Lahteine 10 years ago
parent
commit
f379edca78
  1. 4
      Marlin/dogm_lcd_implementation.h
  2. 6
      Marlin/pins_CHEAPTRONIC.h
  3. 6
      Marlin/pins_ELEFU_3.h
  4. 6
      Marlin/pins_MEGATRONICS.h
  5. 6
      Marlin/pins_MEGATRONICS_1.h
  6. 6
      Marlin/pins_MEGATRONICS_2.h
  7. 6
      Marlin/pins_MEGATRONICS_3.h
  8. 11
      Marlin/pins_RAMBO.h
  9. 11
      Marlin/ultralcd.cpp
  10. 11
      Marlin/ultralcd_implementation_hitachi_HD44780.h

4
Marlin/dogm_lcd_implementation.h

@ -27,10 +27,6 @@
#define EN_A (1<<BLEN_A)
#define EN_B (1<<BLEN_B)
#define EN_C (1<<BLEN_C)
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#define LCD_CLICKED (buttons&EN_C)
#endif

6
Marlin/pins_CHEAPTRONIC.h

@ -87,9 +87,3 @@
// Cheaptronic v1.0 does not use this port
#define SDCARDDETECT -1
// Encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1

6
Marlin/pins_ELEFU_3.h

@ -74,12 +74,6 @@
#define BLEN_B 1
#define BLEN_A 0
//encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#endif // RA_CONTROL_PANEL
#ifdef RA_DISCO

6
Marlin/pins_MEGATRONICS.h

@ -83,10 +83,4 @@
#define SDCARDDETECT -1 // Ramps does not use this port
//encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#endif // ULTRA_LCD && NEWPANEL

6
Marlin/pins_MEGATRONICS_1.h

@ -80,9 +80,3 @@
#define BLEN_A 0
#define SDCARDDETECT -1 // Megatronics does not use this port
// Encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1

6
Marlin/pins_MEGATRONICS_2.h

@ -95,9 +95,3 @@
#define BLEN_A 0
#define SDCARDDETECT -1 // Megatronics does not use this port
// Encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1

6
Marlin/pins_MEGATRONICS_3.h

@ -95,9 +95,3 @@
#define BLEN_A 0
#define SDCARDDETECT -1 // Megatronics does not use this port
// Encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1

11
Marlin/pins_RAMBO.h

@ -116,11 +116,6 @@
#define SDCARDDETECT 81 // Ramps does not use this port
//encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#else //!NEWPANEL - old style panel with shift register
//arduino pin witch triggers an piezzo beeper
#define BEEPER 33 No Beeper added
@ -138,12 +133,6 @@
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
//encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
//bits in the shift register that carry the buttons for:
// left up center down right red
#define BL_LE 7

11
Marlin/ultralcd.cpp

@ -1394,6 +1394,17 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#ifdef ULTIPANEL
////////////////////////
// Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
// These values are independent of which pins are used for EN_A and EN_B indications
// The rotary encoder part is also independent to the chipset used for the LCD
#if defined(EN_A) && defined(EN_B)
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#endif
/* Warning: This function is called from interrupt context */
void lcd_buttons_update() {
#ifdef NEWPANEL

11
Marlin/ultralcd_implementation_hitachi_HD44780.h

@ -123,17 +123,6 @@
#define LCD_CLICKED (buttons&(B_MI|B_ST))
#endif
////////////////////////
// Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
// These values are independent of which pins are used for EN_A and EN_B indications
// The rotary encoder part is also independent to the chipset used for the LCD
#if defined(EN_A) && defined(EN_B)
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#endif
#endif //ULTIPANEL
////////////////////////////////////

Loading…
Cancel
Save