Compare commits
No commits in common. "e43199b05d74ab80aa9dcfa5ae24cdf22f49200c" and "edd07d9632461ab93c08ae2ea5cba8a8250564de" have entirely different histories.
e43199b05d
...
edd07d9632
|
@ -350,49 +350,6 @@ void fillPoly4(const std::vector<Point>& p4, uint16_t color) {
|
||||||
getdisplay().fillTriangle(p4[0].x, p4[0].y, p4[2].x, p4[2].y, p4[3].x, p4[3].y, color);
|
getdisplay().fillTriangle(p4[0].x, p4[0].y, p4[2].x, p4[2].y, p4[3].x, p4[3].y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split string into words, whitespace separated
|
|
||||||
std::vector<String> split(const String &s) {
|
|
||||||
std::vector<String> words;
|
|
||||||
String word = "";
|
|
||||||
for (size_t i = 0; i < s.length(); i++) {
|
|
||||||
if (s[i] == ' ' || s[i] == '\t' || s[i] == '\r' || s[i] == '\n') {
|
|
||||||
if (word.length() > 0) {
|
|
||||||
words.push_back(word);
|
|
||||||
word = "";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
word += s[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (word.length() > 0) {
|
|
||||||
words.push_back(word);
|
|
||||||
}
|
|
||||||
return words;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wordwrap single line, monospaced font
|
|
||||||
std::vector<String> wordwrap(String &line, uint16_t maxwidth) {
|
|
||||||
std::vector<String> lines;
|
|
||||||
std::vector<String> words = split(line);
|
|
||||||
String currentLine = "";
|
|
||||||
for (const auto& word : words) {
|
|
||||||
if (currentLine.length() + word.length() + 1 > maxwidth) {
|
|
||||||
if (currentLine.length() > 0) {
|
|
||||||
lines.push_back(currentLine);
|
|
||||||
currentLine = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (currentLine.length() > 0) {
|
|
||||||
currentLine += " ";
|
|
||||||
}
|
|
||||||
currentLine += word;
|
|
||||||
}
|
|
||||||
if (currentLine.length() > 0) {
|
|
||||||
lines.push_back(currentLine);
|
|
||||||
}
|
|
||||||
return lines;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw centered text
|
// Draw centered text
|
||||||
void drawTextCenter(int16_t cx, int16_t cy, String text) {
|
void drawTextCenter(int16_t cx, int16_t cy, String text) {
|
||||||
int16_t x1, y1;
|
int16_t x1, y1;
|
||||||
|
@ -638,47 +595,6 @@ void displayFooter(CommonData &commonData) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alarm overlay, to be drawn as very last draw operation
|
|
||||||
void displayAlarm(CommonData &commonData) {
|
|
||||||
|
|
||||||
const uint16_t x = 50; // overlay area
|
|
||||||
const uint16_t y = 100;
|
|
||||||
const uint16_t w = 300;
|
|
||||||
const uint16_t h = 150;
|
|
||||||
|
|
||||||
getdisplay().setFont(&Atari16px);
|
|
||||||
getdisplay().setTextColor(commonData.fgcolor);
|
|
||||||
|
|
||||||
// overlay
|
|
||||||
getdisplay().drawRect(x, y, w, h, commonData.fgcolor);
|
|
||||||
getdisplay().fillRect(x + 1, y + 1, w - 1, h - 1, commonData.bgcolor);
|
|
||||||
getdisplay().drawRect(x + 3, y + 3, w - 5, h - 5, commonData.fgcolor);
|
|
||||||
|
|
||||||
// exclamation icon in left top corner
|
|
||||||
getdisplay().drawXBitmap(x + 16, y + 16, exclamation_bits, exclamation_width, exclamation_height, commonData.fgcolor);
|
|
||||||
|
|
||||||
// title
|
|
||||||
getdisplay().setCursor(x + 64, y + 30);
|
|
||||||
getdisplay().print("A L A R M");
|
|
||||||
getdisplay().setCursor(x + 64, y + 48);
|
|
||||||
getdisplay().print("#" + commonData.alarm.id);
|
|
||||||
getdisplay().print(" from ");
|
|
||||||
getdisplay().print(commonData.alarm.source);
|
|
||||||
|
|
||||||
// message, but maximum 4 lines
|
|
||||||
std::vector<String> lines = wordwrap (commonData.alarm.message, w - 16 - 8 / 8);
|
|
||||||
int n = 0;
|
|
||||||
for (const auto& l : lines) {
|
|
||||||
getdisplay().setCursor(x + 16, y + 80 + n);
|
|
||||||
getdisplay().print(l);
|
|
||||||
n += 16;
|
|
||||||
if (n > 64) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
drawTextCenter(x + w / 2, y + h - 16, "Press button 1 to dismiss alarm");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sunset und sunrise calculation
|
// Sunset und sunrise calculation
|
||||||
SunData calcSunsetSunrise(double time, double date, double latitude, double longitude, float timezone){
|
SunData calcSunsetSunrise(double time, double date, double latitude, double longitude, float timezone){
|
||||||
SunData returnset;
|
SunData returnset;
|
||||||
|
|
|
@ -67,11 +67,6 @@ GxEPD2_BW<GxEPD2_420_GYE042A87, GxEPD2_420_GYE042A87::HEIGHT> & getdisplay();
|
||||||
GxEPD2_BW<GxEPD2_420_SE0420NQ04, GxEPD2_420_SE0420NQ04::HEIGHT> & getdisplay();
|
GxEPD2_BW<GxEPD2_420_SE0420NQ04, GxEPD2_420_SE0420NQ04::HEIGHT> & getdisplay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Page display return values
|
|
||||||
#define PAGE_OK 0 // all ok, do nothing
|
|
||||||
#define PAGE_UPDATE 1 // page wants display to update
|
|
||||||
#define PAGE_HIBERNATE 2 // page wants displey to hibernate
|
|
||||||
|
|
||||||
struct Point {
|
struct Point {
|
||||||
double x;
|
double x;
|
||||||
double y;
|
double y;
|
||||||
|
@ -112,7 +107,6 @@ void displayTrendLow(int16_t x, int16_t y, uint16_t size, uint16_t color);
|
||||||
|
|
||||||
void displayHeader(CommonData &commonData, GwApi::BoatValue *date, GwApi::BoatValue *time, GwApi::BoatValue *hdop); // Draw display header
|
void displayHeader(CommonData &commonData, GwApi::BoatValue *date, GwApi::BoatValue *time, GwApi::BoatValue *hdop); // Draw display header
|
||||||
void displayFooter(CommonData &commonData);
|
void displayFooter(CommonData &commonData);
|
||||||
void displayAlarm(CommonData &commonData);
|
|
||||||
|
|
||||||
SunData calcSunsetSunrise(double time, double date, double latitude, double longitude, float timezone); // Calulate sunset and sunrise
|
SunData calcSunsetSunrise(double time, double date, double latitude, double longitude, float timezone); // Calulate sunset and sunrise
|
||||||
SunData calcSunsetSunriseRTC(struct tm *rtctime, double latitude, double longitude, float timezone);
|
SunData calcSunsetSunriseRTC(struct tm *rtctime, double latitude, double longitude, float timezone);
|
||||||
|
@ -158,12 +152,12 @@ static unsigned char fram_bits[] PROGMEM = {
|
||||||
0xff, 0xff, 0xf8, 0x1f, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f,
|
0xff, 0xff, 0xf8, 0x1f, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f,
|
||||||
0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f };
|
0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f };
|
||||||
|
|
||||||
static unsigned char ap_bits[] PROGMEM = {
|
static unsigned char ap_bits[] = {
|
||||||
0xe0, 0x03, 0x18, 0x0c, 0x04, 0x10, 0xc2, 0x21, 0x30, 0x06, 0x08, 0x08,
|
0xe0, 0x03, 0x18, 0x0c, 0x04, 0x10, 0xc2, 0x21, 0x30, 0x06, 0x08, 0x08,
|
||||||
0xc0, 0x01, 0x20, 0x02, 0x00, 0x00, 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01,
|
0xc0, 0x01, 0x20, 0x02, 0x00, 0x00, 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01,
|
||||||
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00 };
|
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00 };
|
||||||
|
|
||||||
static unsigned char dish_bits[] PROGMEM = {
|
static unsigned char dish_bits[] PROGMEM= {
|
||||||
0x3c, 0x00, 0x42, 0x18, 0xfa, 0x1b, 0x02, 0x04, 0x02, 0x0a, 0x02, 0x09,
|
0x3c, 0x00, 0x42, 0x18, 0xfa, 0x1b, 0x02, 0x04, 0x02, 0x0a, 0x02, 0x09,
|
||||||
0x82, 0x08, 0x06, 0x0a, 0x0e, 0x1b, 0x9c, 0x2b, 0x38, 0x2b, 0x74, 0x20,
|
0x82, 0x08, 0x06, 0x0a, 0x0e, 0x1b, 0x9c, 0x2b, 0x38, 0x2b, 0x74, 0x20,
|
||||||
0xec, 0x1f, 0x1c, 0x00, 0xf4, 0x00, 0xfe, 0x03 };
|
0xec, 0x1f, 0x1c, 0x00, 0xf4, 0x00, 0xfe, 0x03 };
|
||||||
|
|
|
@ -20,7 +20,7 @@ class PageBME280 : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -176,7 +176,9 @@ class PageBME280 : public Page
|
||||||
// Show bus data
|
// Show bus data
|
||||||
getdisplay().print(svalue3); // Real value as formated string
|
getdisplay().print(svalue3); // Real value as formated string
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class PageBattery : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -288,7 +288,9 @@ class PageBattery : public Page
|
||||||
getdisplay().print("---"); // No sensor data (sensor is off)
|
getdisplay().print("---"); // No sensor data (sensor is off)
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData)
|
virtual void displayPage(PageData &pageData)
|
||||||
{
|
{
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
@ -334,7 +334,8 @@ public:
|
||||||
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
||||||
getdisplay().print("W");
|
getdisplay().print("W");
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ bool homevalid = false; // homelat and homelon are valid
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData)
|
virtual void displayPage(PageData &pageData)
|
||||||
{
|
{
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
@ -162,7 +162,7 @@ bool homevalid = false; // homelat and homelon are valid
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageClock, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageClock, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -438,7 +438,9 @@ bool homevalid = false; // homelat and homelon are valid
|
||||||
getdisplay().fillCircle(200, 150, startwidth + 6, commonData->bgcolor);
|
getdisplay().fillCircle(200, 150, startwidth + 6, commonData->bgcolor);
|
||||||
getdisplay().fillCircle(200, 150, startwidth + 4, commonData->fgcolor);
|
getdisplay().fillCircle(200, 150, startwidth + 4, commonData->fgcolor);
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ class PageCompass : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ class PageCompass : public Page
|
||||||
setFlashLED(false);
|
setFlashLED(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bvalue == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue == NULL) return;
|
||||||
|
|
||||||
//***********************************************************
|
//***********************************************************
|
||||||
|
|
||||||
|
@ -235,11 +235,12 @@ class PageCompass : public Page
|
||||||
// if ( x_test > 390)
|
// if ( x_test > 390)
|
||||||
// x_test = 320;
|
// x_test = 320;
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static Page *createPage(CommonData &common){
|
static Page *createPage(CommonData &common){
|
||||||
return new PageCompass(common);
|
return new PageCompass(common);
|
||||||
}/**
|
}/**
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageDST810, %s: %f, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageDST810, %s: %f, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -242,7 +242,9 @@ public:
|
||||||
unit4old = unit4; // Save the old unit
|
unit4old = unit4; // Save the old unit
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ class PageFluid : public Page
|
||||||
commonData->logger->logDebug(GwLog::LOG,"New PageFluid: fluidtype=%d", fluidtype);
|
commonData->logger->logDebug(GwLog::LOG,"New PageFluid: fluidtype=%d", fluidtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -252,7 +252,9 @@ class PageFluid : public Page
|
||||||
getdisplay().fillCircle(c.x, c.y, 6, commonData->bgcolor);
|
getdisplay().fillCircle(c.x, c.y, 6, commonData->bgcolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class PageFourValues : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ class PageFourValues : public Page
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageFourValues, %s: %f, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageFourValues, %s: %f, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -287,7 +287,9 @@ class PageFourValues : public Page
|
||||||
unit4old = unit4; // Save the old unit
|
unit4old = unit4; // Save the old unit
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class PageFourValues2 : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ class PageFourValues2 : public Page
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageFourValues2, %s: %f, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageFourValues2, %s: %f, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -287,7 +287,9 @@ class PageFourValues2 : public Page
|
||||||
unit4old = unit4; // Save the old unit
|
unit4old = unit4; // Save the old unit
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData)
|
virtual void displayPage(PageData &pageData)
|
||||||
{
|
{
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
@ -203,7 +203,8 @@ public:
|
||||||
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
||||||
getdisplay().print("W");
|
getdisplay().print("W");
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData)
|
virtual void displayPage(PageData &pageData)
|
||||||
{
|
{
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
@ -206,7 +206,9 @@ public:
|
||||||
getdisplay().print("No sensor data"); // Info missing sensor
|
getdisplay().print("No sensor data"); // Info missing sensor
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class PageOneValue : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class PageOneValue : public Page
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageOneValue, %s: %f", name1.c_str(), value1);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageOneValue, %s: %f", name1.c_str(), value1);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -104,7 +104,9 @@ class PageOneValue : public Page
|
||||||
unit1old = unit1; // Save the old unit
|
unit1old = unit1; // Save the old unit
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageRollPitch, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageRollPitch, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -305,7 +305,9 @@ public:
|
||||||
getdisplay().print("No sensor data"); // Info missing sensor
|
getdisplay().print("No sensor data"); // Info missing sensor
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageRudderPosition, %s:%f", name1.c_str(), value1);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageRudderPosition, %s:%f", name1.c_str(), value1);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -207,7 +207,8 @@ public:
|
||||||
getdisplay().fillCircle(200, 150, startwidth + 6, commonData->bgcolor);
|
getdisplay().fillCircle(200, 150, startwidth + 6, commonData->bgcolor);
|
||||||
getdisplay().fillCircle(200, 150, startwidth + 4, commonData->fgcolor);
|
getdisplay().fillCircle(200, 150, startwidth + 4, commonData->fgcolor);
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class PageSixValues : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class PageSixValues : public Page
|
||||||
setFlashLED(false);
|
setFlashLED(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bvalue == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue == NULL) return;
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
//***********************************************************
|
//***********************************************************
|
||||||
|
@ -149,7 +149,9 @@ class PageSixValues : public Page
|
||||||
getdisplay().fillRect(SixValues_x1+SixValues_DeltaX-8, SixValues_y1+i*SixValues_DeltaY, 3, SixValues_DeltaY, commonData->fgcolor);
|
getdisplay().fillRect(SixValues_x1+SixValues_DeltaX-8, SixValues_y1+i*SixValues_DeltaY, 3, SixValues_DeltaY, commonData->fgcolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -199,7 +199,8 @@ public:
|
||||||
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
||||||
getdisplay().print("W");
|
getdisplay().print("W");
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ public:
|
||||||
|
|
||||||
// Update display
|
// Update display
|
||||||
getdisplay().nextPage(); // Partial update (fast)
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
return PAGE_OK;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class PageThreeValues : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class PageThreeValues : public Page
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageThreeValues, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageThreeValues, %s: %f, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -226,7 +226,8 @@ class PageThreeValues : public Page
|
||||||
unit3old = unit3; // Save the old unit
|
unit3old = unit3; // Save the old unit
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class PageTwoValues : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class PageTwoValues : public Page
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageTwoValues, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageTwoValues, %s: %f, %s: %f", name1.c_str(), value1, name2.c_str(), value2);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -166,7 +166,8 @@ class PageTwoValues : public Page
|
||||||
unit2old = unit2; // Save the old unit
|
unit2old = unit2; // Save the old unit
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public:
|
||||||
getdisplay().fillRect(x + 16, y + 11, 6, 3, color);
|
getdisplay().fillRect(x + 16, y + 11, 6, 3, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -383,7 +383,8 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -67,13 +67,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update display
|
// Update display
|
||||||
// getdisplay().nextPage();
|
getdisplay().nextPage();
|
||||||
int ret = PAGE_UPDATE;
|
|
||||||
if (mode == 'W') {
|
if (mode == 'W') {
|
||||||
//getdisplay().hibernate();
|
getdisplay().hibernate();
|
||||||
ret |= PAGE_HIBERNATE;
|
|
||||||
}
|
}
|
||||||
return ret;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -296,7 +296,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData)
|
virtual void displayPage(PageData &pageData)
|
||||||
{
|
{
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
@ -354,7 +354,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageWind, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageWind, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -618,7 +618,9 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageWindRose, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4, name5.c_str(), value5, name6.c_str(), value6);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageWindRose, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4, name5.c_str(), value5, name6.c_str(), value6);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -357,7 +357,8 @@ public:
|
||||||
getdisplay().print(unit6old); // Unit
|
getdisplay().print(unit6old); // Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public:
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging boat values
|
// Logging boat values
|
||||||
if (bvalue1 == NULL) return PAGE_OK; // WTF why this statement?
|
if (bvalue1 == NULL) return;
|
||||||
LOG_DEBUG(GwLog::LOG,"Drawing at PageWindRoseFlex, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4, name5.c_str(), value5, name6.c_str(), value6);
|
LOG_DEBUG(GwLog::LOG,"Drawing at PageWindRoseFlex, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f, %s:%f", name1.c_str(), value1, name2.c_str(), value2, name3.c_str(), value3, name4.c_str(), value4, name5.c_str(), value5, name6.c_str(), value6);
|
||||||
|
|
||||||
// Draw page
|
// Draw page
|
||||||
|
@ -362,7 +362,8 @@ if ( cos(value1) > 0){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ class PageXTETrack : public Page
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displayPage(PageData &pageData){
|
virtual void displayPage(PageData &pageData){
|
||||||
GwConfigHandler *config = commonData->config;
|
GwConfigHandler *config = commonData->config;
|
||||||
GwLog *logger = commonData->logger;
|
GwLog *logger = commonData->logger;
|
||||||
|
|
||||||
|
@ -207,7 +207,9 @@ class PageXTETrack : public Page
|
||||||
drawSegment(399, 100, 318, 24, 289, 24, 350, 100, commonData->fgcolor, seg[4]);
|
drawSegment(399, 100, 318, 24, 289, 24, 350, 100, commonData->fgcolor, seg[4]);
|
||||||
drawSegment(399, 54, 354, 24, 325, 24, 399, 90, commonData->fgcolor, seg[5]);
|
drawSegment(399, 54, 354, 24, 325, 24, 399, 90, commonData->fgcolor, seg[5]);
|
||||||
|
|
||||||
return PAGE_UPDATE;
|
// Update display
|
||||||
|
getdisplay().nextPage(); // Partial update (fast)
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -78,22 +78,6 @@ typedef struct{
|
||||||
bool on; // fast on/off detector
|
bool on; // fast on/off detector
|
||||||
} BacklightData;
|
} BacklightData;
|
||||||
|
|
||||||
enum AlarmSource {
|
|
||||||
Alarm_Generic,
|
|
||||||
Alarm_Local,
|
|
||||||
Alarm_NMEA0183,
|
|
||||||
Alarm_NMEA2000
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct{
|
|
||||||
uint8_t id; // alarm-id e.g. 01..99 from NMEA0183
|
|
||||||
AlarmSource source;
|
|
||||||
String message; // single line of plain text
|
|
||||||
bool active = false;
|
|
||||||
uint8_t signal; // how to signal MESSAGE | LED | BUZZER
|
|
||||||
uint8_t length_sec; // seconds until alarm disappeares without user interaction
|
|
||||||
} AlarmData;
|
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
GwApi::Status status;
|
GwApi::Status status;
|
||||||
GwLog *logger=NULL;
|
GwLog *logger=NULL;
|
||||||
|
@ -102,7 +86,6 @@ typedef struct{
|
||||||
SunData sundata;
|
SunData sundata;
|
||||||
TouchKeyData keydata[6];
|
TouchKeyData keydata[6];
|
||||||
BacklightData backlight;
|
BacklightData backlight;
|
||||||
AlarmData alarm;
|
|
||||||
GwApi::BoatValue *time=NULL;
|
GwApi::BoatValue *time=NULL;
|
||||||
GwApi::BoatValue *date=NULL;
|
GwApi::BoatValue *date=NULL;
|
||||||
uint16_t fgcolor;
|
uint16_t fgcolor;
|
||||||
|
@ -117,7 +100,7 @@ class Page{
|
||||||
CommonData *commonData;
|
CommonData *commonData;
|
||||||
public:
|
public:
|
||||||
int refreshtime = 1000;
|
int refreshtime = 1000;
|
||||||
virtual int displayPage(PageData &pageData)=0;
|
virtual void displayPage(PageData &pageData)=0;
|
||||||
virtual void displayNew(PageData &pageData){}
|
virtual void displayNew(PageData &pageData){}
|
||||||
virtual void setupKeys() {
|
virtual void setupKeys() {
|
||||||
#ifdef HARDWARE_V21
|
#ifdef HARDWARE_V21
|
||||||
|
|
|
@ -845,16 +845,7 @@ void OBP60Task(GwApi *api){
|
||||||
if (pages[pageNumber].description && pages[pageNumber].description->header){
|
if (pages[pageNumber].description && pages[pageNumber].description->header){
|
||||||
displayFooter(commonData);
|
displayFooter(commonData);
|
||||||
}
|
}
|
||||||
int ret = currentPage->displayPage(pages[pageNumber].parameters);
|
currentPage->displayPage(pages[pageNumber].parameters);
|
||||||
if (commonData.alarm.active) {
|
|
||||||
displayAlarm(commonData);
|
|
||||||
}
|
|
||||||
if (ret & PAGE_UPDATE) {
|
|
||||||
getdisplay().nextPage(); // Partial update (fast)
|
|
||||||
}
|
|
||||||
if (ret & PAGE_HIBERNATE) {
|
|
||||||
getdisplay().hibernate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ lib_deps =
|
||||||
paulstoffregen/OneWire@2.3.8
|
paulstoffregen/OneWire@2.3.8
|
||||||
milesburton/DallasTemperature@3.11.0
|
milesburton/DallasTemperature@3.11.0
|
||||||
signetica/SunRise@2.0.2
|
signetica/SunRise@2.0.2
|
||||||
adafruit/Adafruit FRAM I2C@2.0.3
|
adafruit/Adafruit FRAM I2C@^2.0.3
|
||||||
build_flags=
|
build_flags=
|
||||||
#https://thingpulse.com/usb-settings-for-logging-with-the-esp32-s3-in-platformio/?srsltid=AfmBOopGskbkr4GoeVkNlFaZXe_zXkLceKF6Rn-tmoXABCeAR2vWsdHL
|
#https://thingpulse.com/usb-settings-for-logging-with-the-esp32-s3-in-platformio/?srsltid=AfmBOopGskbkr4GoeVkNlFaZXe_zXkLceKF6Rn-tmoXABCeAR2vWsdHL
|
||||||
# -D CORE_DEBUG_LEVEL=1 #Debug level for CPU core via CDC (seral device)
|
# -D CORE_DEBUG_LEVEL=1 #Debug level for CPU core via CDC (seral device)
|
||||||
|
@ -91,7 +91,7 @@ lib_deps =
|
||||||
paulstoffregen/OneWire@2.3.8
|
paulstoffregen/OneWire@2.3.8
|
||||||
milesburton/DallasTemperature@3.11.0
|
milesburton/DallasTemperature@3.11.0
|
||||||
signetica/SunRise@2.0.2
|
signetica/SunRise@2.0.2
|
||||||
adafruit/Adafruit FRAM I2C@2.0.3
|
adafruit/Adafruit FRAM I2C@^2.0.3
|
||||||
build_flags=
|
build_flags=
|
||||||
-D DISABLE_DIAGNOSTIC_OUTPUT #Disable diagnostic output for GxEPD2 lib
|
-D DISABLE_DIAGNOSTIC_OUTPUT #Disable diagnostic output for GxEPD2 lib
|
||||||
-D BOARD_OBP40S3 #Board OBP40 with ESP32S3
|
-D BOARD_OBP40S3 #Board OBP40 with ESP32S3
|
||||||
|
|
Loading…
Reference in New Issue