Nextion User Manual
For Arduino developers
NexWaveform.cpp
Go to the documentation of this file.
1 
15 #include "NexWaveform.h"
16 
17 NexWaveform::NexWaveform(uint8_t pid, uint8_t cid, const char *name)
18  :NexObject(pid, cid, name)
19 {
20 }
21 
22 bool NexWaveform::addValue(uint8_t ch, uint8_t number)
23 {
24  char buf[15] = {0};
25 
26  if (ch > 3)
27  {
28  return false;
29  }
30 
31  sprintf(buf, "add %u,%u,%u", getObjCid(), ch, number);
32 
33  sendCommand(buf);
34  return true;
35 }
36 
The definition of class NexWaveform.
bool addValue(uint8_t ch, uint8_t number)
Add value to show.
Definition: NexWaveform.cpp:22
NexWaveform(uint8_t pid, uint8_t cid, const char *name)
Constructor.
Definition: NexWaveform.cpp:17
Root class of all Nextion components.
Definition: NexObject.h:32