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

Merge branch 'PageWindPlot' of https://github.com/Scorgan01/esp32-nmea2000-obp60 into PageWindPlot

This commit is contained in:
Ulrich Meine
2025-07-25 08:43:01 +02:00
37 changed files with 501 additions and 175 deletions

View File

@@ -82,6 +82,22 @@ typedef struct{
bool on; // fast on/off detector
} 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{
GwApi::Status status;
GwLog *logger=NULL;
@@ -90,6 +106,7 @@ typedef struct{
SunData sundata;
TouchKeyData keydata[6];
BacklightData backlight;
AlarmData alarm;
GwApi::BoatValue *time=NULL;
GwApi::BoatValue *date=NULL;
uint16_t fgcolor;
@@ -104,7 +121,7 @@ class Page{
CommonData *commonData;
public:
int refreshtime = 1000;
virtual void displayPage(PageData &pageData)=0;
virtual int displayPage(PageData &pageData)=0;
virtual void displayNew(PageData &pageData){}
virtual void setupKeys() {
#ifdef HARDWARE_V21
@@ -172,6 +189,8 @@ class PageStruct{
// Standard format functions without overhead
String formatDate(String fmttype, uint16_t year, uint8_t month, uint8_t day);
String formatTime(char fmttype, uint8_t hour, uint8_t minute, uint8_t second);
String formatLatitude(double lat);
String formatLongitude(double lon);
// Structure for formatted boat values
typedef struct{