Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jyberg committed Aug 2, 2020
2 parents 3c88dc8 + 6030617 commit 649637c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
28 changes: 28 additions & 0 deletions NexSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,34 @@ bool NexSlider::setMinval(uint32_t number)
cmd += buf;
sendCommand(cmd.c_str());

cmd = "";
cmd += "ref ";
getObjGlobalPageName(cmd);
sendCommand(cmd.c_str());
return recvRetCommandFinished();
}

uint32_t NexSlider::Get_background_image_pic(uint32_t *number)
{
String cmd;
cmd += "get ";
getObjGlobalPageName(cmd);
cmd += ".pic";
sendCommand(cmd.c_str());
return recvRetNumber(number);
}

bool NexSlider::Set_background_image_pic(uint32_t number)
{
char buf[10] = {0};
String cmd;

utoa(number, buf, 10);
getObjGlobalPageName(cmd);
cmd += ".pic=";
cmd += buf;
sendCommand(cmd.c_str());

cmd = "";
cmd += "ref ";
getObjGlobalPageName(cmd);
Expand Down
16 changes: 16 additions & 0 deletions NexSlider.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,22 @@ class NexSlider: public NexTouch
* @return true if success, false for failure
*/
bool setMinval(uint32_t number);

/**
* Get pic attribute of component
*
* @param number - buffer storing data return
* @return the length of the data
*/
uint32_t Get_background_image_pic(uint32_t *number);

/**
* Set pic attribute of component
*
* @param number - To set up the data
* @return true if success, false for failure
*/
bool Set_background_image_pic(uint32_t number);
};
/**
* @}
Expand Down

0 comments on commit 649637c

Please sign in to comment.