Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: NextionUI.cpp
- Revision:
- 0:87b7b2ae63c3
diff -r 000000000000 -r 87b7b2ae63c3 NextionUI.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NextionUI.cpp	Wed Mar 03 09:01:07 2021 +0100
@@ -0,0 +1,36 @@
+#include "NextionUI.h"
+#include "NextionSerial.h"
+
+NextionUI::NextionUI(uint32_t aPage, uint32_t aId, const std::string& aObjectName, NextionSerial& aNextionSerial) :
+  iPage(aPage),
+  iId(aId),
+  iObjectName(aObjectName),
+  iNextionSerial(aNextionSerial)
+{
+    aNextionSerial.AddNextionUI(this);
+}
+
+uint32_t NextionUI::GetPage() const
+{
+    return iPage;
+}
+
+uint32_t NextionUI::GetId() const
+{
+    return iId;
+}
+
+void NextionUI::PressReleaseTriggered(TEventType aEventType)
+{
+    #ifdef DEBUG
+        switch (aEventType)
+        {
+            case TEventType::EPress:
+                printf("Received Press Event\n");
+                break;
+            case TEventType::ERelease:
+                printf("Received Release Event\n");
+                break;
+        }
+    #endif
+}
\ No newline at end of file