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

13 Commits

Author SHA1 Message Date
norbert-walter
87a7a79358 Change back to plaformio.ini OBP60 2025-01-19 00:23:22 +01:00
Norbert Walter
e7216e6d2b Merge branch 'wellenvogel:master' into master 2025-01-18 19:12:24 +01:00
Norbert Walter
e7f3430ed6 Merge pull request #141 from thooge/keyboard
Key label improvements: footer function
2025-01-18 19:10:33 +01:00
Norbert Walter
2c2d21535b Merge pull request #139 from TobiasE-github/master
Add SixValues and fix Fluid in gen_set.py
2025-01-18 19:06:40 +01:00
Tobias E
27b02c4860 removed obsolete perl script gen_set.pl 2025-01-18 13:59:37 +00:00
e917a7fc76 Modification of footer layout and new swipe icon 2025-01-17 21:23:41 +01:00
Tobias E
10552763fb add explanation to gen_set.py 2025-01-17 19:24:16 +00:00
Tobias E
24386d4d42 add explanation to gen_set.py 2025-01-17 19:23:26 +00:00
norbert-walter
49be7f117a Modify pad detectionfor OBP60 Light 2025-01-17 18:00:32 +01:00
TobiasE-github
e70660c981 Merge branch 'norbert-walter:master' into master 2025-01-14 20:39:25 +01:00
TobiasE-github
4395c623ea Merge branch 'norbert-walter:master' into master 2025-01-13 06:30:15 +01:00
Tobias E
dfc79c80dc Add SixValues and fix Fluid in gen_set.py 2025-01-12 21:40:39 +00:00
wellenvogel
a129d865c9 warn the user if page translation is enabled for cibuild 2024-12-10 19:16:11 +01:00
9 changed files with 132 additions and 183 deletions

View File

@@ -2,5 +2,5 @@ Craete new page for OBP60
1. Create page under /lib/obp60task/PageXXXX.cpp 1. Create page under /lib/obp60task/PageXXXX.cpp
2. Set page name in PageXXXX.cpp on file name 2. Set page name in PageXXXX.cpp on file name
3. Register new page in /lib/obp60task/obp60task.cpp line 242 (registerAllPages) 3. Register new page in /lib/obp60task/obp60task.cpp line 242 (registerAllPages)
4. Add new page in /lib/obp60task/config.json for each page type or add new page to gen_set.pl and run it to auto-generate the relevant section of config.json 4. Add new page in /lib/obp60task/config.json for each page type or add new page to gen_set.py and run it to auto-generate the relevant section of config.json

View File

