1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 15:03:07 +01:00

first new version with new structures

This commit is contained in:
norbert-walter
2022-02-03 15:49:52 +01:00
parent dcdd33c4bc
commit 12770cdd9e
24 changed files with 788 additions and 2833 deletions

View File

@@ -0,0 +1,29 @@
#include "Pagedata.h"
class PageOneValue : public Page{
public:
virtual void display(CommonData &commonData, PageData &pageData){
GwLog *logger=commonData.logger;
GwApi::BoatValue *value=pageData.values[0];
if (value == NULL) return;
LOG_DEBUG(GwLog::LOG,"drawing at PageOneValue, p=%s,v=%f",
value->getName().c_str(),
value->valid?value->value:-1.0
);
};
};
static Page* createPage(CommonData &common){return new PageOneValue();}
/**
* with the code below we make this page known to the PageTask
* we give it a type (name) that can be selected in the config
* we define which function is to be called
* and we provide the number of user parameters we expect
* this will be number of BoatValue pointers in pageData.values
*/
PageDescription registerPageOneValue(
"oneValue",
createPage,
1
);