message displaying works

This commit is contained in:
hg
2016-03-04 14:30:30 +01:00
parent c520e7731c
commit c04b24a1f0
6 changed files with 60 additions and 19 deletions

9
hmi.h
View File

@ -31,14 +31,14 @@ namespace HmiNS {
const static uint16_t YELLOW = 0xFFE0;
const static uint16_t WHITE = 0xFFFF;
const static uint8_t BUFFERLEN_MESSAGESLOT = 10;
const static uint8_t NUM_OF_MESSAGESLOTS = 12;
const static uint8_t BUFFERLEN_MESSAGESLOT = 9;
const static uint8_t NUM_OF_MESSAGESLOTS = 13;
}
struct MessageSlot {
char header[HmiNS::BUFFERLEN_MESSAGESLOT];
char body[HmiNS::BUFFERLEN_MESSAGESLOT];
char header[HmiNS::BUFFERLEN_MESSAGESLOT+1];
char body[HmiNS::BUFFERLEN_MESSAGESLOT+1];
uint32_t timestamp;
};
@ -48,6 +48,7 @@ public:
void begin();
void exec();
void updateMessage();
void updateMessage(uint8_t slot, char* header, char* body);
void toggleAlarmState(); // only for debug
private:
void drawMessages();