First working system page
This commit is contained in:
		
							parent
							
								
									9d395c719a
								
							
						
					
					
						commit
						a73f50ba74
					
				|  | @ -36,6 +36,7 @@ extern const GFXfont DSEG7Classic_BoldItalic20pt7b; | ||||||
| extern const GFXfont DSEG7Classic_BoldItalic30pt7b; | extern const GFXfont DSEG7Classic_BoldItalic30pt7b; | ||||||
| extern const GFXfont DSEG7Classic_BoldItalic42pt7b; | extern const GFXfont DSEG7Classic_BoldItalic42pt7b; | ||||||
| extern const GFXfont DSEG7Classic_BoldItalic60pt7b; | extern const GFXfont DSEG7Classic_BoldItalic60pt7b; | ||||||
|  | extern const GFXfont Atari16px; | ||||||
| 
 | 
 | ||||||
| // Global functions
 | // Global functions
 | ||||||
| #ifdef DISPLAY_GDEW042T2 | #ifdef DISPLAY_GDEW042T2 | ||||||
|  |  | ||||||
|  | @ -144,14 +144,14 @@ void initKeys(CommonData &commonData) { | ||||||
|         logger->logDebug(GwLog::LOG,"Very short 20ms key touch: %d", keycode); |         logger->logDebug(GwLog::LOG,"Very short 20ms key touch: %d", keycode); | ||||||
| 
 | 
 | ||||||
|         // Process only valid keys
 |         // Process only valid keys
 | ||||||
|         //if(keycode == 1 || keycode == 6){
 |         if(keycode == 1 || keycode == 4 || keycode == 5 || keycode == 6){ | ||||||
|           keycode2 = keycode; |           keycode2 = keycode; | ||||||
|         //}
 |         } | ||||||
|         // Clear by invalid keys
 |         // Clear by invalid keys
 | ||||||
|         //else{
 |         else{ | ||||||
|         //  keycode2 = 0;
 |           keycode2 = 0; | ||||||
|         //  keycodeold2 = 0;
 |           keycodeold2 = 0; | ||||||
|         //}
 |         } | ||||||
|       } |       } | ||||||
|       // Timeout for very short pressed key
 |       // Timeout for very short pressed key
 | ||||||
