@@ -57,29 +57,31 @@ static uint32_t icons;
57
57
void beginDisplay ()
58
58
{
59
59
blinking_icons = 0 ;
60
- if (oled.begin () == true )
61
- {
62
- online.display = true ;
63
-
64
- Serial.println (" Display started" );
65
60
66
- // Display the SparkFun LOGO
67
- oled.erase ();
68
- displayBitmap (0 , 0 , logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
69
- oled.display ();
70
- splashStart = millis ();
71
- }
72
- else
61
+ // At this point we have not identified the RTK platform
62
+ // If it's surveyor, there won't be a display and we have a 100ms delay
63
+ // If it's other platforms, we will try 3 times
64
+ int maxTries = 3 ;
65
+ for (int x = 0 ; x < maxTries ; x++)
73
66
{
74
- if (productVariant == RTK_SURVEYOR )
67
+ if (oled. begin () == true )
75
68
{
76
- Serial.println (" Display not detected" );
77
- }
78
- else if (productVariant == RTK_EXPRESS || productVariant == RTK_EXPRESS_PLUS || productVariant == RTK_FACET || productVariant == RTK_FACET_LBAND)
79
- {
80
- Serial.println (" Display Error: Not detected." );
69
+ online.display = true ;
70
+
71
+ Serial.println (" Display started" );
72
+
73
+ // Display the SparkFun LOGO
74
+ oled.erase ();
75
+ displayBitmap (0 , 0 , logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
76
+ oled.display ();
77
+ splashStart = millis ();
78
+ return ;
81
79
}
80
+
81
+ delay (50 ); // Give display time to startup before attempting again
82
82
}
83
+
84
+ Serial.println (" Display not detected" );
83
85
}
84
86
85
87
// Given the system state, display the appropriate information
0 commit comments