@@ -54,26 +54,26 @@ void updateDisplay()
5454 | ICON_BATTERY // Top right
5555 | ICON_CROSS_HAIR // Center left
5656 | ICON_HORIZONTAL_ACCURACY // Center right
57+ | paintSIV () // Bottom left
5758 | ICON_LOGGING; // Bottom right
58- paintRoverNoFix ();
5959 break ;
6060 case (STATE_ROVER_NO_FIX):
6161 icons = paintWirelessIcon () // Top left
6262 | ICON_DYNAMIC_MODEL // Top center
6363 | ICON_BATTERY // Top right
6464 | ICON_CROSS_HAIR // Center left
6565 | ICON_HORIZONTAL_ACCURACY // Center right
66+ | paintSIV () // Bottom left
6667 | ICON_LOGGING; // Bottom right
67- paintRoverNoFix ();
6868 break ;
6969 case (STATE_ROVER_FIX):
7070 icons = paintWirelessIcon () // Top left
7171 | ICON_DYNAMIC_MODEL // Top center
7272 | ICON_BATTERY // Top right
7373 | ICON_CROSS_HAIR // Center left
7474 | ICON_HORIZONTAL_ACCURACY // Center right
75+ | paintSIV () // Bottom left
7576 | ICON_LOGGING; // Bottom right
76- paintRoverFix ();
7777 break ;
7878 case (STATE_ROVER_RTK_FLOAT):
7979 blinking_icons ^= ICON_CROSS_HAIR_DUAL;
@@ -82,17 +82,17 @@ void updateDisplay()
8282 | ICON_BATTERY // Top right
8383 | (blinking_icons & ICON_CROSS_HAIR_DUAL) // Center left
8484 | ICON_HORIZONTAL_ACCURACY // Center right
85+ | paintSIV () // Bottom left
8586 | ICON_LOGGING; // Bottom right
86- paintRoverRTKFloat ();
8787 break ;
8888 case (STATE_ROVER_RTK_FIX):
8989 icons = paintWirelessIcon () // Top left
9090 | ICON_DYNAMIC_MODEL // Top center
9191 | ICON_BATTERY // Top right
9292 | ICON_CROSS_HAIR_DUAL// Center left
9393 | ICON_HORIZONTAL_ACCURACY // Center right
94+ | paintSIV () // Bottom left
9495 | ICON_LOGGING; // Bottom right
95- paintRoverRTKFix ();
9696 break ;
9797
9898 case (STATE_ROVER_CLIENT_WIFI_STARTED):
@@ -101,41 +101,44 @@ void updateDisplay()
101101 | ICON_BATTERY // Top right
102102 | ICON_CROSS_HAIR // Center left
103103 | ICON_HORIZONTAL_ACCURACY // Center right
104+ | paintSIV () // Bottom left
104105 | ICON_LOGGING; // Bottom right
105- paintRoverWiFiStarted ();
106106 break ;
107107 case (STATE_ROVER_CLIENT_WIFI_CONNECTED):
108108 icons = paintWirelessIcon () // Top left
109109 | ICON_DYNAMIC_MODEL // Top center
110110 | ICON_BATTERY // Top right
111111 | ICON_CROSS_HAIR // Center left
112112 | ICON_HORIZONTAL_ACCURACY // Center right
113+ | paintSIV () // Bottom left
113114 | ICON_LOGGING; // Bottom right
114- paintRoverWiFiStarted ();
115115 break ;
116116 case (STATE_ROVER_CLIENT_STARTED):
117117 icons = paintWirelessIcon () // Top left
118118 | ICON_DYNAMIC_MODEL // Top center
119119 | ICON_BATTERY // Top right
120120 | ICON_CROSS_HAIR // Center left
121121 | ICON_HORIZONTAL_ACCURACY // Center right
122+ | paintSIV () // Bottom left
122123 | ICON_LOGGING; // Bottom right
123- paintRoverWiFiStarted ();
124124 break ;
125125
126126 case (STATE_BASE_NOT_STARTED):
127127 // Do nothing. Static display shown during state change.
128128 break ;
129+
130+ // Start of base / survey in / NTRIP mode
131+ // Screen is displayed while we are waiting for horz accuracy to drop to appropriate level
132+ // Blink crosshair icon until we have we have horz accuracy < user defined level
129133 case (STATE_BASE_TEMP_SETTLE):
130- // Blink crosshair icon until we achieve <5m horz accuracy (user definable)
131134 blinking_icons ^= ICON_BASE_TEMPORARY | ICON_CROSS_HAIR;
132135 icons = paintWirelessIcon () // Top left
133136 | (blinking_icons & ICON_BASE_TEMPORARY) // Top center
134137 | ICON_BATTERY // Top right
135138 | (blinking_icons & ICON_CROSS_HAIR) // Center left
136139 | ICON_HORIZONTAL_ACCURACY // Center right
140+ | paintSIV () // Bottom left
137141 | ICON_LOGGING; // Bottom right
138- paintBaseTempSettle ();
139142 break ;
140143 case (STATE_BASE_TEMP_SURVEY_STARTED):
141144 blinking_icons ^= ICON_BASE_TEMPORARY;
@@ -347,6 +350,12 @@ void updateDisplay()
347350 if (icons & ICON_HORIZONTAL_ACCURACY)
348351 paintHorizontalAccuracy ();
349352
353+ // Bottom left corner
354+ if (icons & ICON_SIV_ANTENNA)
355+ displayBitmap (2 , 35 , SIV_Antenna_Width, SIV_Antenna_Height, SIV_Antenna);
356+ else if (icons & ICON_SIV_ANTENNA_LBAND)
357+ displayBitmap (2 , 35 , SIV_Antenna_LBand_Width, SIV_Antenna_LBand_Height, SIV_Antenna_LBand);
358+
350359 // Bottom right corner
351360 if (icons & ICON_LOGGING)
352361 paintLogging ();
@@ -587,64 +596,54 @@ void paintDynamicModel()
587596 }
588597}
589598
590- // Draw satellite icon and sats in view
599+ // Select satellite icon and draw sats in view
591600// Blink icon if no fix
592- void paintSIV ()
601+ uint32_t paintSIV ()
593602{
594- if (online.display == true && online.gnss == true )
595- {
596- // Blink satellite dish icon if we don't have a fix
597- if (fixType == 3 || fixType == 4 || fixType == 5 ) // 3D, 3D+DR, or Time
598- {
599- // Fix, turn on icon
600- if (lbandCorrectionsReceived == false )
601- displayBitmap (2 , 35 , SIV_Antenna_Width, SIV_Antenna_Height, SIV_Antenna);
602- else
603- displayBitmap (2 , 35 , SIV_Antenna_LBand_Width, SIV_Antenna_LBand_Height, SIV_Antenna_LBand);
604- }
605- else
606- {
607- if (millis () - lastSatelliteDishIconUpdate > 500 )
608- {
609- // Serial.println("SIV Blink");
610- lastSatelliteDishIconUpdate = millis ();
611- if (satelliteDishIconDisplayed == false )
612- {
613- satelliteDishIconDisplayed = true ;
614-
615- // Draw the icon
616- if (lbandCorrectionsReceived == false )
617- displayBitmap (2 , 35 , SIV_Antenna_Width, SIV_Antenna_Height, SIV_Antenna);
618- else
619- displayBitmap (2 , 35 , SIV_Antenna_LBand_Width, SIV_Antenna_LBand_Height, SIV_Antenna_LBand);
620- }
621- else
622- satelliteDishIconDisplayed = false ;
623- }
624- }
603+ uint32_t blinking;
604+ uint32_t icons;
625605
626- oled.setFont (QW_FONT_8X16); // Set font to type 1: 8x16
627- oled.setCursor (16 , 36 ); // x, y
628- oled.print (" :" );
606+ oled.setFont (QW_FONT_8X16); // Set font to type 1: 8x16
607+ oled.setCursor (16 , 36 ); // x, y
608+ oled.print (" :" );
629609
610+ if (online.gnss )
611+ {
630612 if (fixType == 0 ) // 0 = No Fix
631613 oled.print (" 0" );
632614 else
633615 oled.print (numSV);
634616
635617 paintResets ();
636- } // End gnss online
637- else if (online.display == true && online.gnss == false )
638- {
639- // Fix, turn on icon
640- displayBitmap (2 , 35 , SIV_Antenna_Width, SIV_Antenna_Height, SIV_Antenna);
641618
642- oled.setFont (QW_FONT_8X16); // Set font to type 1: 8x16
643- oled.setCursor (16 , 36 ); // x, y
644- oled.print (" :" );
619+ // Determine which icon to display
620+ icons = 0 ;
621+ if (lbandCorrectionsReceived)
622+ blinking = ICON_SIV_ANTENNA_LBAND;
623+ else
624+ blinking = ICON_SIV_ANTENNA;
645625
626+ // Determine if there is a fix
627+ if (fixType == 3 || fixType == 4 || fixType == 5 ) // 3D, 3D+DR, or Time
628+ {
629+ // Fix, turn on icon
630+ icons = blinking;
631+ }
632+ else
633+ {
634+ // Blink satellite dish icon if we don't have a fix
635+ blinking_icons ^= blinking;
636+ if (blinking_icons & blinking)
637+ icons = blinking;
638+ }
639+ } // End gnss online
640+ else
641+ {
646642 oled.print (" X" );
643+
644+ icons = ICON_SIV_ANTENNA;
647645 }
646+ return icons;
648647}
649648
650649// Draw log icon
@@ -681,62 +680,6 @@ void paintLogging()
681680 }
682681}
683682
684- // Base screen. Display BLE, rover, battery, HorzAcc and SIV
685- // Blink SIV until fix
686- void paintRoverNoFix ()
687- {
688- if (online.display == true )
689- {
690- paintSIV ();
691- }
692- }
693-
694- // Currently identical to RoverNoFix because paintSIV and paintHorizontalAccuracy takes into account system states
695- void paintRoverFix ()
696- {
697- if (online.display == true )
698- {
699- paintSIV ();
700- }
701- }
702-
703- // Currently identical to RoverNoFix because paintSIV and paintHorizontalAccuracy takes into account system states
704- void paintRoverRTKFloat ()
705- {
706- if (online.display == true )
707- {
708- paintSIV ();
709- }
710- }
711-
712- void paintRoverRTKFix ()
713- {
714- if (online.display == true )
715- {
716- paintSIV ();
717- }
718- }
719-
720- // Display Blinking WiFi
721- void paintRoverWiFiStarted ()
722- {
723- if (online.display == true )
724- {
725- paintSIV ();
726- }
727- }
728-
729- // Start of base / survey in / NTRIP mode
730- // Screen is displayed while we are waiting for horz accuracy to drop to appropriate level
731- // Blink crosshair icon until we have we have horz accuracy < user defined level
732- void paintBaseTempSettle ()
733- {
734- if (online.display == true )
735- {
736- paintSIV ();
737- }
738- }
739-
740683// Survey in is running. Show 3D Mean and elapsed time.
741684void paintBaseTempSurveyStarted ()
742685{
0 commit comments