Browse Source

More functional seperation

Moved SDCARDDETECTINVERTED and SDSLOW to Conditionals.h.
Added U8GLIB_LM6059_AF to define display specific actions.
Added reminder to compile in u8glib
Ed Boston 10 years ago
parent
commit
a83bf18ee1
5 changed files with 22 additions and 18 deletions
  1. 3
    0
      Marlin/Conditionals.h
  2. 3
    1
      Marlin/Configuration.h
  3. 1
    1
      Marlin/dogm_lcd_implementation.h
  4. 1
    3
      Marlin/pins_RAMPS_13.h
  5. 14
    13
      Marlin/ultralcd.cpp

+ 3
- 0
Marlin/Conditionals.h View File

@@ -33,6 +33,9 @@
33 33
       #define DEFAULT_LCD_CONTRAST 40
34 34
     #elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
35 35
       #define DEFAULT_LCD_CONTRAST 110
36
+      #define SDCARDDETECTINVERTED
37
+      #define SDSLOW
38
+      #define U8GLIB_LM6059_AF
36 39
     #endif
37 40
 
38 41
     #define ENCODER_PULSES_PER_STEP 4

+ 3
- 1
Marlin/Configuration.h View File

@@ -662,7 +662,9 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
662 662
 
663 663
 // This is a new controller currently under development.  A link to more information will be provided as it
664 664
 // becomes available.
665
-//#define ELB_FULL_GRAPHIC_CONTROLLER
665
+//
666
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
667
+#define ELB_FULL_GRAPHIC_CONTROLLER
666 668
 
667 669
 // The RepRapDiscount Smart Controller (white PCB)
668 670
 // http://reprap.org/wiki/RepRapDiscount_Smart_Controller

+ 1
- 1
Marlin/dogm_lcd_implementation.h View File

@@ -126,7 +126,7 @@
126 126
 #elif defined(VIKI2) || defined(miniVIKI)
127 127
   // Mini Viki and Viki 2.0 LCD, ST7565 controller as well
128 128
   U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
129
-#elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
129
+#elif defined(U8GLIB_LM6059_AF)
130 130
   // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
131 131
   U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
132 132
 #else

+ 1
- 3
Marlin/pins_RAMPS_13.h View File

@@ -181,12 +181,10 @@
181 181
       #define LCD_SDSS 53
182 182
       #define SDCARDDETECT 49
183 183
     #elif defined(ELB_FULL_GRAPHIC_CONTROLLER)
184
-      #define BTN_EN1 35
184
+      #define BTN_EN1 35  // reverse if the encoder turns the wrong way.
185 185
       #define BTN_EN2 37
186 186
       #define BTN_ENC 31
187 187
       #define SDCARDDETECT 49
188
-      #define SDCARDDETECTINVERTED
189
-      #define SDSLOW
190 188
       #define LCD_SDSS 53
191 189
       #define KILL_PIN 41
192 190
       #define BEEPER 23

+ 14
- 13
Marlin/ultralcd.cpp View File

@@ -1110,23 +1110,24 @@ static void lcd_control_volumetric_menu() {
1110 1110
 #ifdef HAS_LCD_CONTRAST
1111 1111
   static void lcd_set_contrast() {
1112 1112
     if (encoderPosition != 0) {
1113
-#ifdef ELB_FULL_GRAPHIC_CONTROLLER
1114
-      lcd_contrast += encoderPosition;
1115
-      lcd_contrast &= 0xFF;
1116
-#else
1117
-      lcd_contrast -= encoderPosition;
1118
-      lcd_contrast &= 0x3F;
1119
-#endif
1113
+      #ifdef U8GLIB_ST7920
1114
+        lcd_contrast += encoderPosition;
1115
+        lcd_contrast &= 0xFF;
1116
+      #else
1117
+        lcd_contrast -= encoderPosition;
1118
+        lcd_contrast &= 0x3F;
1119
+      #endif
1120 1120
       encoderPosition = 0;
1121 1121
       lcdDrawUpdate = 1;
1122 1122
       u8g.setContrast(lcd_contrast);
1123 1123
     }
1124
-    if (lcdDrawUpdate) 
1125
-#ifdef ELB_FULL_GRAPHIC_CONTROLLER
1126
-      lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast));
1127
-#else
1128
-      lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
1129
-#endif
1124
+    if (lcdDrawUpdate) {
1125
+      #ifdef U8GLIB_ST7920
1126
+        lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr3(lcd_contrast));
1127
+      #else
1128
+        lcd_implementation_drawedit(PSTR(MSG_CONTRAST), itostr2(lcd_contrast));
1129
+      #endif
1130
+    }
1130 1131
     if (LCD_CLICKED) lcd_goto_menu(lcd_control_menu);
1131 1132
   }
1132 1133
 #endif // HAS_LCD_CONTRAST

Loading…
Cancel
Save