From e33565359974e9ec6b81c57243b8b5127dcc499f Mon Sep 17 00:00:00 2001 From: Iordanis Kostelidis Date: Mon, 12 Oct 2020 18:44:18 +0300 Subject: [PATCH 1/2] adds page background pic change support --- .gitignore | 1 + NexPage.cpp | 13 +++++++++++++ NexPage.h | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..723ef36f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/NexPage.cpp b/NexPage.cpp index e6ca3504..bf381312 100644 --- a/NexPage.cpp +++ b/NexPage.cpp @@ -36,3 +36,16 @@ bool NexPage::show(void) return recvRetCommandFinished(); } +bool NexPage::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(); +} \ No newline at end of file diff --git a/NexPage.h b/NexPage.h index c833e700..211a4c11 100644 --- a/NexPage.h +++ b/NexPage.h @@ -42,6 +42,16 @@ class NexPage: public NexTouch * @return true if success, false for faileure. */ bool show(void); + + /** + * Set picture's number. + * + * @param number -the picture number. + * + * @retval true - success. + * @retval false - failed. + */ + bool setPic(uint32_t number); }; /** * @} From d32ac164d9ea29273e30f0736fb0caf3efb8620d Mon Sep 17 00:00:00 2001 From: Iordanis Kostelidis Date: Mon, 12 Oct 2020 18:49:18 +0300 Subject: [PATCH 2/2] adds arduino due support --- .gitignore | 1 + NexUpload.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..723ef36f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/NexUpload.cpp b/NexUpload.cpp index ff85eb92..0689c194 100644 --- a/NexUpload.cpp +++ b/NexUpload.cpp @@ -14,9 +14,13 @@ */ #include "NexUpload.h" -#include //#define USE_SOFTWARE_SERIAL + +#ifdef USE_SOFTWARE_SERIAL +#include +#endif + #ifdef USE_SOFTWARE_SERIAL SoftwareSerial dbSerial(3, 2); /* RX:D3, TX:D2 */ #define DEBUG_SERIAL_ENABLE