ready so far

This commit is contained in:
hg
2016-07-10 18:38:53 +02:00
parent 627656e7b6
commit cb9483e6ff
5 changed files with 35 additions and 48 deletions

6
hmi.h
View File

@ -32,13 +32,14 @@ namespace HmiNS {
const static uint16_t WHITE = 0xFFFF;
const static uint8_t BUFFERLEN_MESSAGESLOT = 9;
const static uint8_t NUM_OF_MESSAGESLOTS = 13;
const static uint8_t NUM_OF_MESSAGESLOTS = 10;
}
struct MessageSlot {
char header[HmiNS::BUFFERLEN_MESSAGESLOT+1];
char body[HmiNS::BUFFERLEN_MESSAGESLOT+1];
bool updateRequired;
uint32_t timestamp;
};
@ -48,14 +49,13 @@ public:
void begin();
void exec();
Print *tft() { return &m_tft; };
void updateMessage();
void updateMessage(uint8_t slot, char* header, char* body);
void toggleAlarmState(); // only for debug
void clear();
private:
void drawMessages();
Adafruit_ILI9341 m_tft;
uint16_t m_displayIdentifier;
bool m_messageDrawUpdateRequired;
bool m_alarmMessageAvailable;
MessageSlot m_messageSlots[HmiNS::NUM_OF_MESSAGESLOTS];
};