Skip to content

Commit

Permalink
Merge pull request #70 from forntoh/doc-fix
Browse files Browse the repository at this point in the history
Doc-fix
  • Loading branch information
forntoh authored Jan 26, 2023
2 parents 8bf6dee + 52862f8 commit ebf2e2a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LcdMenu",
"version": "2.1.1",
"version": "2.1.2",
"keywords": "menu, display, lcdmenu, navigation",
"description": "Display navigable menu items on your LCD display with Arduino. You can show items bound to actions, list of items (can select one), sub menus, step menu items e.t.c. Compatible with all Character LCD Display Module and VATN Alphanumeric LCD Display",
"repository": {
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=LcdMenu
version=2.1.1
version=2.1.2
author=Forntoh Thomas <[email protected]>
maintainer=Forntoh Thomas <[email protected]>
sentence=Display navigable menu items on your LCD display with Arduino.
Expand Down
16 changes: 9 additions & 7 deletions src/LcdMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class LcdMenu {
for (uint8_t i = top; i <= bottom; i++) {
MenuItem* item = &currentMenuTable[i];
lcd->setCursor(1, map(i, top, bottom, 0, maxRows - 1));
if (currentMenuTable[i].getType() != MENU_ITEM_END_OF_MENU){
if (currentMenuTable[i].getType() != MENU_ITEM_END_OF_MENU) {
lcd->print(item->getText());
}
//
Expand Down Expand Up @@ -302,13 +302,13 @@ class LcdMenu {
*/

/**
* Time when the toast started showing in milliseconds
* Time when the timer started in milliseconds
*/
unsigned long startTime = 0;
/**
* How long the toast should Last in milliseconds
* How long should the timer delay in milliseconds
*/
unsigned int duration = 0;
unsigned int delay = 0;
/**
* LCD Display
*/
Expand Down Expand Up @@ -740,14 +740,14 @@ class LcdMenu {
//
// initialize the timer
//
this->duration = duration;
delay = duration;
startTime = millis();
}
/**
* Executes any delayed task when appropriate time reaches
*/
void updateTimer() {
if (millis() == startTime + duration) paint();
if (millis() == startTime + delay) paint();
}
/**
* Get a `MenuItem` at position
Expand All @@ -758,8 +758,10 @@ class LcdMenu {
}
/**
* Get a `MenuItem` at position using operator function
* e.g `menu[men.getCursorPosition()]` will return the item at the current
* e.g `menu[menu.getCursorPosition()]` will return the item at the current
* cursor position
* NB: This is relative positioning (i.e. if a submenu is currently being
* displayed, menu[1] will return item 1 in the current menu)
* @return `MenuItem` - item at `position`
*/
MenuItem* operator[](const uint8_t position) {
Expand Down

0 comments on commit ebf2e2a

Please sign in to comment.