diff --git a/CNAME b/CNAME deleted file mode 100644 index fc5610a5..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -lcdmenu-5.forntoh.dev \ No newline at end of file diff --git a/reference/migration/index.html b/reference/migration/index.html index 3014155e..713fe7c6 100644 --- a/reference/migration/index.html +++ b/reference/migration/index.html @@ -215,11 +215,122 @@

Migration

This guide details the changes and how to change your code to migrate to LcdMenu v5.x.

This is a major release with a lot of changes.

-
-

Caution

-

-This guide is a work in progress and will be updated as the release progresses.

+
+

Display interface changes

+

In v4.x, the display instance was created and initialised in the display adapter. +In this version, the display instance is created separetely and passed to the display adapter. +The existing display adapters have been renamed and placed in a new directory to closely match the display they are designed for.

+
+

Imports

+

The first change you’ll need to make is to add the import for your desired display interface.

+
+ +
+
#include <interface/LiquidCrystalI2CAdapter.h>
+#include <LiquidCrystal_I2C.h>
+#include <display/LiquidCrystal_I2CAdapter.h>
+
+
+ +
+
#include <interface/LiquidCrystalAdapter.h>
+#include <LiquidCrystal.h>
+#include <display/LiquidCrystalAdapter.h>
+
+
+
+
+
+
+

Construct the display adapter interface

+

The display instance is created and passed to the display adapter.

+
+ +
+
LiquidCrystalI2CAdapter lcdAdapter(0x27, LCD_COLS, LCD_ROWS);
+LiquidCrystal_I2C lcd(0x27, 16, 2);
+LiquidCrystal_I2CAdapter lcdAdapter(lcd);
+
+
+
+ +
+
LiquidCrystalAdapter lcdAdapter(12, 11, 5, 4, 3, 2);
+LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
+LiquidCrystalAdapter lcdAdapter(lcd);
+
+
+
+
+
+
+

Initialise the menu

+

The next change is to create and initialise the menu with the display adapter interface.

+
LcdMenu menu(lcdAdapter);
+
+
+

Finally, begin the display instance in the setup function.

+
+ +
+
void setup() {
+   lcd.begin();
+}
+
+
+
+ +
+
void setup() {
+   lcd.begin();
+}
+
+
+
+
+
+
+ +

Migration from v3.x to v4.x

@@ -233,8 +344,8 @@

New imports -

Construct the display adapter interface

+
+

Construct the display adapter interface

The second change is to construct the display adapter interface. For example, if you are using the LiquidCrystalI2CAdapter, you will need to construct it like this:

LiquidCrystalI2CAdapter lcd(0x27, 16, 2);
@@ -287,10 +398,23 @@ 

Other changes
  • Migration from v4.x to v5.x
  • +
  • Migration from v4.x to v5.x +
  • Migration from v3.x to v4.x diff --git a/reference/migration/v4.x-v5.x.html b/reference/migration/v4.x-v5.x.html index 001ff7ac..314dbc87 100644 --- a/reference/migration/v4.x-v5.x.html +++ b/reference/migration/v4.x-v5.x.html @@ -210,14 +210,141 @@

    Migration from v4.x to v5.x

    This guide details the changes and how to change your code to migrate to LcdMenu v5.x.

    This is a major release with a lot of changes.

    -
    -

    Caution

    -

    -This guide is a work in progress and will be updated as the release progresses.

    +
    +

    Display interface changes

    +

    In v4.x, the display instance was created and initialised in the display adapter. +In this version, the display instance is created separetely and passed to the display adapter. +The existing display adapters have been renamed and placed in a new directory to closely match the display they are designed for.

    +
    +

    Imports

    +

    The first change you’ll need to make is to add the import for your desired display interface.

    +
    + +
    +
    #include <interface/LiquidCrystalI2CAdapter.h>
    +#include <LiquidCrystal_I2C.h>
    +#include <display/LiquidCrystal_I2CAdapter.h>
    +
    +
    + +
    +
    #include <interface/LiquidCrystalAdapter.h>
    +#include <LiquidCrystal.h>
    +#include <display/LiquidCrystalAdapter.h>
    +
    +
    +
    +
    +
    +
    +

    Construct the display adapter interface

    +

    The display instance is created and passed to the display adapter.

    +
    + +
    +
    LiquidCrystalI2CAdapter lcdAdapter(0x27, LCD_COLS, LCD_ROWS);
    +LiquidCrystal_I2C lcd(0x27, 16, 2);
    +LiquidCrystal_I2CAdapter lcdAdapter(lcd);
    +
    +
    +
    + +
    +
    LiquidCrystalAdapter lcdAdapter(12, 11, 5, 4, 3, 2);
    +LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
    +LiquidCrystalAdapter lcdAdapter(lcd);
    +
    +
    +
    +
    +
    +
    +

    Initialise the menu

    +

    The next change is to create and initialise the menu with the display adapter interface.

    +
    LcdMenu menu(lcdAdapter);
    +
    +
    +

    Finally, begin the display instance in the setup function.

    +
    + +
    +
    void setup() {
    +   lcd.begin();
    +}
    +
    +
    +
    + +
    +
    void setup() {
    +   lcd.begin();
    +}
    +
    +
    +
    +
    +
    +
    + +

-
+