diff --git a/NexSlider.cpp b/NexSlider.cpp index c8abaccb..b8369c8d 100755 --- a/NexSlider.cpp +++ b/NexSlider.cpp @@ -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); diff --git a/NexSlider.h b/NexSlider.h index 8f3c7974..d5e20868 100755 --- a/NexSlider.h +++ b/NexSlider.h @@ -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); }; /** * @}