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

Reorganized fonts and changed Ubuntu-font to 8bit version

This commit is contained in:
2025-07-08 15:19:07 +02:00
parent ae7130b86c
commit fa4b563ff0
50 changed files with 5506 additions and 3241 deletions

View File

@@ -189,12 +189,12 @@ public:
getdisplay().setTextColor(commonData->fgcolor);
// Show name
getdisplay().setFont(&Ubuntu_Bold20pt7b);
getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(10, 65);
getdisplay().print("Bat.");
// Show battery type
getdisplay().setFont(&Ubuntu_Bold8pt7b);
getdisplay().setFont(&Ubuntu_Bold8pt8b);
getdisplay().setCursor(90, 65);
getdisplay().print(batType);
@@ -205,7 +205,7 @@ public:
if(String(batVoltage) == "12V") bvoltage = 12;
else bvoltage = 24;
getdisplay().print(bvoltage);
getdisplay().setFont(&Ubuntu_Bold16pt7b);
getdisplay().setFont(&Ubuntu_Bold16pt8b);
getdisplay().print("V");
// Show battery capacity
@@ -213,12 +213,12 @@ public:
getdisplay().setCursor(10, 200);
if(batCapacity <= 999) getdisplay().print(batCapacity, 0);
if(batCapacity > 999) getdisplay().print(float(batCapacity/1000.0), 1);
getdisplay().setFont(&Ubuntu_Bold16pt7b);
getdisplay().setFont(&Ubuntu_Bold16pt8b);
if(batCapacity <= 999) getdisplay().print("Ah");
if(batCapacity > 999) getdisplay().print("kAh");
// Show info
getdisplay().setFont(&Ubuntu_Bold8pt7b);
getdisplay().setFont(&Ubuntu_Bold8pt8b);
getdisplay().setCursor(10, 235);
getdisplay().print("Installed");
getdisplay().setCursor(10, 255);
@@ -228,7 +228,7 @@ public:
batteryGraphic(150, 45, batPercentage, commonData->fgcolor, commonData->bgcolor);
// Show average settings
getdisplay().setFont(&Ubuntu_Bold8pt7b);
getdisplay().setFont(&Ubuntu_Bold8pt8b);
getdisplay().setCursor(150, 145);
switch (average) {
case 0:
@@ -252,7 +252,7 @@ public:
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
getdisplay().setCursor(150, 200);
getdisplay().print(batPercentage);
getdisplay().setFont(&Ubuntu_Bold16pt7b);
getdisplay().setFont(&Ubuntu_Bold16pt8b);
getdisplay().print("%");
// Show time to full discharge
@@ -263,12 +263,12 @@ public:
else getdisplay().print(batRange, 0);
}
else getdisplay().print("--");
getdisplay().setFont(&Ubuntu_Bold16pt7b);
getdisplay().setFont(&Ubuntu_Bold16pt8b);
getdisplay().print("h");
// Show sensor type info
String i2cAddr = "";
getdisplay().setFont(&Ubuntu_Bold8pt7b);
getdisplay().setFont(&Ubuntu_Bold8pt8b);
getdisplay().setCursor(270, 60);
if(powerSensor == "off") getdisplay().print("Internal");
if(powerSensor == "INA219"){
@@ -307,7 +307,7 @@ public:
getdisplay().print("---"); // Missing bus data
}
}
getdisplay().setFont(&Ubuntu_Bold16pt7b);
getdisplay().setFont(&Ubuntu_Bold16pt8b);
getdisplay().print("V");
// Show actual current in A
@@ -319,7 +319,7 @@ public:
if(value2 > 99.9) getdisplay().print(value2, 0);
}
else getdisplay().print("---");
getdisplay().setFont(&Ubuntu_Bold16pt7b);
getdisplay().setFont(&Ubuntu_Bold16pt8b);
getdisplay().print("A");
// Show actual consumption in W
@@ -331,7 +331,7 @@ public:
if(value3 > 99.9) getdisplay().print(value3, 0);
}
else getdisplay().print("---");
getdisplay().setFont(&Ubuntu_Bold16pt7b);
getdisplay().setFont(&Ubuntu_Bold16pt8b);
getdisplay().print("W");
// Update display