Sfoglia il codice sorgente

Updated for LiquidTWI2 library version 1.2.3

The new version of the library means that PANELOLU no longer needs to be
defined in LiquidTWI.h (the library file can be used as is) and the new
version of the library also enables the buzzer on the Panucatt VIKI
panel.
Robert F-C 11 anni fa
parent
commit
9322c408c6

+ 8
- 6
Marlin/Configuration.h Vedi File

@@ -348,11 +348,12 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
348 348
   #define ULTIPANEL 
349 349
 #endif
350 350
 
351
-//PANELOLU2 LCD with status LEDs, separate encoder and click inputs
351
+// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
352 352
 //#define LCD_I2C_PANELOLU2
353 353
 #ifdef LCD_I2C_PANELOLU2
354
-  // This uses the LiquidTWI2 library ( https://github.com/lincomatic/LiquidTWI2 )
355
-  // Make sure it is placed in the Arduino or Sketchbook libraries directory.
354
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
355
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
356
+  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
356 357
   // Note: The PANELOLU2 encoder click input can either be directly connected to a pin 
357 358
   //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). 
358 359
   #define LCD_I2C_TYPE_MCP23017
@@ -362,15 +363,16 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
362 363
   #define ULTIPANEL 
363 364
 #endif
364 365
 
365
-//Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
366
+// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
366 367
 //#define LCD_I2C_VIKI
367 368
 #ifdef LCD_I2C_VIKI
368
-  // This uses the LiquidTWI2 library ( https://github.com/lincomatic/LiquidTWI2 )
369
-  // Make sure it is placed in the Arduino or Sketchbook libraries directory.
369
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
370
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
370 371
   // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
371 372
   //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
372 373
   #define LCD_I2C_TYPE_MCP23017 
373 374
   #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
375
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
374 376
   #define NEWPANEL
375 377
   #define ULTIPANEL 
376 378
 #endif

+ 0
- 3
Marlin/Marlin.pde Vedi File

@@ -40,9 +40,6 @@
40 40
   #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)
41 41
     #include <Wire.h>
42 42
     #include <LiquidTWI2.h>
43
-    #if defined(LCD_I2C_PANELOLU2) && !defined(PANELOLU2)
44
-      #error You must uncomment "#define PANELOLU2" in LiquidTWI2.h for LiquidTWI2.cpp to compile correctly
45
-    #endif
46 43
   #else
47 44
     #include <LiquidCrystal.h>
48 45
   #endif

+ 2
- 2
Marlin/ultralcd_implementation_hitachi_HD44780.h Vedi File

@@ -54,11 +54,11 @@ extern volatile uint8_t buttons;  //the last checked buttons in a bit array.
54 54
   #define LCD_HAS_SLOW_BUTTONS
55 55
 
56 56
 #elif defined(LCD_I2C_PANELOLU2)
57
+  // encoder click can be read through I2C if not directly connected
57 58
   #if !defined(BTN_ENC) || BTN_ENC == -1 
58
-    // encoder click is connected through I2C (rather than directly connected)
59 59
     #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
60 60
   
61
-    #define B_MI (ENCODER_C<<B_I2C_BTN_OFFSET)
61
+    #define B_MI (PANELOLU2_ENCODER_C<<B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later
62 62
 
63 63
     #define LCD_CLICKED (buttons&B_MI)
64 64
 

Loading…
Annulla
Salva