mirror of
https://github.com/itead/ITEADLIB_Arduino_Nextion.git
synced 2026-03-03 08:44:00 +01:00
Add functions for new items based on the IDE.
This commit is contained in:
55
NexProgressBar.cpp
Normal file → Executable file
55
NexProgressBar.cpp
Normal file → Executable file
@@ -43,3 +43,58 @@ bool NexProgressBar::setValue(uint32_t number)
|
||||
return recvRetCommandFinished();
|
||||
}
|
||||
|
||||
uint32_t NexProgressBar::Get_background_color_bco(uint32_t *number)
|
||||
{
|
||||
String cmd;
|
||||
cmd += "get ";
|
||||
cmd += getObjName();
|
||||
cmd += ".bco";
|
||||
sendCommand(cmd.c_str());
|
||||
return recvRetNumber(number);
|
||||
}
|
||||
|
||||
bool NexProgressBar::Set_background_color_bco(uint32_t number)
|
||||
{
|
||||
char buf[10] = {0};
|
||||
String cmd;
|
||||
|
||||
utoa(number, buf, 10);
|
||||
cmd += getObjName();
|
||||
cmd += ".bco=";
|
||||
cmd += buf;
|
||||
sendCommand(cmd.c_str());
|
||||
|
||||
cmd="";
|
||||
cmd += "ref ";
|
||||
cmd += getObjName();
|
||||
sendCommand(cmd.c_str());
|
||||
return recvRetCommandFinished();
|
||||
}
|
||||
|
||||
uint32_t NexProgressBar::Get_font_color_pco(uint32_t *number)
|
||||
{
|
||||
String cmd;
|
||||
cmd += "get ";
|
||||
cmd += getObjName();
|
||||
cmd += ".pco";
|
||||
sendCommand(cmd.c_str());
|
||||
return recvRetNumber(number);
|
||||
}
|
||||
|
||||
bool NexProgressBar::Set_font_color_pco(uint32_t number)
|
||||
{
|
||||
char buf[10] = {0};
|
||||
String cmd;
|
||||
|
||||
utoa(number, buf, 10);
|
||||
cmd += getObjName();
|
||||
cmd += ".pco=";
|
||||
cmd += buf;
|
||||
sendCommand(cmd.c_str());
|
||||
|
||||
cmd = "";
|
||||
cmd += "ref ";
|
||||
cmd += getObjName();
|
||||
sendCommand(cmd.c_str());
|
||||
return recvRetCommandFinished();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user