Added ViewLink structure taken from definition.h

This commit is contained in:
anschrammh 2020-12-19 20:52:59 +01:00
parent 08afbad156
commit 573e33ccf4
2 changed files with 9 additions and 2 deletions

View File

@ -196,7 +196,7 @@ void ScreenManager::iterateThroughList()
}
}
ViewLink* ScreenManager::getLinkByUID(ViewLinkedList viewLinkedList, const unsigned char UID)
ScreenManager::ViewLink* ScreenManager::getLinkByUID(ViewLinkedList viewLinkedList, const unsigned char UID)
{
if(isListEmpty(viewLinkedList))
return NULL;

View File

@ -2,7 +2,6 @@
#define SCREENMANAGER_H
#include <Adafruit_SSD1306.h>
#include "definition.h"
#include "SDCardManager.h"
#include "CFGFileParser.h"
#include "CFGDictionary.h"
@ -13,6 +12,14 @@ class ScreenManager
friend class SAB;
public:
enum Error {OK, MALLOC_FAILED, VIEW_NOT_FOUND, VIEW_FUNC_UNDEFINED, VIEW_FAILED_TO_EXECUTE, CURRENT_VIEW_UNDEFINED};
//Data structure for the view handling
typedef struct viewLink
{
boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*);
void *pData;
const int UID;
struct viewLink *next, *previous;
} ViewLink, *ViewLinkedList;
boolean addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID);
boolean removeView(const unsigned char UID);