Added ViewLink structure taken from definition.h
This commit is contained in:
parent
08afbad156
commit
573e33ccf4
@ -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))
|
if(isListEmpty(viewLinkedList))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define SCREENMANAGER_H
|
#define SCREENMANAGER_H
|
||||||
|
|
||||||
#include <Adafruit_SSD1306.h>
|
#include <Adafruit_SSD1306.h>
|
||||||
#include "definition.h"
|
|
||||||
#include "SDCardManager.h"
|
#include "SDCardManager.h"
|
||||||
#include "CFGFileParser.h"
|
#include "CFGFileParser.h"
|
||||||
#include "CFGDictionary.h"
|
#include "CFGDictionary.h"
|
||||||
@ -13,6 +12,14 @@ class ScreenManager
|
|||||||
friend class SAB;
|
friend class SAB;
|
||||||
public:
|
public:
|
||||||
enum Error {OK, MALLOC_FAILED, VIEW_NOT_FOUND, VIEW_FUNC_UNDEFINED, VIEW_FAILED_TO_EXECUTE, CURRENT_VIEW_UNDEFINED};
|
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 addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID);
|
||||||
boolean removeView(const unsigned char UID);
|
boolean removeView(const unsigned char UID);
|
||||||
|
Loading…
Reference in New Issue
Block a user