mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-28 21:23:07 +01:00
Compare commits
13 Commits
r20250116a
...
87a7a79358
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87a7a79358 | ||
|
|
e7216e6d2b | ||
|
|
e7f3430ed6 | ||
|
|
2c2d21535b | ||
|
|
27b02c4860 | ||
| e917a7fc76 | |||
|
|
10552763fb | ||
|
|
24386d4d42 | ||
|
|
49be7f117a | ||
|
|
e70660c981 | ||
|
|
4395c623ea | ||
|
|
dfc79c80dc | ||
|
|
a129d865c9 |
@@ -2,5 +2,5 @@ Craete new page for OBP60
|
||||
1. Create page under /lib/obp60task/PageXXXX.cpp
|
||||
2. Set page name in PageXXXX.cpp on file name
|
||||
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
|
||||
|
||||
|
||||
@@ -328,16 +328,11 @@ void displayHeader(CommonData &commonData, GwApi::BoatValue *date, GwApi::BoatVa
|
||||
|
||||
// Display key lock status
|
||||
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 {
|
||||
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
|
||||
getdisplay().setTextColor(commonData.fgcolor);
|
||||
getdisplay().setFont(&Ubuntu_Bold32pt7b);
|
||||
@@ -382,13 +377,21 @@ void displayFooter(CommonData &commonData) {
|
||||
getdisplay().setTextColor(commonData.fgcolor);
|
||||
|
||||
// Frame around key icon area
|
||||
getdisplay().drawLine(0, 280, 399, 280, commonData.fgcolor);
|
||||
if (! commonData.keylock) {
|
||||
getdisplay().drawLine(68, 280, 68, 299, commonData.fgcolor);
|
||||
getdisplay().drawLine(134, 280, 134, 299, commonData.fgcolor);
|
||||
getdisplay().drawLine(200, 280, 200, 299, commonData.fgcolor);
|
||||
getdisplay().drawLine(266, 280, 266, 299, commonData.fgcolor);
|
||||
getdisplay().drawLine(332, 280, 332, 299, commonData.fgcolor);
|
||||
// horizontal elements
|
||||
const uint16_t top = 280;
|
||||
const uint16_t bottom = 299;
|
||||
getdisplay().drawLine(commonData.keydata[0].x, top, commonData.keydata[0].x+10, top, 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++) {
|
||||
uint16_t x, y;
|
||||
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 {
|
||||
getdisplay().setCursor(65, 295);
|
||||
getdisplay().print("Press 1 and 6 fast to unlock keys");
|
||||
|
||||
@@ -114,11 +114,6 @@ static unsigned char right_bits[] PROGMEM = {
|
||||
0xfe, 0x7f, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0x80, 0x1f,
|
||||
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 = {
|
||||
0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x10, 0x08, 0x10, 0x08, 0x10, 0x08,
|
||||
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,
|
||||
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 = {
|
||||
{"LEFT", left_bits},
|
||||
{"RIGHT", right_bits},
|
||||
{"SWIPE", swipe_bits},
|
||||
{"LOCK", lock_bits},
|
||||
{"PLUS", plus_bits},
|
||||
{"MINUS", minus_bits}
|
||||
{"MINUS", minus_bits},
|
||||
{"DISH", dish_bits},
|
||||
{"AP", ap_bits}
|
||||
};
|
||||
|
||||
// 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_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, 0xd8, 0x1b, 0x00, 0x00, 0xec, 0x37, 0x00, 0x00, 0xf6, 0x6f, 0x00,
|
||||
0x00, 0x3b, 0xdc, 0x00, 0x80, 0x3d, 0xbc, 0x01, 0xc0, 0x3e, 0x7c, 0x03,
|
||||
|
||||
@@ -22,35 +22,40 @@ long starttime = 0; // Start time point for pressed key
|
||||
|
||||
void initKeys(CommonData &commonData) {
|
||||
// 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;
|
||||
commonData.keydata[1].y = 281;
|
||||
commonData.keydata[1].w = 66;
|
||||
commonData.keydata[1].h = 18;
|
||||
static uint16_t top = 281;
|
||||
static uint16_t width = 65;
|
||||
static uint16_t height = 18;
|
||||
|
||||
commonData.keydata[2].x = 135;
|
||||
commonData.keydata[2].y = 281;
|
||||
commonData.keydata[2].w = 66;
|
||||
commonData.keydata[2].h = 18;
|
||||
commonData.keydata[0].x = 0;
|
||||
commonData.keydata[0].y = top;
|
||||
commonData.keydata[0].w = width + 1;
|
||||
commonData.keydata[0].h = height;
|
||||
|
||||
commonData.keydata[3].x = 201;
|
||||
commonData.keydata[3].y = 281;
|
||||
commonData.keydata[3].w = 66;
|
||||
commonData.keydata[3].h = 18;
|
||||
commonData.keydata[1].x = commonData.keydata[0].x + commonData.keydata[0].w + 1;
|
||||
commonData.keydata[1].y = top;
|
||||
commonData.keydata[1].w = width;
|
||||
commonData.keydata[1].h = height;
|
||||
|
||||
commonData.keydata[4].x = 267;
|
||||
commonData.keydata[4].y = 281;
|
||||
commonData.keydata[4].w = 66;
|
||||
commonData.keydata[4].h = 18;
|
||||
commonData.keydata[2].x = commonData.keydata[1].x + commonData.keydata[1].w + 1;
|
||||
commonData.keydata[2].y = top;
|
||||
commonData.keydata[2].w = width;
|
||||
commonData.keydata[2].h = height;
|
||||
|
||||
commonData.keydata[5].x = 333;
|
||||
commonData.keydata[5].y = 281;
|
||||
commonData.keydata[5].w = 66;
|
||||
commonData.keydata[5].h = 18;
|
||||
commonData.keydata[3].x = commonData.keydata[2].x + commonData.keydata[2].w + 1;
|
||||
commonData.keydata[3].y = top;
|
||||
commonData.keydata[3].w = width;
|
||||
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
|
||||
@@ -214,6 +219,29 @@ void initKeys(CommonData &commonData) {
|
||||
#endif
|
||||
|
||||
#ifdef HARDWARE_LIGHT
|
||||
int readSensorpads(){
|
||||
// Read key code
|
||||
if(digitalRead(UP) == LOW){
|
||||
keycode = 10; // Left swipe
|
||||
}
|
||||
else if(digitalRead(DOWN) == LOW){
|
||||
keycode = 9; // Right swipe
|
||||
}
|
||||
else if(digitalRead(CONF) == LOW){
|
||||
keycode = 3; // Key 3
|
||||
}
|
||||
else if(digitalRead(MENUE) == LOW){
|
||||
keycode = 1; // Key 1
|
||||
}
|
||||
else if(digitalRead(EXIT) == LOW){
|
||||
keycode = 2; // Key 2
|
||||
}
|
||||
else{
|
||||
keycode = 0; // No key activ
|
||||
}
|
||||
return keycode;
|
||||
}
|
||||
|
||||
// Keypad functions for OBP60 clone (thSensitivity is inactiv)
|
||||
int readKeypad(uint thSensitivity) {
|
||||
pinMode(UP, INPUT);
|
||||
@@ -222,25 +250,8 @@ void initKeys(CommonData &commonData) {
|
||||
pinMode(MENUE, INPUT);
|
||||
pinMode(EXIT, INPUT);
|
||||
|
||||
// Read key code
|
||||
if(digitalRead(UP) == LOW){
|
||||
keycode = 10; // Left swipe
|
||||
}
|
||||
else if(digitalRead(DOWN) == LOW){
|
||||
keycode = 9; // Right swipe
|
||||
}
|
||||
else if(digitalRead(CONF) == LOW){
|
||||
keycode = 3; // Key 3
|
||||
}
|
||||
else if(digitalRead(MENUE) == LOW){
|
||||
keycode = 1; // Key 1
|
||||
}
|
||||
else if(digitalRead(EXIT) == LOW){
|
||||
keycode = 2; // Key 2
|
||||
}
|
||||
else{
|
||||
keycode = 0; // No key activ
|
||||
}
|
||||
// Raed pad values
|
||||
readSensorpads();
|
||||
|
||||
// Detect key
|
||||
if (keycode > 0 ){
|
||||
@@ -253,6 +264,7 @@ void initKeys(CommonData &commonData) {
|
||||
keystatus = keycode;
|
||||
// Copy keycode
|
||||
keycodeold = keycode;
|
||||
while(readSensorpads() > 0){} // Wait for pad lesease
|
||||
delay(keydelay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
@@ -1,18 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
# 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
|
||||
|
||||
# List of all pages and the number of parameters they expect.
|
||||
no_of_fields_per_page = {
|
||||
"ApparentWind": 0,
|
||||
"Wind": 0,
|
||||
"XTETrack": 0,
|
||||
"Battery2": 0,
|
||||
"Battery": 0,
|
||||
"BME280": 0,
|
||||
"Clock": 0,
|
||||
"DST810": 0,
|
||||
"Fluid": 0,
|
||||
"Fluid": 1,
|
||||
"FourValues2": 4,
|
||||
"FourValues": 4,
|
||||
"Generator": 0,
|
||||
@@ -27,6 +31,7 @@ no_of_fields_per_page = {
|
||||
"White": 0,
|
||||
"WindRose": 0,
|
||||
"WindRoseFlex": 6,
|
||||
"SixValues" : 6,
|
||||
}
|
||||
|
||||
# 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)
|
||||
# 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(",")
|
||||
@@ -40,7 +40,7 @@ lib_deps =
|
||||
build_flags=
|
||||
#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_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 TIME=$UNIX_TIME #Set PC time for RTC (only settable via VSC)
|
||||
-D DISABLE_DIAGNOSTIC_OUTPUT #Disable diagnostic output for GxEPD2 lib
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<script type="module" src="cibuild.js"></script>
|
||||
@@ -83,4 +83,4 @@
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -867,5 +867,27 @@ class PipelineInfo{
|
||||
buildSelectors(ROOT_PATH,structure.config.children,true);
|
||||
if (! isRunning()) findPipeline();
|
||||
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();
|
||||
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user