|       if(millis() > starttime + 200){ |       if(millis() > starttime + 200){ | ||||||
|  |  | ||||||
|  | @ -5,6 +5,10 @@ | ||||||
| #include "images/logo64.xbm" | #include "images/logo64.xbm" | ||||||
| #include <esp_clk.h> | #include <esp_clk.h> | ||||||
| 
 | 
 | ||||||
|  | #define STRINGIZE_IMPL(x) #x | ||||||
|  | #define STRINGIZE(x) STRINGIZE_IMPL(x) | ||||||
|  | #define VERSINFO STRINGIZE(GWDEVVERSION) | ||||||
|  | 
 | ||||||
| /*
 | /*
 | ||||||
|  * Special system page, called directly with fast key sequence 5,4 |  * Special system page, called directly with fast key sequence 5,4 | ||||||
|  * Out of normal page order. |  * Out of normal page order. | ||||||
|  | @ -14,10 +18,12 @@ class PageSystem : public Page | ||||||
| { | { | ||||||
| uint64_t chipid; | uint64_t chipid; | ||||||
| bool simulation; | bool simulation; | ||||||
| String env_sensor; |  | ||||||
| String buzzer_mode; | String buzzer_mode; | ||||||
| uint8_t buzzer_power; | uint8_t buzzer_power; | ||||||
| String cpuspeed; | String cpuspeed; | ||||||
|  | String rtc_module; | ||||||
|  | String gps_module; | ||||||
|  | String env_module; | ||||||
| 
 | 
 | ||||||
| char mode = 'N'; // (N)ormal, (D)evice list
 | char mode = 'N'; // (N)ormal, (D)evice list
 | ||||||
| 
 | 
 | ||||||
|  | @ -27,12 +33,12 @@ public: | ||||||
|         common.logger->logDebug(GwLog::LOG,"Instantiate PageSystem"); |         common.logger->logDebug(GwLog::LOG,"Instantiate PageSystem"); | ||||||
|         chipid = ESP.getEfuseMac(); |         chipid = ESP.getEfuseMac(); | ||||||
|         simulation = common.config->getBool(common.config->useSimuData); |         simulation = common.config->getBool(common.config->useSimuData); | ||||||
|         env_sensor = common.config->getString(common.config->useEnvSensor); |  | ||||||
|         buzzer_mode = common.config->getString(common.config->buzzerMode); |         buzzer_mode = common.config->getString(common.config->buzzerMode); | ||||||
|         buzzer_power = common.config->getInt(common.config->buzzerPower); |         buzzer_power = common.config->getInt(common.config->buzzerPower); | ||||||
|         cpuspeed = common.config->getString(common.config->cpuSpeed); |         cpuspeed = common.config->getString(common.config->cpuSpeed); | ||||||
|         // useRTC off oder typ
 |         env_module = common.config->getString(common.config->useEnvSensor); | ||||||
|         // useGPS off oder typ
 |         rtc_module = common.config->getString(common.config->useRTC); | ||||||
|  |         gps_module = common.config->getString(common.config->useGPS); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual void setupKeys(){ |     virtual void setupKeys(){ | ||||||
|  | @ -46,8 +52,8 @@ public: | ||||||
| 
 | 
 | ||||||
|     virtual int handleKey(int key){ |     virtual int handleKey(int key){ | ||||||
|         // do *NOT* handle key #1 this handled by obp60task as exit
 |         // do *NOT* handle key #1 this handled by obp60task as exit
 | ||||||
| 
 |  | ||||||
|         // Switch display mode
 |         // Switch display mode
 | ||||||
|  |         commonData->logger->logDebug(GwLog::LOG, "System keyboard handler"); | ||||||
|         if (key == 2) { |         if (key == 2) { | ||||||
|             if (mode == 'N') { |             if (mode == 'N') { | ||||||
|                 mode = 'D'; |                 mode = 'D'; | ||||||
|  | @ -57,6 +63,10 @@ public: | ||||||
|             if (hasFRAM) fram.write(FRAM_VOLTAGE_MODE, mode); |             if (hasFRAM) fram.write(FRAM_VOLTAGE_MODE, mode); | ||||||
|             return 0; |             return 0; | ||||||
|         } |         } | ||||||
|  |         // grab cursor keys to disable page navigation
 | ||||||
|  |         if (key == 3 or key == 4) { | ||||||
|  |             return 0; | ||||||
|  |         } | ||||||
|         // Code for keylock
 |         // Code for keylock
 | ||||||
|         if (key == 11) { |         if (key == 11) { | ||||||
|             commonData->keylock = !commonData->keylock; |             commonData->keylock = !commonData->keylock; | ||||||
|  | @ -94,6 +104,8 @@ public: | ||||||
|             getdisplay().setCursor(20, 50); |             getdisplay().setCursor(20, 50); | ||||||
|             getdisplay().print("System Information"); |             getdisplay().print("System Information"); | ||||||
| 
 | 
 | ||||||
|  |             getdisplay().drawXBitmap(320, 25, logo64_bits, logo64_width, logo64_height, commonData->fgcolor); | ||||||
|  | 
 | ||||||
|             getdisplay().setFont(&Ubuntu_Bold8pt7b); |             getdisplay().setFont(&Ubuntu_Bold8pt7b); | ||||||
| 
 | 
 | ||||||
|             char ssid[23]; |             char ssid[23]; | ||||||
|  | @ -105,38 +117,65 @@ public: | ||||||
| 
 | 
 | ||||||
|             getdisplay().setCursor(2, y0); |             getdisplay().setCursor(2, y0); | ||||||
|             getdisplay().print("Simulation:"); |             getdisplay().print("Simulation:"); | ||||||
|             getdisplay().setCursor(140, y0); |             getdisplay().setCursor(120, y0); | ||||||
|             getdisplay().print(simulation ? "on" : "off"); |             getdisplay().print(simulation ? "on" : "off"); | ||||||
| 
 | 
 | ||||||
|             getdisplay().setCursor(202, y0); |             getdisplay().setCursor(202, y0); | ||||||
|             getdisplay().print("Wifi:"); |             getdisplay().print("Wifi:"); | ||||||
|             getdisplay().setCursor(340, y0); |             getdisplay().setCursor(300, y0); | ||||||
|             getdisplay().print("on"); |             getdisplay().print(commonData->status.wifiApOn ? "On" : "Off"); | ||||||
| 
 | 
 | ||||||
|             getdisplay().setCursor(2, y0 + 16); |             getdisplay().setCursor(2, y0 + 16); | ||||||
|             getdisplay().print("Environment:"); |             getdisplay().print("Environment:"); | ||||||
|             getdisplay().setCursor(140, y0 + 16); |             getdisplay().setCursor(120, y0 + 16); | ||||||
|             getdisplay().print(env_sensor); |             getdisplay().print(env_module); | ||||||
| 
 | 
 | ||||||
|             getdisplay().setCursor(2, y0 + 32); |             getdisplay().setCursor(2, y0 + 32); | ||||||
|             getdisplay().print("Buzzer:"); |             getdisplay().print("Buzzer:"); | ||||||
|             getdisplay().setCursor(140, y0 + 32); |             getdisplay().setCursor(120, y0 + 32); | ||||||
|             getdisplay().print(buzzer_mode); |             getdisplay().print(buzzer_mode); | ||||||
| 
 | 
 | ||||||
|             getdisplay().setCursor(2, y0 + 48); |             getdisplay().setCursor(2, y0 + 48); | ||||||
|             getdisplay().print("CPU speed:"); |             getdisplay().print("CPU speed:"); | ||||||
|             getdisplay().setCursor(140, y0 + 48); |             getdisplay().setCursor(120, y0 + 48); | ||||||
|             getdisplay().print(cpuspeed); |             getdisplay().print(cpuspeed); | ||||||
|             getdisplay().print(" "); |             getdisplay().print(" / "); | ||||||
|             int cpu_freq = esp_clk_cpu_freq(); |             int cpu_freq = esp_clk_cpu_freq() / 1000000; | ||||||
|             getdisplay().print(String(cpu_freq)); |             getdisplay().print(String(cpu_freq)); | ||||||
| 
 | 
 | ||||||
|             getdisplay().drawXBitmap(320, 25, logo64_bits, logo64_width, logo64_height, commonData->fgcolor); |             getdisplay().setCursor(2, y0 + 64); | ||||||
|  |             getdisplay().print("RTC:"); | ||||||
|  |             getdisplay().setCursor(120, y0 + 64); | ||||||
|  |             getdisplay().print(rtc_module); | ||||||
|  | 
 | ||||||
|  |             getdisplay().setCursor(202, y0 + 64); | ||||||
|  |             getdisplay().print("GPS:"); | ||||||
|  |             getdisplay().setCursor(300, y0 + 64); | ||||||
|  |             getdisplay().print(gps_module); | ||||||
|  | 
 | ||||||
|  |             getdisplay().setCursor(2, y0 + 80); | ||||||
|  |             getdisplay().print("FRAM:"); | ||||||
|  |             getdisplay().setCursor(120, y0 + 80); | ||||||
|  |             getdisplay().print(hasFRAM ? "available" : "not found"); | ||||||
|  | 
 | ||||||
|  |             getdisplay().setCursor(2, y0 + 120); | ||||||
|  |             getdisplay().print("Firmware Version: "); | ||||||
|  |             getdisplay().print(VERSINFO); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|         } else { |         } else { | ||||||
|             // NMEA2000 device list
 |             // NMEA2000 device list
 | ||||||
|             getdisplay().setFont(&Ubuntu_Bold12pt7b); |             getdisplay().setFont(&Ubuntu_Bold12pt7b); | ||||||
|             getdisplay().setCursor(20, 50); |             getdisplay().setCursor(20, 50); | ||||||
|             getdisplay().print("NMEA2000 device list"); |             getdisplay().print("NMEA2000 device list"); | ||||||
|  | 
 | ||||||
|  |             getdisplay().setFont(&Ubuntu_Bold8pt7b); | ||||||
|  |             getdisplay().setCursor(20, 80); | ||||||
|  |             getdisplay().print("RxD: "); | ||||||
|  |             getdisplay().print(String(commonData->status.n2kRx)); | ||||||
|  |             getdisplay().setCursor(20, 100); | ||||||
|  |             getdisplay().print("TxD: "); | ||||||
|  |             getdisplay().print(String(commonData->status.n2kTx)); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // Update display
 |         // Update display
 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,9 @@ | ||||||
|  | #ifndef _LOGO64_XBM_ | ||||||
|  | #define _LOGO64_XBM_ 1 | ||||||
|  | 
 | ||||||
| #define logo64_width 64 | #define logo64_width 64 | ||||||
| #define logo64_height 64 | #define logo64_height 64 | ||||||
| static unsigned char logo64_bits[] = { | static unsigned char logo64_bits[] PROGMEM = { | ||||||
|    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  | @ -44,3 +47,5 @@ static unsigned char logo64_bits[] = { | ||||||
|    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | ||||||
|  | 
 | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | @ -0,0 +1,171 @@ | ||||||
|  | #ifndef _UNKNOWN_XBM_ | ||||||
|  | #define _UNKNOWN_XBM_ 1 | ||||||
|  | 
 | ||||||
|  | #define unknown_width 120 | ||||||
|  | #define unknown_height 130 | ||||||
|  | static unsigned char unknown_bits[] PROGMEM = { | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xe0, 0xff, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x70, 0x80, 0xcf, 0x01, 0x00, 0x00, | ||||||
|  |    0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xf7, 0xc0, 0x7f, | ||||||
|  |    0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x80, | ||||||
|  |    0xff, 0xfb, 0x7b, 0x00, 0x00, 0xf8, 0x7f, 0xe0, 0x0f, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0xfc, 0x07, 0xb8, 0xff, 0xfb, 0x7f, 0x00, 0xff, 0x3f, 0xf8, 0x1f, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x9c, 0x0f, 0xd0, 0xff, 0xfd, 0x19, 0xe0, 0xff, | ||||||
|  |    0x0d, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0xf9, 0x3f, | ||||||
|  |    0x0d, 0xfc, 0x7f, 0x86, 0xff, 0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x07, | ||||||
|  |    0xfe, 0xc1, 0xdf, 0x07, 0xff, 0xc1, 0xe3, 0x3d, 0x03, 0x00, 0x00, 0x3f, | ||||||
|  |    0x00, 0x00, 0x07, 0x7e, 0x81, 0xff, 0x84, 0x7f, 0xf3, 0x7b, 0x07, 0x03, | ||||||
|  |    0x00, 0x00, 0x7e, 0x80, 0x3f, 0x0f, 0xf0, 0xc3, 0x3b, 0xe4, 0xdd, 0x9d, | ||||||
|  |    0xcf, 0x80, 0x01, 0x00, 0x00, 0x6c, 0x00, 0xff, 0x3f, 0xe0, 0x17, 0x9c, | ||||||
|  |    0x7f, 0xf7, 0xc3, 0x63, 0x80, 0x01, 0x00, 0x00, 0xfe, 0x0c, 0xf0, 0xfd, | ||||||
|  |    0xc3, 0x3c, 0xde, 0xfd, 0xef, 0xf8, 0x18, 0x80, 0x01, 0x00, 0x00, 0xfe, | ||||||
|  |    0x0e, 0xf0, 0x9f, 0x8f, 0x78, 0xcf, 0xfe, 0x1b, 0x3f, 0x0e, 0xc0, 0x00, | ||||||
|  |    0x00, 0x00, 0xfe, 0x1d, 0xf0, 0xff, 0x9f, 0x21, 0xcc, 0xfb, 0xe7, 0x8f, | ||||||
|  |    0x03, 0xc0, 0x00, 0x00, 0x00, 0xcc, 0x1f, 0xb0, 0xff, 0x1f, 0x00, 0xc0, | ||||||
|  |    0xbf, 0xb9, 0xc7, 0x01, 0xc0, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x3c, 0x1f, | ||||||
|  |    0xfe, 0x00, 0xfe, 0x6f, 0xfe, 0xf1, 0x01, 0xc0, 0x00, 0x00, 0xf8, 0xfb, | ||||||
|  |    0x1f, 0xbc, 0xfe, 0xff, 0xc0, 0xff, 0x9d, 0x7f, 0x7c, 0x00, 0x60, 0x00, | ||||||
|  |    0x00, 0xfc, 0xef, 0x1d, 0xfc, 0xc3, 0xff, 0xe9, 0xcf, 0xed, 0x1f, 0x1f, | ||||||
|  |    0x00, 0x60, 0x00, 0x00, 0xfe, 0xef, 0x1d, 0x00, 0x97, 0xf0, 0xf9, 0xcf, | ||||||
|  |    0xfd, 0x87, 0x07, 0x03, 0x60, 0x00, 0x00, 0xfe, 0xcc, 0x0c, 0x00, 0xfc, | ||||||
|  |    0x81, 0xff, 0xdf, 0xfd, 0xc0, 0xf9, 0x03, 0x60, 0x00, 0x00, 0xe4, 0xdc, | ||||||
|  |    0x0f, 0x00, 0xf8, 0x9f, 0xff, 0xdf, 0x3d, 0xe0, 0x0f, 0x00, 0x60, 0x00, | ||||||
|  |    0x00, 0xc0, 0xdf, 0x03, 0x00, 0xe0, 0xf1, 0xfe, 0xdf, 0x0c, 0xfe, 0xff, | ||||||
|  |    0x01, 0x60, 0x00, 0x00, 0xc0, 0xcf, 0x01, 0x00, 0x60, 0xf3, 0xff, 0xdb, | ||||||
|  |    0x06, 0xff, 0x01, 0x00, 0x70, 0x00, 0x00, 0x00, 0x8f, 0x01, 0x00, 0x78, | ||||||
|  |    0xff, 0x1f, 0x9b, 0x87, 0xff, 0xff, 0x0f, 0x30, 0x00, 0x00, 0x00, 0x66, | ||||||
|  |    0x03, 0x00, 0xfc, 0x7f, 0xfb, 0x99, 0xc7, 0xff, 0xff, 0x00, 0x30, 0x00, | ||||||
|  |    0x00, 0x00, 0x06, 0x03, 0x00, 0xc6, 0xff, 0xff, 0xd9, 0x67, 0xff, 0xc1, | ||||||
|  |    0x01, 0x70, 0x00, 0x00, 0x00, 0xc7, 0x03, 0x00, 0x07, 0x7c, 0xe3, 0xf9, | ||||||
|  |    0xe3, 0xff, 0x7f, 0x00, 0x70, 0x00, 0x00, 0x80, 0xf3, 0x07, 0x00, 0x1f, | ||||||
|  |    0x6c, 0xe0, 0x7b, 0xe3, 0xff, 0xff, 0x01, 0x70, 0x00, 0x00, 0x80, 0xd9, | ||||||
|  |    0x06, 0x80, 0xff, 0x0f, 0xce, 0xef, 0xe3, 0xff, 0xf7, 0x01, 0x70, 0x00, | ||||||
|  |    0x00, 0xe0, 0xbf, 0x0d, 0xc0, 0xff, 0x43, 0xe4, 0xef, 0xe3, 0x3f, 0x7f, | ||||||
|  |    0x07, 0x60, 0x00, 0x00, 0xe0, 0xbf, 0x1d, 0xe0, 0x78, 0x43, 0x70, 0xec, | ||||||
|  |    0xe1, 0xff, 0xf8, 0x1d, 0x60, 0x00, 0x00, 0xe0, 0xff, 0x19, 0x70, 0x00, | ||||||
|  |    0x03, 0x37, 0xfc, 0xf1, 0xbf, 0xc3, 0x07, 0x60, 0x00, 0x00, 0xc0, 0xff, | ||||||
|  |    0x19, 0x70, 0x80, 0x01, 0x3b, 0xd6, 0xf9, 0xef, 0x1c, 0x3e, 0x60, 0x00, | ||||||
|  |    0x00, 0x80, 0x63, 0x1b, 0xf0, 0xc6, 0x39, 0x19, 0xfe, 0xf8, 0xbf, 0x31, | ||||||
|  |    0xf8, 0x60, 0x00, 0x00, 0x00, 0x60, 0x3b, 0xf8, 0xfe, 0x98, 0x1f, 0xfe, | ||||||
|  |    0xf8, 0x7f, 0x67, 0xe0, 0x61, 0x00, 0x00, 0x00, 0x60, 0x33, 0xfc, 0x7f, | ||||||
|  |    0x80, 0x0f, 0xeb, 0xfc, 0xff, 0x0d, 0x80, 0xc7, 0x00, 0x00, 0x00, 0x60, | ||||||
|  |    0x33, 0x0c, 0x7f, 0x06, 0x0c, 0x7f, 0xec, 0x6f, 0x0b, 0x00, 0xfe, 0x00, | ||||||
|  |    0x00, 0x00, 0x60, 0x76, 0x0e, 0xf8, 0xbf, 0x87, 0x7f, 0xee, 0xdf, 0x00, | ||||||
|  |    0x00, 0xf8, 0x01, 0x00, 0x00, 0xc0, 0x76, 0x0e, 0xb8, 0xa0, 0x87, 0x3f, | ||||||
|  |    0xde, 0x3f, 0x01, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xc0, 0xf6, 0x0f, 0x3c, | ||||||
|  |    0x80, 0xdf, 0x3f, 0xdf, 0x77, 0x02, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, | ||||||
|  |    0xdd, 0xef, 0x1f, 0x80, 0xfe, 0x9f, 0xdf, 0xe7, 0x06, 0x00, 0xe0, 0x03, | ||||||
|  |    0x00, 0x00, 0x80, 0xfd, 0xfe, 0x1f, 0xcc, 0xff, 0xdf, 0xdf, 0xee, 0x18, | ||||||
|  |    0x00, 0xf0, 0x03, 0x00, 0x00, 0x80, 0xfd, 0xff, 0x1b, 0xdc, 0xf6, 0xcf, | ||||||
|  |    0xdf, 0xc0, 0x19, 0x00, 0x70, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x03, 0x98, | ||||||
|  |    0x01, 0xb6, 0xcf, 0x93, 0x80, 0x33, 0x00, 0x30, 0x00, 0x00, 0x00, 0x80, | ||||||
|  |    0x7f, 0x01, 0x1c, 0xc0, 0xfe, 0xff, 0x9f, 0x00, 0x03, 0x00, 0x30, 0x00, | ||||||
|  |    0x00, 0x00, 0x80, 0x9f, 0x01, 0x0c, 0xc0, 0xff, 0xe7, 0x9b, 0x01, 0x06, | ||||||
|  |    0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x0e, 0xcc, 0xff, 0xe3, | ||||||
|  |    0xbb, 0x01, 0x0c, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xcf, 0x07, | ||||||
|  |    0x8c, 0xff, 0xf9, 0xbb, 0x01, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x80, | ||||||
|  |    0xbf, 0xff, 0xcf, 0x1f, 0xdf, 0xfd, 0xbb, 0x09, 0x38, 0x00, 0x1c, 0x00, | ||||||
|  |    0x00, 0x00, 0x80, 0xfb, 0xff, 0x8d, 0xdf, 0x6f, 0xfc, 0xbb, 0x01, 0x70, | ||||||
|  |    0x00, 0x0c, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x8f, 0xff, 0x3f, 0xff, | ||||||
|  |    0xbb, 0x01, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xef, 0xe0, 0x8f, | ||||||
|  |    0xbf, 0x1f, 0xbf, 0xab, 0x09, 0xe0, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0xff, 0xf0, 0x8d, 0xd6, 0xc3, 0xbb, 0xab, 0x01, 0xc0, 0x01, 0x0e, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x7f, 0x31, 0x00, 0x7e, 0xe0, 0x39, 0xab, 0x19, 0x80, | ||||||
|  |    0x03, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x66, 0x19, 0x80, 0x79, 0x7c, 0x3c, | ||||||
|  |    0xa9, 0x01, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x19, 0x80, | ||||||
|  |    0x6d, 0x7e, 0x1c, 0xb1, 0x01, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0xe0, 0x1f, 0x80, 0x0d, 0x1c, 0x10, 0xb1, 0x01, 0x00, 0x06, 0x0e, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0xc0, 0x3f, 0x10, 0x00, 0x38, 0x00, 0xb1, 0x01, 0x00, | ||||||
|  |    0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3d, 0xb3, 0x00, 0x3b, 0x00, | ||||||
|  |    0xa1, 0x01, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe7, 0xf1, | ||||||
|  |    0xd8, 0x7f, 0x03, 0xb1, 0x01, 0x00, 0x1c, 0x06, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0xc3, 0xfb, 0xf0, 0x7f, 0x01, 0xb1, 0x01, 0x00, 0x18, 0x06, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x83, 0xfb, 0xf0, 0x7f, 0x01, 0xb1, 0x01, 0x00, | ||||||
|  |    0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x01, 0x7f, 0x00, | ||||||
|  |    0x80, 0x01, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f, | ||||||
|  |    0x01, 0xff, 0x07, 0x80, 0x01, 0x00, 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0xc0, 0xfd, 0x1d, 0x01, 0xfb, 0x3f, 0x80, 0x01, 0x00, 0x70, 0x06, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0xc0, 0xf0, 0xde, 0x67, 0x18, 0x7f, 0x80, 0x01, 0x00, | ||||||
|  |    0x60, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x78, 0xcf, 0x0f, 0x86, 0xfd, | ||||||
|  |    0x81, 0x01, 0x00, 0x65, 0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaf, 0xbf, | ||||||
|  |    0x3d, 0x80, 0xf9, 0x81, 0x01, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0xe0, 0xaf, 0xff, 0x78, 0x00, 0xe0, 0x83, 0x01, 0x7f, 0xf8, 0x01, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x70, 0xfe, 0x7f, 0x70, 0x20, 0x6c, 0x87, 0xe0, 0x07, | ||||||
|  |    0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x30, 0xf8, 0x0f, 0xf0, 0x30, 0x06, | ||||||
|  |    0xcf, 0xf8, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xdb, 0x0e, | ||||||
|  |    0xd8, 0x00, 0x30, 0xcf, 0x3c, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0xf8, 0xfb, 0x38, 0xfc, 0x01, 0x20, 0xcc, 0x0f, 0x00, 0x60, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x1c, 0x3e, 0xf8, 0xbf, 0x03, 0x06, 0xfd, 0x03, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x1e, 0xf8, 0xdf, 0x0f, 0x02, | ||||||
|  |    0xff, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0xf0, | ||||||
|  |    0x07, 0x3e, 0x30, 0xfa, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0xfe, 0x07, 0x00, 0x03, 0x78, 0x30, 0xfb, 0x03, 0x00, 0x80, 0x03, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0xff, 0x06, 0x00, 0xc3, 0xff, 0x00, 0xff, 0x1f, 0x00, | ||||||
|  |    0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x03, 0x00, 0xbf, 0xdf, 0x01, | ||||||
|  |    0xfe, 0x1f, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x01, 0x00, | ||||||
|  |    0xfe, 0x8f, 0x83, 0xef, 0x0f, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x80, | ||||||
|  |    0xef, 0x00, 0x00, 0xf8, 0x03, 0x83, 0xb1, 0x03, 0x00, 0x60, 0x03, 0x00, | ||||||
|  |    0x00, 0xe0, 0x80, 0x61, 0x00, 0x00, 0x80, 0x01, 0x04, 0xb0, 0x03, 0x03, | ||||||
|  |    0x30, 0x03, 0x00, 0x00, 0xfc, 0xc1, 0x30, 0x06, 0x00, 0x80, 0x01, 0x1e, | ||||||
|  |    0xa0, 0x87, 0x03, 0x30, 0x03, 0x00, 0x00, 0x7e, 0xff, 0xb8, 0x0f, 0x00, | ||||||
|  |    0x80, 0x8b, 0x1f, 0x04, 0x86, 0x03, 0x18, 0x03, 0x00, 0x00, 0xf6, 0x7f, | ||||||
|  |    0xf8, 0x3f, 0x00, 0x80, 0xff, 0x77, 0xfe, 0x86, 0x07, 0x0e, 0x01, 0x00, | ||||||
|  |    0x00, 0xfe, 0x19, 0x00, 0x76, 0x00, 0x00, 0xff, 0x63, 0xf6, 0x86, 0xfd, | ||||||
|  |    0x87, 0x01, 0x00, 0x00, 0xf6, 0x0f, 0x00, 0x7e, 0x00, 0x00, 0xfc, 0x60, | ||||||
|  |    0x00, 0x8c, 0xf3, 0x81, 0x01, 0x00, 0x00, 0x06, 0x06, 0xfe, 0x7c, 0x00, | ||||||
|  |    0x00, 0x70, 0xc0, 0x00, 0x8e, 0x07, 0x83, 0x01, 0x00, 0x00, 0xf8, 0xb3, | ||||||
|  |    0xff, 0x7f, 0x00, 0x00, 0x60, 0xc0, 0x9c, 0x0f, 0xff, 0xc1, 0x00, 0x00, | ||||||
|  |    0x00, 0xfc, 0xd9, 0x03, 0x3f, 0x00, 0x00, 0xe0, 0xc0, 0x80, 0x0d, 0x7e, | ||||||
|  |    0xc0, 0x00, 0x00, 0x00, 0x0e, 0xde, 0x00, 0x1c, 0x00, 0x00, 0xe0, 0xff, | ||||||
|  |    0x01, 0xfc, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0xde, 0xdf, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0xfe, 0xbf, 0x03, 0xfc, 0x00, 0x66, 0x00, 0x00, 0x00, 0xda, 0xcc, | ||||||
|  |    0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x62, 0x1f, 0x00, 0x67, 0x00, 0x00, | ||||||
|  |    0x00, 0x7e, 0xcc, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x03, 0xe3, 0x5f, 0xc1, | ||||||
|  |    0x33, 0x00, 0x00, 0x00, 0x3e, 0x8e, 0x01, 0x00, 0x00, 0xf8, 0xf1, 0x03, | ||||||
|  |    0x06, 0xfc, 0x7f, 0x33, 0x00, 0x00, 0x00, 0x0e, 0xde, 0x00, 0x00, 0x00, | ||||||
|  |    0x6e, 0xc0, 0x07, 0x0e, 0xfc, 0x1f, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x7c, | ||||||
|  |    0x00, 0x00, 0x00, 0x1f, 0xe2, 0x3f, 0xef, 0x7f, 0x00, 0x1b, 0x00, 0x00, | ||||||
|  |    0x00, 0x1c, 0x6c, 0x02, 0x00, 0x80, 0x07, 0xf8, 0xff, 0x47, 0x0c, 0x80, | ||||||
|  |    0x19, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x03, 0x00, 0xc0, 0x03, 0xfb, 0xff, | ||||||
|  |    0x0d, 0x0c, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x60, | ||||||
|  |    0x40, 0x3f, 0x18, 0x4c, 0x3d, 0x80, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xf0, | ||||||
|  |    0x01, 0x00, 0x70, 0x40, 0x1f, 0x18, 0xfc, 0x37, 0x80, 0x0b, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xb0, 0x1f, 0x18, 0x0c, 0x3e, 0x80, | ||||||
|  |    0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc8, 0x08, 0x78, | ||||||
|  |    0x2c, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, | ||||||
|  |    0x60, 0x00, 0xf8, 0xcf, 0x06, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x0c, 0x35, 0x00, 0xf8, 0x9f, 0x06, 0x00, 0xfe, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x36, 0x00, 0xf8, 0x77, 0x03, 0x00, | ||||||
|  |    0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x31, 0x00, 0xd8, | ||||||
|  |    0xdd, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, | ||||||
|  |    0x1a, 0x00, 0x08, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0xce, 0x1e, 0x00, 0x0c, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x18, 0x00, 0x0c, 0x8c, 0x01, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x1f, 0x00, 0x7c, | ||||||
|  |    0xef, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, | ||||||
|  |    0x1e, 0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0xce, 0xf0, 0x03, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0xfb, 0x01, 0x0c, 0x5f, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xef, 0x01, 0x06, | ||||||
|  |    0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, | ||||||
|  |    0xd7, 0x81, 0x87, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x3c, 0xdf, 0xc3, 0xc7, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xfe, 0xff, 0xff, 0x3b, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xfc, 0x7f, 0xfe, | ||||||
|  |    0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, | ||||||
|  |    0xfd, 0x7f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x80, 0x37, 0xe6, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf7, 0xe3, 0xff, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||||||
|  |    0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | ||||||
|  | 
 | ||||||
|  | #endif | ||||||
|  | @ -20,10 +20,10 @@ | ||||||
| //#include GxEPD_BitmapExamples         // Example picture
 | //#include GxEPD_BitmapExamples         // Example picture
 | ||||||
| #include "MFD_OBP60_400x300_sw.h"       // MFD with logo
 | #include "MFD_OBP60_400x300_sw.h"       // MFD with logo
 | ||||||
| #include "Logo_OBP_400x300_sw.h"        // OBP Logo
 | #include "Logo_OBP_400x300_sw.h"        // OBP Logo
 | ||||||
|  | #include "images/unknown.xbm"           // unknown page indicator
 | ||||||
| #include "OBP60QRWiFi.h"                // Functions lib for WiFi QR code
 | #include "OBP60QRWiFi.h"                // Functions lib for WiFi QR code
 | ||||||
| #include "OBPSensorTask.h"              // Functions lib for sensor data
 | #include "OBPSensorTask.h"              // Functions lib for sensor data
 | ||||||
| 
 | 
 | ||||||
| #include "LedSpiTask.h" |  | ||||||
| 
 | 
 | ||||||
| // Global vars
 | // Global vars
 | ||||||
| bool initComplete = false;      // Initialization complete
 | bool initComplete = false;      // Initialization complete
 | ||||||
|  | @ -408,6 +408,8 @@ void OBP60Task(GwApi *api){ | ||||||
|             pages[i].parameters.values.push_back(value);  |             pages[i].parameters.values.push_back(value);  | ||||||
|        } |        } | ||||||
|     } |     } | ||||||
|  |     // add out of band system page (always available)
 | ||||||
|  |     Page *syspage = allPages.pages[0]->creator(commonData); | ||||||
| 
 | 
 | ||||||
|     // Display screenshot handler for HTTP request
 |     // Display screenshot handler for HTTP request
 | ||||||
|     // http://192.168.15.1/api/user/OBP60Task/screenshot
 |     // http://192.168.15.1/api/user/OBP60Task/screenshot
 | ||||||
|  | @ -471,9 +473,6 @@ void OBP60Task(GwApi *api){ | ||||||
|     //####################################################################################
 |     //####################################################################################
 | ||||||
| 
 | 
 | ||||||
|     bool systemPage = false; |     bool systemPage = false; | ||||||
|     //PageDescription *description = allPages.find("System");
 |  | ||||||
|     // PageStruct syspagestruct;
 |  | ||||||
|     Page *syspage = allPages.pages[0]->creator(commonData); |  | ||||||
|     while (true){ |     while (true){ | ||||||
|         delay(100);     // Delay 100ms (loop time)
 |         delay(100);     // Delay 100ms (loop time)
 | ||||||
| 
 | 
 | ||||||
|  | @ -522,21 +521,22 @@ void OBP60Task(GwApi *api){ | ||||||
|                 if (keyboardMessage == 12) { |                 if (keyboardMessage == 12) { | ||||||
|                     LOG_DEBUG(GwLog::LOG, "Calling system page"); |                     LOG_DEBUG(GwLog::LOG, "Calling system page"); | ||||||
|                     systemPage = true; // System page is out of band
 |                     systemPage = true; // System page is out of band
 | ||||||
|                     currentPage = syspage; |  | ||||||
|                     syspage->setupKeys(); |                     syspage->setupKeys(); | ||||||
|                 } |                 } | ||||||
|                 else { |                 else { | ||||||
|  |                     currentPage = pages[pageNumber].page; | ||||||
|                     if (systemPage && keyboardMessage == 1) { |                     if (systemPage && keyboardMessage == 1) { | ||||||
|                         // exit system mode with exit key number 1
 |                         // exit system mode with exit key number 1
 | ||||||
|                         systemPage = false; |                         systemPage = false; | ||||||
|                         currentPage  = pages[pageNumber].page; |                         currentPage->setupKeys(); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
| 
 |                 if (systemPage) { | ||||||
|                 if (currentPage) { |                     keyboardMessage = syspage->handleKey(keyboardMessage); | ||||||
|                     keyboardMessage=currentPage->handleKey(keyboardMessage); |                 } else if (currentPage) { | ||||||
|  |                     keyboardMessage = currentPage->handleKey(keyboardMessage); | ||||||
|                 } |                 } | ||||||
|                 if (keyboardMessage > 0) |                 if (keyboardMessage > 0) // not handled by page
 | ||||||
|                 { |                 { | ||||||
|                     // Decoding all key codes
 |                     // Decoding all key codes
 | ||||||
|                     // #6 Backlight on if key controled
 |                     // #6 Backlight on if key controled
 | ||||||
|  | @ -649,26 +649,34 @@ void OBP60Task(GwApi *api){ | ||||||
|                 api->getBoatDataValues(boatValues.numValues,boatValues.allBoatValues); |                 api->getBoatDataValues(boatValues.numValues,boatValues.allBoatValues); | ||||||
|                 api->getStatus(commonData.status); |                 api->getStatus(commonData.status); | ||||||
| 
 | 
 | ||||||
|  |                 // Clear display
 | ||||||
|  |                 // getdisplay().fillRect(0, 0, getdisplay().width(), getdisplay().height(), commonData.bgcolor);
 | ||||||
|  |                 getdisplay().fillScreen(commonData.bgcolor);  // Clear display
 | ||||||
|  | 
 | ||||||
|                 // Show header if enabled
 |                 // Show header if enabled
 | ||||||
|                 getdisplay().fillRect(0, 0, getdisplay().width(), getdisplay().height(), commonData.bgcolor);   // Clear display
 |                 if (pages[pageNumber].description && pages[pageNumber].description->header or systemPage){ | ||||||
|                 if (pages[pageNumber].description && pages[pageNumber].description->header){ |  | ||||||
|                     // build header using commonData
 |                     // build header using commonData
 | ||||||
|                     getdisplay().fillScreen(commonData.bgcolor);  // Clear display
 |  | ||||||
|                     displayHeader(commonData, date, time, hdop);  // Show page header
 |                     displayHeader(commonData, date, time, hdop);  // Show page header
 | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 // Call the particular page
 |                 // Call the particular page
 | ||||||
|                 //Page *currentPage;
 |  | ||||||
|                 if (systemPage) { |                 if (systemPage) { | ||||||
|                     displayFooter(commonData); |                     displayFooter(commonData); | ||||||
|                     PageData sysparams; |                     PageData sysparams; // empty
 | ||||||
|                     syspage->displayPage(sysparams); |                     syspage->displayPage(sysparams); | ||||||
|                 } |                 } | ||||||
|                 else { |                 else { | ||||||
|                     Page *currentPage = pages[pageNumber].page; |                     Page *currentPage = pages[pageNumber].page; | ||||||
|                     if (currentPage == NULL){ |                     if (currentPage == NULL){ | ||||||
|                         LOG_DEBUG(GwLog::ERROR,"page number %d not found",pageNumber); |                         LOG_DEBUG(GwLog::ERROR,"page number %d not found", pageNumber); | ||||||
|                         // Error handling for missing page
 |                         // Error handling for missing page
 | ||||||
|  |                         getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update
 | ||||||
|  |                         getdisplay().fillScreen(commonData.bgcolor);  // Clear display
 | ||||||
|  |                         getdisplay().drawXBitmap(200 - unknown_width / 2, 150 - unknown_height / 2, unknown_bits, unknown_width, unknown_height, commonData.fgcolor); | ||||||
|  |                         getdisplay().setCursor(140, 250); | ||||||
|  |                         getdisplay().setFont(&Atari16px); | ||||||
|  |                         getdisplay().print("Here be dragons!"); | ||||||
|  |                         getdisplay().nextPage(); // Partial update (fast)
 | ||||||
|                     } |                     } | ||||||
|                     else{ |                     else{ | ||||||
|                         if (lastPage != pageNumber){ |                         if (lastPage != pageNumber){ | ||||||
|  | @ -687,7 +695,7 @@ void OBP60Task(GwApi *api){ | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|                 } |                 } | ||||||
|             } |             } // refresh display all 1s
 | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     vTaskDelete(NULL); |     vTaskDelete(NULL); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue