mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 23:13:07 +01:00
Merge branch 'norbert-walter:master' into PageWindPlot
This commit is contained in:
@@ -87,6 +87,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;
|
||||
@@ -95,6 +111,7 @@ typedef struct{
|
||||
SunData sundata;
|
||||
TouchKeyData keydata[6];
|
||||
BacklightData backlight;
|
||||
AlarmData alarm;
|
||||
GwApi::BoatValue *time=NULL;
|
||||
GwApi::BoatValue *date=NULL;
|
||||
uint16_t fgcolor;
|
||||
@@ -109,7 +126,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
|
||||
@@ -177,6 +194,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{
|
||||
|
||||
Reference in New Issue
Block a user