@@ -328,16 +328,11 @@ void displayHeader(CommonData &commonData, GwApi::BoatValue *date, GwApi::BoatVa
// Display key lock status // Display key lock status
if (commonData.keylock) { if (commonData.keylock) {
getdisplay().drawXBitmap(150, 1, lock_bits, icon_width, icon_height, commonData.fgcolor); getdisplay().drawXBitmap(170, 1, lock_bits, icon_width, icon_height, commonData.fgcolor);
} else { } else {
getdisplay().drawXBitmap(150, 1, swipe_bits, icon_width, icon_height, commonData.fgcolor); getdisplay().drawXBitmap(166, 1, swipe_bits, swipe_width, swipe_height, commonData.fgcolor);
} }
// Current page number in a small box
getdisplay().setFont(&Ubuntu_Bold8pt7b);
getdisplay().drawRect(170, 2, 20, 15, commonData.fgcolor);
drawTextCenter(179, 9, String(commonData.data.actpage));
// Heartbeat as dot // Heartbeat as dot
getdisplay().setTextColor(commonData.fgcolor); getdisplay().setTextColor(commonData.fgcolor);
getdisplay().setFont(&Ubuntu_Bold32pt7b); getdisplay().setFont(&Ubuntu_Bold32pt7b);
@@ -382,13 +377,21 @@ void displayFooter(CommonData &commonData) {
getdisplay().setTextColor(commonData.fgcolor); getdisplay().setTextColor(commonData.fgcolor);
// Frame around key icon area // Frame around key icon area
getdisplay().drawLine(0, 280, 399, 280, commonData.fgcolor);
if (! commonData.keylock) { if (! commonData.keylock) {
getdisplay().drawLine(68, 280, 68, 299, commonData.fgcolor); // horizontal elements
getdisplay().drawLine(134, 280, 134, 299, commonData.fgcolor); const uint16_t top = 280;
getdisplay().drawLine(200, 280, 200, 299, commonData.fgcolor); const uint16_t bottom = 299;
getdisplay().drawLine(266, 280, 266, 299, commonData.fgcolor); getdisplay().drawLine(commonData.keydata[0].x, top, commonData.keydata[0].x+10, top, commonData.fgcolor);
getdisplay().drawLine(332, 280, 332, 299, commonData.fgcolor); getdisplay().drawLine(commonData.keydata[1].x-10, top, commonData.keydata[1].x+10, top, commonData.fgcolor);
getdisplay().drawLine(commonData.keydata[2].x-10, top, commonData.keydata[2].x+10, top, commonData.fgcolor);
getdisplay().drawLine(commonData.keydata[4].x-10, top, commonData.keydata[4].x+10, top, commonData.fgcolor);
getdisplay().drawLine(commonData.keydata[5].x-10, top, commonData.keydata[5].x+10, top, commonData.fgcolor);
getdisplay().drawLine(commonData.keydata[5].x + commonData.keydata[5].w - 10, top, commonData.keydata[5].x + commonData.keydata[5].w + 1, top, commonData.fgcolor);
// vertical key separators
getdisplay().drawLine(commonData.keydata[0].x + commonData.keydata[0].w, top, commonData.keydata[0].x + commonData.keydata[0].w, bottom, commonData.fgcolor);
getdisplay().drawLine(commonData.keydata[1].x + commonData.keydata[1].w, top, commonData.keydata[1].x + commonData.keydata[1].w, bottom, commonData.fgcolor);
getdisplay().drawLine(commonData.keydata[3].x + commonData.keydata[3].w, top, commonData.keydata[3].x + commonData.keydata[3].w, bottom, commonData.fgcolor);
getdisplay().drawLine(commonData.keydata[4].x + commonData.keydata[4].w, top, commonData.keydata[4].x + commonData.keydata[4].w, bottom, commonData.fgcolor);
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
uint16_t x, y; uint16_t x, y;
if (commonData.keydata[i].label.length() > 0) { if (commonData.keydata[i].label.length() > 0) {
@@ -412,6 +415,9 @@ void displayFooter(CommonData &commonData) {
} }
} }
} }
// Current page number in a small box
getdisplay().drawRect(190, 280, 23, 19, commonData.fgcolor);
drawTextCenter(200, 289, String(commonData.data.actpage));
} else { } else {
getdisplay().setCursor(65, 295); getdisplay().setCursor(65, 295);
getdisplay().print("Press 1 and 6 fast to unlock keys"); getdisplay().print("Press 1 and 6 fast to unlock keys");

View File

@@ -114,11 +114,6 @@ static unsigned char right_bits[] PROGMEM = {
0xfe, 0x7f, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0x80, 0x1f, 0xfe, 0x7f, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0x80, 0x1f,
0x80, 0x0f, 0x80, 0x07, 0x80, 0x03, 0x00, 0x00 }; 0x80, 0x0f, 0x80, 0x07, 0x80, 0x03, 0x00, 0x00 };
static unsigned char swipe_bits[] = {
0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0xc8, 0x05, 0x48, 0x0e,
0x4a, 0x12, 0x4d, 0x32, 0x09, 0x50, 0x41, 0x44, 0x62, 0x4c, 0xf2, 0x5f,
0x64, 0x2c, 0x48, 0x24, 0x10, 0x10, 0xe0, 0x0f };
static unsigned char lock_bits[] PROGMEM = { static unsigned char lock_bits[] PROGMEM = {
0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x10, 0x08, 0x10, 0x08, 0x10, 0x08, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x10, 0x08, 0x10, 0x08, 0x10, 0x08,
0xfc, 0x3f, 0x04, 0x20, 0x04, 0x20, 0x84, 0x21, 0x84, 0x21, 0x84, 0x21, 0xfc, 0x3f, 0x04, 0x20, 0x04, 0x20, 0x84, 0x21, 0x84, 0x21, 0x84, 0x21,
@@ -139,19 +134,38 @@ 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[] = {
0xe0, 0x03, 0x18, 0x0c, 0x04, 0x10, 0xc2, 0x21, 0x30, 0x06, 0x08, 0x08,
0xc0, 0x01, 0x20, 0x02, 0x00, 0x00, 0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01,
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00 };
static unsigned char dish_bits[] PROGMEM= {
0x3c, 0x00, 0x42, 0x18, 0xfa, 0x1b, 0x02, 0x04, 0x02, 0x0a, 0x02, 0x09,
0x82, 0x08, 0x06, 0x0a, 0x0e, 0x1b, 0x9c, 0x2b, 0x38, 0x2b, 0x74, 0x20,
0xec, 0x1f, 0x1c, 0x00, 0xf4, 0x00, 0xfe, 0x03 };
static std::map<String, unsigned char *> iconmap = { static std::map<String, unsigned char *> iconmap = {
{"LEFT", left_bits}, {"LEFT", left_bits},
{"RIGHT", right_bits}, {"RIGHT", right_bits},
{"SWIPE", swipe_bits},
{"LOCK", lock_bits}, {"LOCK", lock_bits},
{"PLUS", plus_bits}, {"PLUS", plus_bits},
{"MINUS", minus_bits} {"MINUS", minus_bits},
{"DISH", dish_bits},
{"AP", ap_bits}
}; };
// Other symbols // Other symbols
#define swipe_width 24
#define swipe_height 16
static unsigned char swipe_bits[] PROGMEM = {
0x00, 0x06, 0x00, 0x24, 0x09, 0x24, 0x12, 0x09, 0x48, 0x7f, 0x09, 0xfe,
0x12, 0xb9, 0x48, 0x24, 0xc9, 0x25, 0x40, 0x49, 0x02, 0xa0, 0x49, 0x06,
0x20, 0x01, 0x0a, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08,
0x80, 0x00, 0x04, 0x00, 0x01, 0x04, 0x00, 0x02, 0x02, 0x00, 0xfc, 0x01 };
#define exclamation_width 32 #define exclamation_width 32
#define exclamation_height 32 #define exclamation_height 32
static unsigned char exclamation_bits[] = { static unsigned char exclamation_bits[] PROGMEM = {
0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0xb0, 0x0d, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0xb0, 0x0d, 0x00,
0x00, 0xd8, 0x1b, 0x00, 0x00, 0xec, 0x37, 0x00, 0x00, 0xf6, 0x6f, 0x00, 0x00, 0xd8, 0x1b, 0x00, 0x00, 0xec, 0x37, 0x00, 0x00, 0xf6, 0x6f, 0x00,
0x00, 0x3b, 0xdc, 0x00, 0x80, 0x3d, 0xbc, 0x01, 0xc0, 0x3e, 0x7c, 0x03, 0x00, 0x3b, 0xdc, 0x00, 0x80, 0x3d, 0xbc, 0x01, 0xc0, 0x3e, 0x7c, 0x03,

View File

@@ -22,35 +22,40 @@ long starttime = 0; // Start time point for pressed key
void initKeys(CommonData &commonData) { void initKeys(CommonData &commonData) {
// coordinates for virtual keyboard keys // coordinates for virtual keyboard keys
commonData.keydata[0].x = 1;
commonData.keydata[0].y = 281;
commonData.keydata[0].w = 67;
commonData.keydata[0].h = 18;
commonData.keydata[1].x = 69; static uint16_t top = 281;
commonData.keydata[1].y = 281; static uint16_t width = 65;
commonData.keydata[1].w = 66; static uint16_t height = 18;
commonData.keydata[1].h = 18;
commonData.keydata[2].x = 135; commonData.keydata[0].x = 0;
commonData.keydata[2].y = 281; commonData.keydata[0].y = top;
commonData.keydata[2].w = 66; commonData.keydata[0].w = width + 1;
commonData.keydata[2].h = 18; commonData.keydata[0].h = height;
commonData.keydata[3].x = 201; commonData.keydata[1].x = commonData.keydata[0].x + commonData.keydata[0].w + 1;
commonData.keydata[3].y = 281; commonData.keydata[1].y = top;
commonData.keydata[3].w = 66; commonData.keydata[1].w = width;
commonData.keydata[3].h = 18; commonData.keydata[1].h = height;
commonData.keydata[4].x = 267; commonData.keydata[2].x = commonData.keydata[1].x + commonData.keydata[1].w + 1;
commonData.keydata[4].y = 281; commonData.keydata[2].y = top;
commonData.keydata[4].w = 66; commonData.keydata[2].w = width;
commonData.keydata[4].h = 18; commonData.keydata[2].h = height;
commonData.keydata[5].x = 333; commonData.keydata[3].x = commonData.keydata[2].x + commonData.keydata[2].w + 1;
commonData.keydata[5].y = 281; commonData.keydata[3].y = top;
commonData.keydata[5].w = 66; commonData.keydata[3].w = width;
commonData.keydata[5].h = 18; commonData.keydata[3].h = height;
commonData.keydata[4].x = commonData.keydata[3].x + commonData.keydata[3].w + 1;
commonData.keydata[4].y = top;
commonData.keydata[4].w = width;
commonData.keydata[4].h = height;
commonData.keydata[5].x = commonData.keydata[4].x + commonData.keydata[4].w + 1;
commonData.keydata[5].y = top;
commonData.keydata[5].w = width;
commonData.keydata[5].h = height;
} }
#ifdef HARDWARE_V21 #ifdef HARDWARE_V21
@@ -214,14 +219,7 @@ void initKeys(CommonData &commonData) {
#endif #endif
#ifdef HARDWARE_LIGHT #ifdef HARDWARE_LIGHT
// Keypad functions for OBP60 clone (thSensitivity is inactiv) int readSensorpads(){
int readKeypad(uint thSensitivity) {
pinMode(UP, INPUT);
pinMode(DOWN, INPUT);
pinMode(CONF, INPUT);
pinMode(MENUE, INPUT);
pinMode(EXIT, INPUT);
// Read key code // Read key code
if(digitalRead(UP) == LOW){ if(digitalRead(UP) == LOW){
keycode = 10; // Left swipe keycode = 10; // Left swipe
@@ -241,6 +239,19 @@ void initKeys(CommonData &commonData) {
else{ else{
keycode = 0; // No key activ keycode = 0; // No key activ
} }
return keycode;
}
// Keypad functions for OBP60 clone (thSensitivity is inactiv)
int readKeypad(uint thSensitivity) {
pinMode(UP, INPUT);
pinMode(DOWN, INPUT);
pinMode(CONF, INPUT);
pinMode(MENUE, INPUT);
pinMode(EXIT, INPUT);
// Raed pad values
readSensorpads();
// Detect key // Detect key
if (keycode > 0 ){ if (keycode > 0 ){
@@ -253,6 +264,7 @@ void initKeys(CommonData &commonData) {
keystatus = keycode; keystatus = keycode;
// Copy keycode // Copy keycode
keycodeold = keycode; keycodeold = keycode;
while(readSensorpads() > 0){} // Wait for pad lesease
delay(keydelay); delay(keydelay);
} }
} }

View File

@@ -1,112 +0,0 @@
#!/bin/perl -w
#A tool to generate the part of config.json that deals with pages and fields.
#DEPRECATED, moved to get_set.py
die "Please use gen_set.py instead";
#List of all pages and the number of parameters they expect.
%NoOfFieldsPerPage=qw(
ApparentWind 0
XTETrack 0
Battery2 0
Battery 0
BME280 0
Clock 0
DST810 0
FourValues2 4
FourValues 4
Generator 0
KeelPosition 0
OneValue 1
RollPitch 0
RudderPosition 0
Solar 0
ThreeValues 3
TwoValues 2
Voltage 0
White 0
WindRose 0
WindRoseFlex 6
);
# No changes needed beyond this point
#max number of pages supported by OBP60
$NoOfPages=10;
#Default selection for each page
@Defaults=qw(Voltage WindRose OneValue TwoValues ThreeValues FourValues FourValues2 Clock RollPitch Battery2);
@Numbers=qw(one two three four five six seven eight nine ten);
@Pages=sort(keys(%NoOfFieldsPerPage));
$MaxNoOfFieldsPerPage=0; # inital value, gets updated with maximum entry from %NoOfFieldsPerPage
#find max. number of fields without additional modules
foreach (values(%NoOfFieldsPerPage)){
if ($_ > $MaxNoOfFieldsPerPage){
$MaxNoOfFieldsPerPage=$_;
}
}
for ($PageNo=1;$PageNo<=$NoOfPages;$PageNo++){
print "{\n";
print "\t","\"name\": \"page", $PageNo,"type\",\n";
print "\t","\"label\": \"Type\",\n";
print "\t",'"type": "list",',"\n";
print "\t",'"default": "';
print "$Defaults[$PageNo-1]";
print'"',"\n";
print "\t",'"description": "Type of page for page ',$PageNo,'",',"\n";
print "\t",'"list": [';
for ($p=0;$p<=$#Pages;$p++) {
print '"', $Pages[$p], '"' ;
if ($p < $#Pages){print ","}
}
print "]\n";
print "\t",'"category": "OBP60 Page ',$PageNo,'",',"\n";
print "\t",'"capabilities": {',"\n";
print "\t\t",'"obp60":"true"',"\n";
print "\t",'}',"\n";
print "\t",'"condition":[';
for ($vp=$PageNo;$vp<=$NoOfPages;$vp++){
print '"{visiblePages":"',$vp,'"},';
}
print "\b",']',"\n";
print '},',"\n";
for ($FieldNo=1; $FieldNo<=$MaxNoOfFieldsPerPage;$FieldNo++){
print "{\n";
print "\t",'"name": "page',$PageNo,'value',$FieldNo,'",',"\n";
print "\t",'"label": "Field ',$FieldNo,'",',"\n";
print "\t",'"type": "boatData",',"\n";
print "\t",'"default": "",',"\n";
print "\t",'"description": "The display for field ',$Numbers[$FieldNo-1],'",',"\n";
print "\t",'"category": "OBP60 Page ',$PageNo,'",',"\n";
print "\t",'"capabilities": {',"\n";
print "\t",' "obp60":"true"',"\n";
print "\t",'}, ',"\n";
print "\t",'"condition":[';
foreach $page (@Pages) {
if($NoOfFieldsPerPage{$page}>=$FieldNo){
print '{"page',$PageNo,'type":"',$page,'"},';
}
}
print "\b],\n";
print '},',"\n";
}
print "{\n";
print "\t","\"name\": \"page", $PageNo,"fluid\",\n";
print "\t",'"label": "Fluid type",',"\n";
print "\t",'"type": "list",',"\n";
print "\t",'"default": "0",',"\n";
print "\t",'"list": [',"\n";
print "\t",'{"l":"Fuel (0)","v":"0"},',"\n";
print "\t",'{"l":"Water (1)","v":"1"},',"\n";
print "\t",'{"l":"Gray Water (2)","v":"2"},',"\n";
print "\t",'{"l":"Live Well (3)","v":"3"},',"\n";
print "\t",'{"l":"Oil (4)","v":"4"},',"\n";
print "\t",'{"l":"Black Water (5)","v":"5"},',"\n";
print "\t",'{"l":"Fuel Gasoline (6)","v":"6"}',"\n";
print "\t",'],',"\n";
print "\t",'"description": "Fluid type in tank",',"\n";
print "\t",'"category": "OBP60 Page ',$PageNo,'",',"\n";
print "\t",'"capabilities": {',"\n";
print "\t",'"obp60":"true"',"\n";
print "\t",'},',"\n";
print "\t",'"condition":[{"page',$PageNo,'type":"Fluid"}]',"\n";
print '},',"\n";
}

View File

@@ -1,18 +1,22 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# A tool to generate that part of config.json that deals with pages and fields. # A tool to generate that part of config.json that deals with pages and fields.
#
#Usage: 1. modify this script (e.g.add a page, change number of fields, etc.)
# 2. Delete all lines from config.json from the curly backet before "name": "page1type" to o the end of the file (as of today, delete from line 917 to the end of the File)
# 3. run ./gen_set.py >> config.json
import json import json
# List of all pages and the number of parameters they expect. # List of all pages and the number of parameters they expect.
no_of_fields_per_page = { no_of_fields_per_page = {
"ApparentWind": 0, "Wind": 0,
"XTETrack": 0, "XTETrack": 0,
"Battery2": 0, "Battery2": 0,
"Battery": 0, "Battery": 0,
"BME280": 0, "BME280": 0,
"Clock": 0, "Clock": 0,
"DST810": 0, "DST810": 0,
"Fluid": 0, "Fluid": 1,
"FourValues2": 4, "FourValues2": 4,
"FourValues": 4, "FourValues": 4,
"Generator": 0, "Generator": 0,
@@ -27,6 +31,7 @@ no_of_fields_per_page = {
"White": 0, "White": 0,
"WindRose": 0, "WindRose": 0,
"WindRoseFlex": 6, "WindRoseFlex": 6,
"SixValues" : 6,
} }
# No changes needed beyond this point # No changes needed beyond this point
@@ -119,5 +124,7 @@ for page_no in range(1, no_of_pages + 1):
json_output = json.dumps(output, indent=4) json_output = json.dumps(output, indent=4)
# print omitting first and last line containing [ ] of JSON array # print omitting first and last line containing [ ] of JSON array
print(json_output[1:-1]) #print(json_output[1:-1])
# print omitting first line containing [ of JSON array
print(json_output[1:])
# print(",") # print(",")

View File

@@ -40,7 +40,7 @@ lib_deps =
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 ARDUINO_USB_MODE=1 #0=OTG (to implement other external devices), 1=CDC (is a serial device) # -D ARDUINO_USB_MODE=1 #0=OTG (to implement other external devices), 1=CDC (is a serial device)
# -D ARDUINO_USB_CDC_ON_BOOT=1 #0=JTAG, 1=CDC (serial device) -D ARDUINO_USB_CDC_ON_BOOT=0 #Serial output via RX/TX
# -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)
# -D TIME=$UNIX_TIME #Set PC time for RTC (only settable via VSC) # -D TIME=$UNIX_TIME #Set PC time for RTC (only settable via VSC)
-D DISABLE_DIAGNOSTIC_OUTPUT #Disable diagnostic output for GxEPD2 lib -D DISABLE_DIAGNOSTIC_OUTPUT #Disable diagnostic output for GxEPD2 lib

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<script type="module" src="cibuild.js"></script> <script type="module" src="cibuild.js"></script>

View File

@@ -867,5 +867,27 @@ class PipelineInfo{
buildSelectors(ROOT_PATH,structure.config.children,true); buildSelectors(ROOT_PATH,structure.config.children,true);
if (! isRunning()) findPipeline(); if (! isRunning()) findPipeline();
updateStatus(); updateStatus();
const translationCheck=()=>{
const lang = document.documentElement.lang;
if (lang != "en"){
alert(
"This page will not work correctly with translation enabled"
);
}
}
// Works at least for Chrome, Firefox, Safari and probably more. Not Microsoft
// Edge though. They're special.
// Yell at clouds if a translator doesn't change it
const observer = new MutationObserver(() => {
translationCheck();
});
observer.observe(document.documentElement, {
attributes: true,
attributeFilter: ['lang'],
childList: false,
characterData: false,
});
translationCheck();
} }
})(); })();