mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 23:13:07 +01:00
Reorganized fonts and changed Ubuntu-font to 8bit version
This commit is contained in:
@@ -87,7 +87,7 @@ public:
|
||||
getdisplay().setTextColor(commonData->fgcolor);
|
||||
|
||||
// Show name
|
||||
getdisplay().setFont(&Ubuntu_Bold20pt7b);
|
||||
getdisplay().setFont(&Ubuntu_Bold20pt8b);
|
||||
getdisplay().setCursor(10, 65);
|
||||
getdisplay().print("Solar");
|
||||
|
||||
@@ -98,7 +98,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 solar power
|
||||
@@ -106,12 +106,12 @@ public:
|
||||
getdisplay().setCursor(10, 200);
|
||||
if(solPower <= 999) getdisplay().print(solPower, 0);
|
||||
if(solPower > 999) getdisplay().print(float(solPower/1000.0), 1);
|
||||
getdisplay().setFont(&Ubuntu_Bold16pt7b);
|
||||
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
||||
if(solPower <= 999) getdisplay().print("W");
|
||||
if(solPower > 999) getdisplay().print("kW");
|
||||
|
||||
// Show info
|
||||
getdisplay().setFont(&Ubuntu_Bold8pt7b);
|
||||
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
||||
getdisplay().setCursor(10, 235);
|
||||
getdisplay().print("Installed");
|
||||
getdisplay().setCursor(10, 255);
|
||||
@@ -124,15 +124,15 @@ public:
|
||||
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
|
||||
getdisplay().setCursor(150, 200);
|
||||
getdisplay().print(solPercentage);
|
||||
getdisplay().setFont(&Ubuntu_Bold16pt7b);
|
||||
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
||||
getdisplay().print("%");
|
||||
getdisplay().setFont(&Ubuntu_Bold8pt7b);
|
||||
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
||||
getdisplay().setCursor(150, 235);
|
||||
getdisplay().print("Load");
|
||||
|
||||
// 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"){
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
getdisplay().print("---"); // Missing bus data
|
||||
}
|
||||
}
|
||||
getdisplay().setFont(&Ubuntu_Bold16pt7b);
|
||||
getdisplay().setFont(&Ubuntu_Bold16pt8b);
|
||||
getdisplay().print("V");
|
||||
|
||||
// Show actual current in A
|
||||
@@ -184,7 +184,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
|
||||
@@ -196,7 +196,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
|
||||
|
||||
Reference in New Issue
Block a user