Documentation: NexCrop.cpp Source File

| Documentation For Arduino users

- Main Page
- Related Pages
- Modules
- Classes
- Files
- Examples

- File List
- File Members

NexCrop.cpp
Go to the documentation of this file.
1
16 #include "NexCrop.h"
17
18 NexCrop::NexCrop(uint8_t pid, uint8_t cid, const char *name)
19 :NexTouch(pid, cid, name)
20 {
21 }
22
23 bool NexCrop::Get_background_crop_picc(uint32_t *number)
24 {
25 String cmd = String("get ");
26 cmd += getObjName();
27 cmd += ".picc";
28 sendCommand(cmd.c_str());
29 return recvRetNumber(number);
30 }
31
32 bool NexCrop::Set_background_crop_picc(uint32_t number)
33 {
34 char buf[10] = {0};
35 String cmd;
36
37 utoa(number, buf, 10);
38 cmd += getObjName();
39 cmd += ".picc=";
40 cmd += buf;
41
42 sendCommand(cmd.c_str());
43 return recvRetCommandFinished();
44 }
45
46 bool NexCrop::getPic(uint32_t *number)
47 {
48 String cmd = String("get ");
49 cmd += getObjName();
50 cmd += ".picc";
51 sendCommand(cmd.c_str());
52 return recvRetNumber(number);
53 }
54
55 bool NexCrop::setPic(uint32_t number)
56 {
57 char buf[10] = {0};
58 String cmd;
59
60 utoa(number, buf, 10);
61 cmd += getObjName();
62 cmd += ".picc=";
63 cmd += buf;
64
65 sendCommand(cmd.c_str());
66 return recvRetCommandFinished();
67 }
68
NexCrop::Get_background_crop_picc
bool Get_background_crop_picc(uint32_t *number)
Get the number of picture.
Definition: NexCrop.cpp:23
NexCrop::getPic
bool getPic(uint32_t *number)
Get the number of picture.
Definition: NexCrop.cpp:46
NexCrop::NexCrop
NexCrop(uint8_t pid, uint8_t cid, const char *name)
Constructor.
Definition: NexCrop.cpp:18
NexCrop.h
The definition of class NexCrop.
NexCrop::setPic
bool setPic(uint32_t number)
Set the number of picture.
Definition: NexCrop.cpp:55
NexCrop::Set_background_crop_picc
bool Set_background_crop_picc(uint32_t number)
Set the number of picture.
Definition: NexCrop.cpp:32
NexTouch
Father class of the components with touch events.
Definition: NexTouch.h:53