@@ -113,46 +113,38 @@ void displaySplash()
113113 oled.begin (); // Initialize the OLED
114114 oled.clear (PAGE); // Clear the display's internal memory
115115
116- oled.setCursor (10 , 2 ); // x, y
117- oled.setFontType (0 ); // Set font to smallest
118- oled.print (F (" SparkFun" ));
116+ int yPos = 0 ;
117+ int fontHeight = 8 ;
119118
120- oled.setCursor (21 , 13 );
121- oled.setFontType (1 );
122- oled.print (F (" RTK" ));
119+ printTextCenter (" SparkFun" , yPos, 0 , 1 , false ); // text, y, font type, kerning, inverted
123120
124- int textX;
125- int textY;
126- int textKerning;
121+ yPos = yPos + fontHeight + 2 ;
122+ printTextCenter (" RTK" , yPos, 1 , 1 , false );
123+
124+ yPos = yPos + fontHeight + 4 ;
127125
128126 if (productVariant == RTK_SURVEYOR)
129127 {
130- textX = 2 ;
131- textY = 25 ;
132- textKerning = 8 ;
133- oled.setFontType (1 );
134- printTextwithKerning (" Surveyor" , textX, textY, textKerning);
128+ printTextCenter (" Surveyor" , yPos, 1 , 1 , false );
135129 }
136130 else if (productVariant == RTK_EXPRESS)
137131 {
138- textX = 3 ;
139- textY = 25 ;
140- textKerning = 9 ;
141- oled. setFontType ( 1 );
142- printTextwithKerning (" Express" , textX, textY, textKerning );
132+ printTextCenter ( " Express " , yPos, 1 , 1 , false ) ;
133+ }
134+ else if (productVariant == RTK_EXPRESS_PLUS)
135+ {
136+ printTextCenter (" Express+ " , yPos, 1 , 1 , false );
143137 }
144138 else if (productVariant == RTK_FACET)
145139 {
146- textX = 11 ;
147- textY = 25 ;
148- textKerning = 9 ;
149- oled.setFontType (1 );
150- printTextwithKerning (" Facet" , textX, textY, textKerning);
140+ printTextCenter (" Facet" , yPos, 1 , 1 , false );
151141 }
152142
153- oled.setCursor (20 , 41 );
154- oled.setFontType (0 ); // Set font to smallest
155- oled.printf (" v%d.%d" , FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);
143+ yPos = yPos + fontHeight + 9 ;
144+ char unitFirmware[50 ];
145+ sprintf (unitFirmware, " v%d.%d" , FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);
146+ printTextCenter (unitFirmware, yPos, 0 , 1 , false );
147+
156148 oled.display ();
157149 }
158150}
@@ -1362,42 +1354,76 @@ void paintDisplaySetup()
13621354{
13631355 if (online.display == true )
13641356 {
1365- if (setupState == STATE_MARK_EVENT)
1366- {
1367- printTextCenter (" Mark" , 12 * 0 , 1 , 1 , true ); // string, y, font type, kerning, inverted
1368- printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1369- printTextCenter (" Base" , 12 * 2 , 1 , 1 , false );
1370- printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , false );
1371- }
1372- else if (setupState == STATE_ROVER_NOT_STARTED)
1373- {
1374- printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false );
1375- printTextCenter (" Rover" , 12 * 1 , 1 , 1 , true );
1376- printTextCenter (" Base" , 12 * 2 , 1 , 1 , false );
1377- printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , false );
1378- }
1379- else if (setupState == STATE_BASE_NOT_STARTED)
1380- {
1381- printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false ); // string, y, font type, kerning, inverted
1382- printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1383- printTextCenter (" Base" , 12 * 2 , 1 , 1 , true );
1384- printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , false );
1385- }
1386- else if (setupState == STATE_BUBBLE_LEVEL)
1357+ if (zedModuleType == PLATFORM_F9P)
13871358 {
1388- printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false ); // string, y, font type, kerning, inverted
1389- printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1390- printTextCenter (" Base" , 12 * 2 , 1 , 1 , false );
1391- printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , true );
1392- }
1393- else if (setupState == STATE_WIFI_CONFIG_NOT_STARTED)
1359+ if (setupState == STATE_MARK_EVENT)
1360+ {
1361+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , true ); // string, y, font type, kerning, inverted
1362+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1363+ printTextCenter (" Base" , 12 * 2 , 1 , 1 , false );
1364+ printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , false );
1365+ }
1366+ else if (setupState == STATE_ROVER_NOT_STARTED)
1367+ {
1368+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false );
1369+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , true );
1370+ printTextCenter (" Base" , 12 * 2 , 1 , 1 , false );
1371+ printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , false );
1372+ }
1373+ else if (setupState == STATE_BASE_NOT_STARTED)
1374+ {
1375+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false ); // string, y, font type, kerning, inverted
1376+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1377+ printTextCenter (" Base" , 12 * 2 , 1 , 1 , true );
1378+ printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , false );
1379+ }
1380+ else if (setupState == STATE_BUBBLE_LEVEL)
1381+ {
1382+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false ); // string, y, font type, kerning, inverted
1383+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1384+ printTextCenter (" Base" , 12 * 2 , 1 , 1 , false );
1385+ printTextCenter (" Bubble" , 12 * 3 , 1 , 1 , true );
1386+ }
1387+ else if (setupState == STATE_WIFI_CONFIG_NOT_STARTED)
1388+ {
1389+ printTextCenter (" Rover" , 12 * 0 , 1 , 1 , false );
1390+ printTextCenter (" Base" , 12 * 1 , 1 , 1 , false );
1391+ printTextCenter (" Bubble" , 12 * 2 , 1 , 1 , false );
1392+ printTextCenter (" Config" , 12 * 3 , 1 , 1 , true );
1393+ }
1394+ } // end type F9P
1395+ else if (zedModuleType == PLATFORM_F9R)
13941396 {
1395- printTextCenter (" Rover" , 12 * 0 , 1 , 1 , false );
1396- printTextCenter (" Base" , 12 * 1 , 1 , 1 , false );
1397- printTextCenter (" Bubble" , 12 * 2 , 1 , 1 , false );
1398- printTextCenter (" Config" , 12 * 3 , 1 , 1 , true );
1399- }
1400- }
1397+ if (setupState == STATE_MARK_EVENT)
1398+ {
1399+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , true ); // string, y, font type, kerning, inverted
1400+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1401+ printTextCenter (" Bubble" , 12 * 2 , 1 , 1 , false );
1402+ printTextCenter (" Config" , 12 * 3 , 1 , 1 , false );
1403+ }
1404+ else if (setupState == STATE_ROVER_NOT_STARTED)
1405+ {
1406+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false );
1407+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , true );
1408+ printTextCenter (" Bubble" , 12 * 2 , 1 , 1 , false );
1409+ printTextCenter (" Config" , 12 * 3 , 1 , 1 , false );
1410+ }
1411+ else if (setupState == STATE_BUBBLE_LEVEL)
1412+ {
1413+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false );
1414+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1415+ printTextCenter (" Bubble" , 12 * 2 , 1 , 1 , true );
1416+ printTextCenter (" Config" , 12 * 3 , 1 , 1 , false );
1417+ }
1418+ else if (setupState == STATE_WIFI_CONFIG_NOT_STARTED)
1419+ {
1420+ printTextCenter (" Mark" , 12 * 0 , 1 , 1 , false );
1421+ printTextCenter (" Rover" , 12 * 1 , 1 , 1 , false );
1422+ printTextCenter (" Bubble" , 12 * 2 , 1 , 1 , false );
1423+ printTextCenter (" Config" , 12 * 3 , 1 , 1 , true );
1424+ }
1425+ } // end type F9R
1426+ } // end display online
14011427}
14021428
14031429// Given text, and location, print text center of the screen
0 commit comments