Skip to content

Migrate from release 5 to release 6

This technical note lists how to migrate from from release 5 to release 6.

New features

New screens

The new line of monochrome screens with embedded fast update supersedes those with global update only. Fast update on screens without embedded fast update is deprecated.

Release 6 adds support for those new screens with embedded fast update. Legacy release 5 continues to support screens without embedded fast update.

Release 6.1.1 adds support for the new black-white-red-yellow screens.

Power management

Release 6 also features low-power mode with an optional external power circuit.

The Low-power page describes the corresponding functions.

The revised hV_Configuration header file updates the list of screens and includes the GPIO for the optional external power circuit, not connected by default.

Log system

A new log system prints messages with a level to the UART interface.

hV_HAL_log(LEVEL_INFO, "Value= %i", 3);

New special check mode

The check-box, flip-flop button and radio-buttons elements feature a new check mode called special check mode.

In special check mode, the element raises the event when the finger is released from the element. A simplified cinematic sequence is performed.

Deprecated features

The partial update mode is deprecated in release 6.

Partial update

Warning

The partial update mode is now deprecated and replaced by the fast update mode.

myScreen.gText(4, 4, myScreen.whoAmI());
myScreen.flushFast();
myScreen.gText(4, 4, myScreen.whoAmI());
myScreen.flushPartial();

The partial update mode has been simplified. It no longer requires beginPartial() to start partial mode and reset the coordinates of the window before flushPartial().

myScreen.beginPartial();
myScreen.gText(4, 4, myScreen.whoAmI());
myScreen.flushPartial();

Modified features

GUI and Graphics

For all the GUI and Graphics elements, the name has now a capitalised first letter and the constructor refers to the GUI or Graphics environment.

GUI myGUI(&myScreen);
Text myText(&myGUI);

Graphics myGraphics(&myScreen);
Histogram myHistogram(&myGraphics);
GUI myGUI(&myScreen);
text myText;

Graphics myGraphics(&myScreen);
histogram myHistogram;

When using an array of GUI or Graphics elements, first create an array with new, then call the constructor with the &myGUI parameter for each element.

GUI myGUI(&myScreen);
Button * myButton = new Button[8];
for (uint8_t index = 0; index < 8; index += 1)
{
    myButton[index] = Button(&myGUI);
}
GUI myGUI(&myScreen);
button myButton[8];

The label is now a function of the GUI or Graphics object. The name of the function, previously dLabel for GUI and gLabel for Graphics, has been harmonised to dLabel.

GUI myGUI(&myScreen);
myGUI.dLabel(0, 0, x, dy, "Label", myColours.black, myColours.white, -1, 1, fontLarge);

Graphics myGraphics(&myScreen);
myGraphics.dLabel(0, 0, x, dy, "Label", myColours.black, myColours.white, -1, 1, fontLarge);
GUI myGUI(&myScreen);
dLabel(0, 0, x, dy, "Label", myColours.black, myColours.white, -1, 1, fontLarge);

Graphics myGraphics(&myScreen);
gLabel(0, 0, x, dy, "Label", myColours.black, myColours.white, -1, 1, fontLarge);

Bar- and QR-code

For all the bar- and QR-code, the result is now an explicit constant, RESULT_SUCCESS or RESULT_EROR.

x = myScreen.screenSizeX();
y = myScreen.screenSizeY();
dz = getQRcodeSize(2);

uint8_t result;
result = codeQR(&myScreen, (x - dz) / 2, (y - dz) / 2, "www.pervasivedisplays.com", 2);
if (result == RESULT_SUCCESS)
{
    myScreen.flushFast();
}
x = myScreen.screenSizeX();
y = myScreen.screenSizeY();
dz = getQRcodeSize(2);

bool result;
result = codeQR(&myScreen, (x - dz) / 2, (y - dz) / 2, "www.pervasivedisplays.com", 2);
if (result)
{
    myScreen.flushFast();
}

This improves the consistency with the results returned by other functions.

Peripherals

hV_HAL_begin() now configures and launches GPIOs, UART, SPI, and I²C if needed.

GPIOs

hV_HAL_GPIO_define() replaces hV_HAL_GPIO_pinMode().

hV_HAL_GPIO_set() and hV_HAL_GPIO_clear are preferred over hV_HAL_digitalWrite().

hV_HAL_GPIO_get() is preferred over hV_HAL_digitalRead().

hV_HAL_GPIO_define(PIN1, OUTPUT);
hV_HAL_GPIO_set(PIN1);
hV_HAL_GPIO_clear(PIN1);

hV_HAL_GPIO_define(PIN2, INPUT_PULLUP);
uint8_t result = hV_HAL_GPIO_get(PIN2);
hV_HAL_GPIO_pinMode(PIN1, OUTPUT);
hV_HAL_digitalWrite(PIN1, HIGH);
hV_HAL_digitalWrite(PIN1, LOW);

hV_HAL_GPIO_pinMode(PIN2, INPUT_PULLUP);
uint8_t result = hV_HAL_digitalRead(PIN2);

However, previous functions are kept as synonyms.

UART

hV_HAL_Serial_printf() with hV_HAL_Serial_crlf() replace hV_HAL_Debug_print() and hV_HAL_Debug_println().

hV_HAL_Serial_printf("Value= %i", 123);
hV_HAL_Serial_crlf();
hV_HAL_Debug_println("Value= %i", 123);

However, previous functions are kept as synonyms.

File

For clarity, beginFileSystem() returns now a constant, RESULT_SUCCESS if successful or RESULT_ERROR otherwise, instead of a boolean value.

bool result = myFile.beginFileSystem(myBoard.cardCS);

if (result != RESULT_SUCCESS)
{
    hV_HAL_Serial_crlf();
    hV_HAL_log(LEVEL_CRITICAL, "SD-card error");
    hV_HAL_exit(0x01);
}
bool result = myFile.beginFileSystem(myBoard.cardCS);

if (result != RESULT_SUCCESS)
{
    hV_HAL_Serial_printf("=== SD-card error");
    hV_HAL_Serial_crlf();
}

Editions and variants names

Evaluation and Commercial editions

The names of the Evaluation and Commercial editions have been simplified from five to three variants: PDLS_EXT3_Advanced, PDLS_EXT3_Advanced_Fast and PDLS_EXT3_Advanced_Touch.

  • The library PDLS_EXT3_Advanced is unchanged and supports all the monochrome and colour black-white-red screens with global update.

  • The library PDLS_EXT3_Advanced_Fast supports all the new monochrome screens with embedded fast update and deprecates the libraries PDLS_EXT3_Advanced_Fast_Small, PDLS_EXT3_Advanced_Fast_Medium and PDLS_EXT3_Advanced_Fast_Large.

  • The library PDLS_EXT3_Advanced_Touch renames the PDLS_EXT3_Advanced_Fast_Touch library and supports the monochrome screens with touch .

A fourth library supports the new black-white-red-yellow screens.

Basic edition

The names of the the Basic edition are unchanged with three variants: PDLS_EXT3_Basic, PDLS_EXT3_Basic_Fast and PDLS_EXT3_Basic_Touch.

A fourth library supports the new black-white-red-yellow screens.