Skip to content

Commit

Permalink
setVisible added for components and setVisibleAll for page
Browse files Browse the repository at this point in the history
  • Loading branch information
jyberg committed Jul 24, 2020
1 parent bfe0922 commit bfd6888
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 1 deletion.
16 changes: 16 additions & 0 deletions NexObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,19 @@ void NexObject::printObjInfo(void)
dbSerialPrintln("]");
}

bool NexObject::setVisible(bool visible)
{
String cmd = String("vis ");
cmd += __name;
cmd += ",";
if (flag)
{
cmd += "1";
} else
{
cmd += "0";
}
sendCommand(cmd.c_str());
return recvRetCommandFinished();
}

8 changes: 8 additions & 0 deletions NexObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ class NexObject
*/
void printObjInfo(void);

/**
* Hide or Show componen on current page
*
* @param visible - true Show component, false Hide component
* @return true if success, false for failure
*/
bool setVisible(bool visible)

protected: /* methods */

/*
Expand Down
15 changes: 15 additions & 0 deletions NexPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,18 @@ bool NexPage::show(void)
return recvRetCommandFinished();
}

bool NexPage::setVisibleAll(bool visible)
{
String cmd = String("vis ");
cmd += "255,";
if (flag)
{
cmd += "1";
} else
{
cmd += "0";
}
sendCommand(cmd.c_str());
return recvRetCommandFinished();
}

9 changes: 9 additions & 0 deletions NexPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ class NexPage: public NexTouch
* @return true if success, false for faileure.
*/
bool show(void);

/**
* Hide or Show all componens on current page
*
* @param visible - true Show components, false Hide components
* @return true if success, false for failure
*/
bool setVisibleAll(bool visible)

};
/**
* @}
Expand Down
3 changes: 3 additions & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Release Notes

--------------------------------------------------------------------------------
# Release v0.11.10
- setVisible added for components and setVisibleAll for page

# Release v0.11.9
- NexConfig: standard (dafault) or fast timeout, you may use fast timeout in case of baudrate higher than 115200

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.9
0.11.10

0 comments on commit bfd6888

Please sign in to comment.