Skip to content

Commit

Permalink
Release 7.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rei-vilo committed Nov 24, 2023
1 parent b27e13f commit 5e93db1
Show file tree
Hide file tree
Showing 15 changed files with 131 additions and 220 deletions.
15 changes: 8 additions & 7 deletions examples/Example_Fast_Line/Example_Fast_Line.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
// #include <Arduino.h>
#include "hV_HAL_Peripherals.h"

// Configuration
#include "hV_Configuration.h"

// Include application, user and local libraries
// #include <SPI.h>

// Configuration
#include "hV_Configuration.h"

// Set parameters
#define DISPLAY_FAST_LINE 1

// Define structures and classes

// Define variables and constants
Expand All @@ -52,6 +53,7 @@ void wait(uint8_t second)
Serial.print(" \r");
}

// Functions
///
/// @brief Flush screen and display time
///
Expand Down Expand Up @@ -114,15 +116,14 @@ void setup()

#if (DISPLAY_FAST_LINE == 1)

Serial.print("DISPLAY_FAST_LINE... ");
Serial.println("DISPLAY_FAST_LINE... ");
myScreen.clear();
displayFastLine();
Serial.println("done");

wait(4);

#endif // DISPLAY_FAST_LINE

Serial.print("White... ");
Serial.println("White... ");
myScreen.clear();
flush_ms();

Expand Down
14 changes: 7 additions & 7 deletions examples/Example_Fast_Orientation/Example_Fast_Orientation.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
// #include <Arduino.h>
#include "hV_HAL_Peripherals.h"

// Configuration
#include "hV_Configuration.h"

// Include application, user and local libraries
// #include <SPI.h>

// Configuration
#include "hV_Configuration.h"

// Set parameters
#define DISPLAY_FAST_ORIENTATION 1

Expand All @@ -53,6 +53,7 @@ void wait(uint8_t second)
Serial.print(" \r");
}

// Functions
///
/// @brief Flush screen and display time
///
Expand Down Expand Up @@ -99,16 +100,15 @@ void setup()
Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY()));

#if (DISPLAY_FAST_ORIENTATION == 1)
Serial.print("DISPLAY_FAST_ORIENTATION... ");

Serial.println("DISPLAY_FAST_ORIENTATION... ");
myScreen.clear();
displayFastOrientation();
Serial.println("done");

wait(4);

#endif // DISPLAY_FAST_ORIENTATION

Serial.print("White... ");
Serial.println("White... ");
myScreen.clear();
flush_ms();

Expand Down
22 changes: 11 additions & 11 deletions examples/Example_Fast_Speed/Example_Fast_Speed.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
/// @n Based on highView technology
///
/// @author Rei Vilo
/// @date 21 Dec 2022
/// @version 604
/// @date 21 Nov 2023
/// @version 702
///
/// @copyright (c) Rei Vilo, 2010-2023
/// @copyright All Rights Reserved
/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
///
/// @see ReadMe.md for references
/// @n
///
/// Release 542: First release
/// Release 604: Global and fast variants
/// Release 702: Added xE2150KS0Jx and xE2152KS0Jx
///

// Screen
Expand All @@ -33,6 +34,8 @@
// Configuration
#include "hV_Configuration.h"

// Set parameters

// Define structures and classes

// Define constants and variables
Expand All @@ -42,9 +45,6 @@
// Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_EXT3_271_09_Fast, boardRaspberryPiPico_RP2040);
Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_EXT3_370_0C_Fast, boardRaspberryPiPico_RP2040);

uint8_t fontVery, fontLarge, fontMedium, fontSmall;
uint8_t myOrientation = ORIENTATION_LANDSCAPE;

// Prototypes

// Utilities
Expand All @@ -63,13 +63,15 @@ void wait(uint8_t second)
}

// Functions
///
/// @brief Perform the speed test
///
void performTest()
{
uint32_t chrono;

myScreen.clear();
myScreen.setOrientation(myOrientation); // ORIENTATION_LANDSCAPE);
myScreen.setOrientation(ORIENTATION_LANDSCAPE);

uint16_t x = myScreen.screenSizeX();
uint16_t y = myScreen.screenSizeY();
Expand All @@ -78,7 +80,7 @@ void performTest()
uint16_t dz = y / 2;
String text = "";

myScreen.selectFont(fontLarge);
myScreen.selectFont(Font_Terminal12x16);

// 0
dy = (dz - myScreen.characterSizeY()) / 2;
Expand Down Expand Up @@ -117,13 +119,11 @@ void setup()
Serial.println("=== " __DATE__ " " __TIME__);
Serial.println();

Serial.print("begin... ");
Serial.println("begin... ");
myScreen.begin();
Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY()));

