mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 06:53:07 +01:00
Add RollPitch page and code cleaning
This commit is contained in:
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
// Get boat values for AWS
|
||||
GwApi::BoatValue *bvalue1 = pageData.values[0]; // First element in list (only one value by PageOneValue)
|
||||
String name1 = bvalue1->getName().c_str(); // Value name
|
||||
String name1 = xdrDelete(bvalue1->getName()); // Value name
|
||||
name1 = name1.substring(0, 6); // String length limit for value name
|
||||
double value1 = bvalue1->value; // Value as double in SI unit
|
||||
bool valid1 = bvalue1->valid; // Valid information
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
// Get boat values for AWD
|
||||
GwApi::BoatValue *bvalue2 = pageData.values[1]; // First element in list (only one value by PageOneValue)
|
||||
String name2 = bvalue2->getName().c_str(); // Value name
|
||||
String name2 = xdrDelete(bvalue2->getName()); // Value name
|
||||
name2 = name2.substring(0, 6); // String length limit for value name
|
||||
double value2 = bvalue2->value; // Value as double in SI unit
|
||||
bool valid2 = bvalue2->valid; // Valid information
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
// Get boat values #3
|
||||
GwApi::BoatValue *bvalue3 = pageData.values[2]; // Second element in list (only one value by PageOneValue)
|
||||
String name3 = bvalue3->getName().c_str(); // Value name
|
||||
String name3 = xdrDelete(bvalue3->getName()); // Value name
|
||||
name3 = name3.substring(0, 6); // String length limit for value name
|
||||
double value3 = bvalue3->value; // Value as double in SI unit
|
||||
bool valid3 = bvalue3->valid; // Valid information
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
// Get boat values #4
|
||||
GwApi::BoatValue *bvalue4 = pageData.values[3]; // Second element in list (only one value by PageOneValue)
|
||||
String name4 = bvalue4->getName().c_str(); // Value name
|
||||
String name4 = xdrDelete(bvalue4->getName()); // Value name
|
||||
name4 = name4.substring(0, 6); // String length limit for value name
|
||||
double value4 = bvalue4->value; // Value as double in SI unit
|
||||
bool valid4 = bvalue4->valid; // Valid information
|
||||
@@ -173,14 +173,14 @@ public:
|
||||
else{
|
||||
display.setFont(&DSEG7Classic_BoldItalic20pt7b);
|
||||
display.setCursor(10, 270);
|
||||
display.print(svalue2old); // Value
|
||||
display.print(svalue2old); // Value
|
||||
display.setFont(&Ubuntu_Bold12pt7b);
|
||||
display.setCursor(10, 220);
|
||||
display.print(name2); // Name
|
||||
display.setFont(&Ubuntu_Bold8pt7b);
|
||||
display.setCursor(10, 190);
|
||||
display.print(" ");
|
||||
display.print(unit2old); // Unit
|
||||
display.print(unit2old); // Unit
|
||||
}
|
||||
|
||||
// Show values TWD
|
||||
@@ -200,14 +200,14 @@ public:
|
||||
else{
|
||||
display.setFont(&DSEG7Classic_BoldItalic20pt7b);
|
||||
display.setCursor(295, 65);
|
||||
display.print(svalue3old); // Value
|
||||
display.print(svalue3old); // Value
|
||||
display.setFont(&Ubuntu_Bold12pt7b);
|
||||
display.setCursor(335, 95);
|
||||
display.print(name3); // Name
|
||||
display.setFont(&Ubuntu_Bold8pt7b);
|
||||
display.setCursor(335, 115);
|
||||
display.print(" ");
|
||||
display.print(unit3old); // Unit
|
||||
display.print(unit3old); // Unit
|
||||
}
|
||||
|
||||
// Horizintal separator right
|
||||
@@ -230,14 +230,14 @@ public:
|
||||
else{
|
||||
display.setFont(&DSEG7Classic_BoldItalic20pt7b);
|
||||
display.setCursor(295, 270);
|
||||
display.print(svalue4old); // Value
|
||||
display.print(svalue4old); // Value
|
||||
display.setFont(&Ubuntu_Bold12pt7b);
|
||||
display.setCursor(335, 220);
|
||||
display.print(name4); // Name
|
||||
display.setFont(&Ubuntu_Bold8pt7b);
|
||||
display.setCursor(335, 190);
|
||||
display.print(" ");
|
||||
display.print(unit4old); // Unit
|
||||
display.print(unit4old); // Unit
|
||||
}
|
||||
|
||||
//*******************************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user