@@ -1170,6 +1170,24 @@ void displayRoverFail(uint16_t displayTime)
11701170 }
11711171}
11721172
1173+ void displayAccelFail (uint16_t displayTime)
1174+ {
1175+ if (online.display == true )
1176+ {
1177+ oled.clear (PAGE);
1178+
1179+ uint8_t fontHeight = 15 ;
1180+ uint8_t yPos = LCDHEIGHT / 2 - fontHeight;
1181+
1182+ printTextCenter (" Accel" , yPos, 1 , 1 , false ); // text, y, font type, kerning, inverted
1183+ printTextCenter (" Failed" , yPos + fontHeight, 1 , 1 , false ); // text, y, font type, kerning, inverted
1184+
1185+ oled.display ();
1186+
1187+ delay (displayTime);
1188+ }
1189+ }
1190+
11731191// When user enters serial config menu the display will freeze so show splash while config happens
11741192void displaySerialConfig ()
11751193{
@@ -1429,8 +1447,21 @@ void paintSystemTest()
14291447 oled.setCursor (xOffset, yOffset + (5 * charHeight) ); // x, y
14301448 oled.print (macAddress);
14311449 oled.print (" :" );
1450+
1451+ // Verify the ESP UART2 can communicate TX/RX to ZED UART1
14321452 if (zedUartPassed == false )
1433- oled.print (F (" FAIL" ));
1453+ {
1454+ SFE_UBLOX_GNSS myGNSS;
1455+
1456+ // begin() attempts 3 connections
1457+ if (myGNSS.begin (serialGNSS) == true )
1458+ {
1459+ zedUartPassed = true ;
1460+ oled.print (F (" OK" ));
1461+ }
1462+ else
1463+ oled.print (F (" FAIL" ));
1464+ }
14341465 else
14351466 oled.print (F (" OK" ));
14361467 }
@@ -1445,22 +1476,29 @@ void paintBubbleLevel()
14451476{
14461477 if (online.display == true )
14471478 {
1448- forceDisplayUpdate = true ; // Update the display as quickly as possible
1479+ if (online.accelerometer == true )
1480+ {
1481+ forceDisplayUpdate = true ; // Update the display as quickly as possible
14491482
1450- getAngles ();
1483+ getAngles ();
14511484
1452- // Draw dot in middle
1453- oled.pixel (LCDWIDTH / 2 , LCDHEIGHT / 2 );
1454- oled.pixel (LCDWIDTH / 2 + 1 , LCDHEIGHT / 2 );
1455- oled.pixel (LCDWIDTH / 2 , LCDHEIGHT / 2 + 1 );
1456- oled.pixel (LCDWIDTH / 2 + 1 , LCDHEIGHT / 2 + 1 );
1485+ // Draw dot in middle
1486+ oled.pixel (LCDWIDTH / 2 , LCDHEIGHT / 2 );
1487+ oled.pixel (LCDWIDTH / 2 + 1 , LCDHEIGHT / 2 );
1488+ oled.pixel (LCDWIDTH / 2 , LCDHEIGHT / 2 + 1 );
1489+ oled.pixel (LCDWIDTH / 2 + 1 , LCDHEIGHT / 2 + 1 );
14571490
1458- // Draw circle relative to dot
1459- const int radiusLarge = 10 ;
1460- const int radiusSmall = 4 ;
1491+ // Draw circle relative to dot
1492+ const int radiusLarge = 10 ;
1493+ const int radiusSmall = 4 ;
14611494
1462- oled.circle (LCDWIDTH / 2 - averagedPitch, LCDHEIGHT / 2 + averagedRoll, radiusLarge);
1463- oled.circle (LCDWIDTH / 2 - averagedPitch, LCDHEIGHT / 2 + averagedRoll, radiusSmall);
1495+ oled.circle (LCDWIDTH / 2 - averagedPitch, LCDHEIGHT / 2 + averagedRoll, radiusLarge);
1496+ oled.circle (LCDWIDTH / 2 - averagedPitch, LCDHEIGHT / 2 + averagedRoll, radiusSmall);
1497+ }
1498+ else
1499+ {
1500+ displayAccelFail (0 );
1501+ }
14641502 }
14651503}
14661504
0 commit comments