fontLarge = Font_Terminal12x16;
Serial.println("Speed... ");

myScreen.clear();
performTest();
wait(8);
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=PDLS_EXT3_Basic_Fast
version=7.0.1
version=7.0.2
author=Rei Vilo for Pervasive Displays
maintainer=Rei Vilo
sentence=Library for Pervasive Displays iTC monochrome screens with embedded fast update and EXT3-1 board
Expand Down
7 changes: 4 additions & 3 deletions src/PDLS_EXT3_Basic_Fast.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/// @n Based on highView technology
///
/// @author Rei Vilo
/// @date 20 Mar 2022
/// @version 607
/// @date 21 Nov 2022
/// @version 702
///
/// @copyright (c) Rei Vilo, 2010-2023
/// @copyright All rights reserved
Expand All @@ -29,7 +29,8 @@
///
/// @brief Library release number
///
#define PDLS_EXT3_BASIC_FAST_RELEASE 607
#define PDLS_EXT3_BASIC_FAST_RELEASE 702

#include "Screen_EPD_EXT3.h"

#endif // PDLS_EXT3_BASIC_FAST_RELEASE
Expand Down
31 changes: 23 additions & 8 deletions src/Screen_EPD_EXT3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// Release 700: Refactored screen and board functions
// Release 701: Improved functions names consistency
// Release 701: Added support for eScreen_EPD_EXT3_290_0F_Wide xE2290KS0Fx
// Release 702: Added support for eScreen_EPD_EXT3_206_0E_Wide xE2206KS0Ex
//

// Library header
Expand Down Expand Up @@ -144,6 +145,13 @@ void Screen_EPD_EXT3_Fast::COG_getUserData()
_flag50 = true;
break;

case 0x200E: // 2.06” = 0xcf, 0x02

index00_data[0] = 0xcf;
index00_data[1] = 0x02;
_flag50 = true;
break;

case 0x2709: // 2.71” = 0xcf, 0x8d

index00_data[0] = 0xcf;
Expand Down Expand Up @@ -278,6 +286,13 @@ void Screen_EPD_EXT3_Fast::begin()
_screenDiagonal = 154;
break;

case 0x20: // 2.06"

_screenSizeV = 248; // vertical = wide size
_screenSizeH = 128; // horizontal = small size
_screenDiagonal = 206;
break;

case 0x21: // 2.13"

_screenSizeV = 212; // vertical = wide size
Expand Down Expand Up @@ -613,7 +628,7 @@ void Screen_EPD_EXT3_Fast::_setPoint(uint16_t x1, uint16_t y1, uint16_t colour)
{
// Orient and check coordinates are within screen
// _orientCoordinates() returns false = success, true = error
if (_orientCoordinates(x1, y1))
if (_orientCoordinates(x1, y1) == RESULT_ERROR)
{
return;
}
Expand Down Expand Up @@ -657,15 +672,15 @@ void Screen_EPD_EXT3_Fast::_setOrientation(uint8_t orientation)

bool Screen_EPD_EXT3_Fast::_orientCoordinates(uint16_t & x, uint16_t & y)
{
bool _flagError = true; // false = success, true = error
bool _flagResult = RESULT_ERROR; // false = success, true = error
switch (_orientation)
{
case 3: // checked, previously 1

if ((x < _screenSizeV) and (y < _screenSizeH))
{
x = _screenSizeV - 1 - x;
_flagError = false;
_flagResult = RESULT_SUCCESS;
}
break;

Expand All @@ -676,7 +691,7 @@ bool Screen_EPD_EXT3_Fast::_orientCoordinates(uint16_t & x, uint16_t & y)
x = _screenSizeH - 1 - x;
y = _screenSizeV - 1 - y;
swap(x, y);
_flagError = false;
_flagResult = RESULT_SUCCESS;
}
break;

Expand All @@ -685,7 +700,7 @@ bool Screen_EPD_EXT3_Fast::_orientCoordinates(uint16_t & x, uint16_t & y)
if ((x < _screenSizeV) and (y < _screenSizeH))
{
y = _screenSizeH - 1 - y;
_flagError = false;
_flagResult = RESULT_SUCCESS;
}
break;

Expand All @@ -694,12 +709,12 @@ bool Screen_EPD_EXT3_Fast::_orientCoordinates(uint16_t & x, uint16_t & y)
if ((x < _screenSizeH) and (y < _screenSizeV))
{
swap(x, y);
_flagError = false;
_flagResult = RESULT_SUCCESS;
}
break;
}

return _flagError;
return _flagResult;
}

uint32_t Screen_EPD_EXT3_Fast::_getZ(uint16_t x1, uint16_t y1)
Expand All @@ -726,7 +741,7 @@ uint16_t Screen_EPD_EXT3_Fast::_getPoint(uint16_t x1, uint16_t y1)
{
// Orient and check coordinates are within screen
// _orientCoordinates() returns false = success, true = error
if (_orientCoordinates(x1, y1))
if (_orientCoordinates(x1, y1) == RESULT_ERROR)
{
return 0;
}
Expand Down
16 changes: 8 additions & 8 deletions src/Screen_EPD_EXT3.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
/// @n Supported screens with embedded fast update
/// * 1.54 reference xE2154PS0Cx
/// * 2.13 reference xE2213PS0Ex
/// * 2.66 reference xE2266PS0Cx (not tested)
/// * 2.66 reference xE2266PS0Cx
/// * 2.71 reference xE2271PS09x
/// * 2.87 reference xE2287PS09x
/// * 2.90 reference xE2290KSxxx
/// * 3.70 reference xE2370PS0Cx
/// * 4.17 reference xE2417PS0Dx (not tested)
/// * 4.17 reference xE2417PS0Dx
/// * 4.37 reference xE2437PS0Cx
///
/// @author Rei Vilo
/// @date 21 Oct 2023
/// @version 701
/// @date 21 Nov 2023
/// @version 702
///
/// @copyright (c) Rei Vilo, 2010-2023
/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Expand Down Expand Up @@ -60,8 +60,8 @@
#error Required hV_HAL_PERIPHERALS_RELEASE 700
#endif // hV_HAL_PERIPHERALS_RELEASE

#if (hV_CONFIGURATION_RELEASE < 700)
#error Required hV_CONFIGURATION_RELEASE 700
#if (hV_CONFIGURATION_RELEASE < 702)
#error Required hV_CONFIGURATION_RELEASE 702
#endif // hV_CONFIGURATION_RELEASE

#if (hV_SCREEN_BUFFER_RELEASE < 700)
Expand All @@ -76,7 +76,7 @@
///
/// @brief Library release number
///
#define SCREEN_EPD_EXT3_RELEASE 701
#define SCREEN_EPD_EXT3_RELEASE 702

///
/// @brief Library variant
Expand Down Expand Up @@ -169,7 +169,7 @@ class Screen_EPD_EXT3_Fast final : public hV_Screen_Buffer, public hV_Utilities_
/// @brief Check and orient coordinates, logical coordinates
/// @param x x-axis coordinate, modified
/// @param y y-axis coordinate, modified
/// @return false = success, true = error
/// @return RESULT_SUCCESS = false = success, RESULT_ERROR = true = error
///
bool _orientCoordinates(uint16_t & x, uint16_t & y); // compulsory

Expand Down
6 changes: 3 additions & 3 deletions src/hV_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/// @n Based on highView technology
///
/// @author Rei Vilo
/// @date 21 Oct 2023
/// @version 701
/// @date 21 Nov 2023
/// @version 702
///
/// @copyright (c) Rei Vilo, 2010-2023
/// @copyright All rights reserved
Expand All @@ -26,7 +26,7 @@
///
/// @brief Library release number
///
#define hV_COMMON_RELEASE 701
#define hV_COMMON_RELEASE 702

// SDK
#include "hV_HAL_Peripherals.h"
Expand Down
Loading

0 comments on commit 5e93db1

Please sign in to comment.