Compare commits
No commits in common. "d0076f336d395de8cbd0e30e4a85a34f4c38e6e0" and "34a289048f9d9e01c1d1a148b94e39cc66f7b2e1" have entirely different histories.
d0076f336d
...
34a289048f
|
|
@ -58,11 +58,6 @@ public:
|
||||||
static String unit5old = "";
|
static String unit5old = "";
|
||||||
static String svalue6old = "";
|
static String svalue6old = "";
|
||||||
static String unit6old = "";
|
static String unit6old = "";
|
||||||
static GFXfont name3font;
|
|
||||||
static GFXfont name4font;
|
|
||||||
static GFXfont name5font;
|
|
||||||
static GFXfont name6font;
|
|
||||||
|
|
||||||
|
|
||||||
// Get config data
|
// Get config data
|
||||||
String lengthformat = config->getString(config->lengthFormat);
|
String lengthformat = config->getString(config->lengthFormat);
|
||||||
|
|
@ -119,12 +114,6 @@ public:
|
||||||
GwApi::BoatValue *bvalue3 = pageData.values[0];
|
GwApi::BoatValue *bvalue3 = pageData.values[0];
|
||||||
String name3 = xdrDelete(bvalue3->getName()); // Value name
|
String name3 = xdrDelete(bvalue3->getName()); // Value name
|
||||||
name3 = name3.substring(0, 6); // String length limit for value name
|
name3 = name3.substring(0, 6); // String length limit for value name
|
||||||
if (name3.length()>3){
|
|
||||||
name3font=Ubuntu_Bold8pt8b;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
name3font=Ubuntu_Bold12pt8b;
|
|
||||||
}
|
|
||||||
calibrationData.calibrateInstance(bvalue3, logger); // Check if boat data value is to be calibrated
|
calibrationData.calibrateInstance(bvalue3, logger); // Check if boat data value is to be calibrated
|
||||||
double value3 = bvalue3->value; // Value as double in SI unit
|
double value3 = bvalue3->value; // Value as double in SI unit
|
||||||
bool valid3 = bvalue3->valid; // Valid information
|
bool valid3 = bvalue3->valid; // Valid information
|
||||||
|
|
@ -139,12 +128,6 @@ public:
|
||||||
GwApi::BoatValue *bvalue4 = pageData.values[1];
|
GwApi::BoatValue *bvalue4 = pageData.values[1];
|
||||||
String name4 = xdrDelete(bvalue4->getName()); // Value name
|
String name4 = xdrDelete(bvalue4->getName()); // Value name
|
||||||
name4 = name4.substring(0, 6); // String length limit for value name
|
name4 = name4.substring(0, 6); // String length limit for value name
|
||||||
if (name4.length()>3){
|
|
||||||
name4font=Ubuntu_Bold8pt8b;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
name4font=Ubuntu_Bold12pt8b;
|
|
||||||
}
|
|
||||||
calibrationData.calibrateInstance(bvalue4, logger); // Check if boat data value is to be calibrated
|
calibrationData.calibrateInstance(bvalue4, logger); // Check if boat data value is to be calibrated
|
||||||
double value4 = bvalue4->value; // Value as double in SI unit
|
double value4 = bvalue4->value; // Value as double in SI unit
|
||||||
bool valid4 = bvalue4->valid; // Valid information
|
bool valid4 = bvalue4->valid; // Valid information
|
||||||
|
|
@ -159,12 +142,6 @@ public:
|
||||||
GwApi::BoatValue *bvalue5 = pageData.values[2];
|
GwApi::BoatValue *bvalue5 = pageData.values[2];
|
||||||
String name5 = xdrDelete(bvalue5->getName()); // Value name
|
String name5 = xdrDelete(bvalue5->getName()); // Value name
|
||||||
name5 = name5.substring(0, 6); // String length limit for value name
|
name5 = name5.substring(0, 6); // String length limit for value name
|
||||||
if (name5.length()>3){
|
|
||||||
name5font=Ubuntu_Bold8pt8b;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
name5font=Ubuntu_Bold12pt8b;
|
|
||||||
}
|
|
||||||
calibrationData.calibrateInstance(bvalue5, logger); // Check if boat data value is to be calibrated
|
calibrationData.calibrateInstance(bvalue5, logger); // Check if boat data value is to be calibrated
|
||||||
double value5 = bvalue5->value; // Value as double in SI unit
|
double value5 = bvalue5->value; // Value as double in SI unit
|
||||||
bool valid5 = bvalue5->valid; // Valid information
|
bool valid5 = bvalue5->valid; // Valid information
|
||||||
|
|
@ -175,16 +152,10 @@ public:
|
||||||
unit5old = unit5; // Save old unit
|
unit5old = unit5; // Save old unit
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get boat value for center (name is not displayed)
|
// Get boat value for center
|
||||||
GwApi::BoatValue *bvalue6 = pageData.values[3];
|
GwApi::BoatValue *bvalue6 = pageData.values[3];
|
||||||
String name6 = xdrDelete(bvalue6->getName()); // Value name
|
String name6 = xdrDelete(bvalue6->getName()); // Value name
|
||||||
name6 = name6.substring(0, 6); // String length limit for value name
|
name6 = name6.substring(0, 6); // String length limit for value name
|
||||||
if (name6.length()>3){
|
|
||||||
name6font=Ubuntu_Bold8pt8b;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
name6font=Ubuntu_Bold8pt8b;
|
|
||||||
}
|
|
||||||
calibrationData.calibrateInstance(bvalue6, logger); // Check if boat data value is to be calibrated
|
calibrationData.calibrateInstance(bvalue6, logger); // Check if boat data value is to be calibrated
|
||||||
double value6 = bvalue6->value; // Value as double in SI unit
|
double value6 = bvalue6->value; // Value as double in SI unit
|
||||||
bool valid6 = bvalue6->valid; // Valid information
|
bool valid6 = bvalue6->valid; // Valid information
|
||||||
|
|
@ -238,7 +209,7 @@ public:
|
||||||
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
|
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
|
||||||
getdisplay().setCursor(10, 270);
|
getdisplay().setCursor(10, 270);
|
||||||
getdisplay().print(svalue3); // Value
|
getdisplay().print(svalue3); // Value
|
||||||
getdisplay().setFont(&name3font);
|
getdisplay().setFont(&Ubuntu_Bold12pt8b);
|
||||||
getdisplay().setCursor(10, 220);
|
getdisplay().setCursor(10, 220);
|
||||||
getdisplay().print(name3); // Name
|
getdisplay().print(name3); // Name
|
||||||
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
||||||
|
|
@ -254,12 +225,17 @@ public:
|
||||||
// Show value 4 (=second user-configured parameter) at top right
|
// Show value 4 (=second user-configured parameter) at top right
|
||||||
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
|
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
|
||||||
getdisplay().setCursor(295, 65);
|
getdisplay().setCursor(295, 65);
|
||||||
getdisplay().print(svalue4); // Value
|
if(valid3 == true){
|
||||||
getdisplay().setFont(&name4font);
|
getdisplay().print(svalue4); // Value
|
||||||
getdisplay().setCursor(325, 95);
|
}
|
||||||
|
else{
|
||||||
|
getdisplay().print("---"); // Value
|
||||||
|
}
|
||||||
|
getdisplay().setFont(&Ubuntu_Bold12pt8b);
|
||||||
|
getdisplay().setCursor(335, 95);
|
||||||
getdisplay().print(name4); // Name
|
getdisplay().print(name4); // Name
|
||||||
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
||||||
getdisplay().setCursor(325, 115);
|
getdisplay().setCursor(335, 115);
|
||||||
getdisplay().print(" ");
|
getdisplay().print(" ");
|
||||||
if(holdvalues == false){
|
if(holdvalues == false){
|
||||||
getdisplay().print(unit4); // Unit
|
getdisplay().print(unit4); // Unit
|
||||||
|
|
@ -275,11 +251,11 @@ public:
|
||||||
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
|
getdisplay().setFont(&DSEG7Classic_BoldItalic20pt7b);
|
||||||
getdisplay().setCursor(295, 270);
|
getdisplay().setCursor(295, 270);
|
||||||
getdisplay().print(svalue5); // Value
|
getdisplay().print(svalue5); // Value
|
||||||
getdisplay().setFont(&name5font);
|
getdisplay().setFont(&Ubuntu_Bold12pt8b);
|
||||||
getdisplay().setCursor(325, 220);
|
getdisplay().setCursor(335, 220);
|
||||||
getdisplay().print(name5); // Name
|
getdisplay().print(name5); // Name
|
||||||
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
getdisplay().setFont(&Ubuntu_Bold8pt8b);
|
||||||
getdisplay().setCursor(325, 190);
|
getdisplay().setCursor(335, 190);
|
||||||
getdisplay().print(" ");
|
getdisplay().print(" ");
|
||||||
if(holdvalues == false){
|
if(holdvalues == false){
|
||||||
getdisplay().print(unit5); // Unit
|
getdisplay().print(unit5); // Unit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue