Ocky Kristanto / NextionSerial
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NextionUI.cpp Source File

NextionUI.cpp

00001 #include "NextionUI.h"
00002 #include "NextionSerial.h"
00003 
00004 NextionUI::NextionUI(uint32_t aPage, uint32_t aId, const std::string& aObjectName, NextionSerial& aNextionSerial) :
00005   iPage(aPage),
00006   iId(aId),
00007   iObjectName(aObjectName),
00008   iNextionSerial(aNextionSerial)
00009 {
00010     aNextionSerial.AddNextionUI(this);
00011 }
00012 
00013 uint32_t NextionUI::GetPage() const
00014 {
00015     return iPage;
00016 }
00017 
00018 uint32_t NextionUI::GetId() const
00019 {
00020     return iId;
00021 }
00022 
00023 void NextionUI::PressReleaseTriggered(TEventType aEventType)
00024 {
00025     #ifdef DEBUG
00026         switch (aEventType)
00027         {
00028             case TEventType::EPress:
00029                 printf("Received Press Event\n");
00030                 break;
00031             case TEventType::ERelease:
00032                 printf("Received Release Event\n");
00033                 break;
00034         }
00035     #endif
00036 }