NexPicture.cpp
Go to the documentation of this file.
#include "NexPicture.h"
NexPicture::NexPicture(uint8_t pid, uint8_t cid, const char *name)
:NexTouch(pid, cid, name)
{
}
bool NexPicture::Get_background_image_pic(uint32_t *number)
{
String cmd = String("get ");
cmd += getObjName();
cmd += ".pic";
sendCommand(cmd.c_str());
return recvRetNumber(number);
}
bool NexPicture::Set_background_image_pic(uint32_t number)
{
char buf[10] = {0};
String cmd;
utoa(number, buf, 10);
cmd += getObjName();
cmd += ".pic=";
cmd += buf;
sendCommand(cmd.c_str());
return recvRetCommandFinished();
}
bool NexPicture::getPic(uint32_t *number)
{
String cmd = String("get ");
cmd += getObjName();
cmd += ".pic";
sendCommand(cmd.c_str());
return recvRetNumber(number);
}
bool NexPicture::setPic(uint32_t number)
{
char buf[10] = {0};
String cmd;
utoa(number, buf, 10);
cmd += getObjName();
cmd += ".pic=";
cmd += buf;
sendCommand(cmd.c_str());
return recvRetCommandFinished();
}
NexPicture::Set_background_image_pic
bool Set_background_image_pic(uint32_t number)
Set picture's number.
Definition: NexPicture.cpp:32
NexPicture::setPic
bool setPic(uint32_t number)
Set picture's number.
Definition: NexPicture.cpp:55
NexPicture::NexPicture
NexPicture(uint8_t pid, uint8_t cid, const char *name)
Constructor.
Definition: NexPicture.cpp:18
NexPicture::Get_background_image_pic
bool Get_background_image_pic(uint32_t *number)
Get picture's number.
Definition: NexPicture.cpp:23
NexPicture::getPic
bool getPic(uint32_t *number)
Get picture's number.
Definition: NexPicture.cpp:46
NexTouch
Father class of the components with touch events.
Definition: NexTouch.h:53
NexPicture.h
The definition of class NexPicture.