@@ -54,26 +54,26 @@ void updateDisplay()
54
54
| ICON_BATTERY // Top right
55
55
| ICON_CROSS_HAIR // Center left
56
56
| ICON_HORIZONTAL_ACCURACY // Center right
57
+ | paintSIV () // Bottom left
57
58
| ICON_LOGGING; // Bottom right
58
- paintRoverNoFix ();
59
59
break ;
60
60
case (STATE_ROVER_NO_FIX):
61
61
icons = paintWirelessIcon () // Top left
62
62
| ICON_DYNAMIC_MODEL // Top center
63
63
| ICON_BATTERY // Top right
64
64
| ICON_CROSS_HAIR // Center left
65
65
| ICON_HORIZONTAL_ACCURACY // Center right
66
+ | paintSIV () // Bottom left
66
67
| ICON_LOGGING; // Bottom right
67
- paintRoverNoFix ();
68
68
break ;
69
69
case (STATE_ROVER_FIX):
70
70
icons = paintWirelessIcon () // Top left
71
71
| ICON_DYNAMIC_MODEL // Top center
72
72
| ICON_BATTERY // Top right
73
73
| ICON_CROSS_HAIR // Center left
74
74
| ICON_HORIZONTAL_ACCURACY // Center right
75
+ | paintSIV () // Bottom left
75
76
| ICON_LOGGING; // Bottom right
76
- paintRoverFix ();
77
77
break ;
78
78
case (STATE_ROVER_RTK_FLOAT):
79
79
blinking_icons ^= ICON_CROSS_HAIR_DUAL;
@@ -82,17 +82,17 @@ void updateDisplay()
82
82
| ICON_BATTERY // Top right
83
83
| (blinking_icons & ICON_CROSS_HAIR_DUAL) // Center left
84
84
| ICON_HORIZONTAL_ACCURACY // Center right
85
+ | paintSIV () // Bottom left
85
86
| ICON_LOGGING; // Bottom right
86
- paintRoverRTKFloat ();
87
87
break ;
88
88
case (STATE_ROVER_RTK_FIX):
89
89
icons = paintWirelessIcon () // Top left
90
90
| ICON_DYNAMIC_MODEL // Top center
91
91
| ICON_BATTERY // Top right
92
92
| ICON_CROSS_HAIR_DUAL// Center left
93
93
| ICON_HORIZONTAL_ACCURACY // Center right
94
+ | paintSIV () // Bottom left
94
95
| ICON_LOGGING; // Bottom right
95
- paintRoverRTKFix ();
96
96
break ;
97
97
98
98
case (STATE_ROVER_CLIENT_WIFI_STARTED):
@@ -101,41 +101,44 @@ void updateDisplay()
101
101
| ICON_BATTERY // Top right
102
102
| ICON_CROSS_HAIR // Center left
103
103
| ICON_HORIZONTAL_ACCURACY // Center right
104
+ | paintSIV () // Bottom left
104
105
| ICON_LOGGING; // Bottom right
105
- paintRoverWiFiStarted ();
106
106
break ;
107
107
case (STATE_ROVER_CLIENT_WIFI_CONNECTED):
108
108
icons = paintWirelessIcon () // Top left
109
109
| ICON_DYNAMIC_MODEL // Top center
110
110
| ICON_BATTERY // Top right
111
111
| ICON_CROSS_HAIR // Center left
112
112
| ICON_HORIZONTAL_ACCURACY // Center right
113
+ | paintSIV () // Bottom left
113
114
| ICON_LOGGING; // Bottom right
114
- paintRoverWiFiStarted ();
115
115
break ;
116
116
case (STATE_ROVER_CLIENT_STARTED):
117
117
icons = paintWirelessIcon () // Top left
118
118
| ICON_DYNAMIC_MODEL // Top center
119
119
| ICON_BATTERY // Top right
120
120
| ICON_CROSS_HAIR // Center left
121
121
| ICON_HORIZONTAL_ACCURACY // Center right
122
+ | paintSIV () // Bottom left
122
123
| ICON_LOGGING; // Bottom right
123
- paintRoverWiFiStarted ();
124
124
break ;
125
125
126
126
case (STATE_BASE_NOT_STARTED):
127
127
// Do nothing. Static display shown during state change.
128
128
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
129
133
case (STATE_BASE_TEMP_SETTLE):
130
- // Blink crosshair icon until we achieve <5m horz accuracy (user definable)
131
134
blinking_icons ^= ICON_BASE_TEMPORARY | ICON_CROSS_HAIR;
132
135
icons = paintWirelessIcon () // Top left
133
136
| (blinking_icons & ICON_BASE_TEMPORARY) // Top center
134
137
| ICON_BATTERY // Top right
135
138
| (blinking_icons & ICON_CROSS_HAIR) // Center left
136
139
| ICON_HORIZONTAL_ACCURACY // Center right
140
+ | paintSIV () // Bottom left
137
141
| ICON_LOGGING; // Bottom right
138
- paintBaseTempSettle ();
139
142
break ;
140
143
case (STATE_BASE_TEMP_SURVEY_STARTED):
141
144
blinking_icons ^= ICON_BASE_TEMPORARY;
@@ -347,6 +350,12 @@ void updateDisplay()
347
350
if (icons & ICON_HORIZONTAL_ACCURACY)
348
351
paintHorizontalAccuracy ();
349
352
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
+
350
359
// Bottom right corner
351
360
if (icons & ICON_LOGGING)
352
361
paintLogging ();
@@ -587,64 +596,54 @@ void paintDynamicModel()
587
596
}
588
597
}
589
598
590
- // Draw satellite icon and sats in view
599
+ // Select satellite icon and draw sats in view
591
600
// Blink icon if no fix
592
- void paintSIV ()
601
+ uint32_t paintSIV ()
593
602
{
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;
625
605
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 (" :" );
629
609
610
+ if (online.gnss )
611
+ {
630
612
if (fixType == 0 ) // 0 = No Fix
631
613
oled.print (" 0" );
632
614
else
633
615
oled.print (numSV);
634
616
635
617
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);
641
618
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;
645
625
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
+ {
646
642
oled.print (" X" );
643
+
644
+ icons = ICON_SIV_ANTENNA;
647
645
}
646
+ return icons;
648
647
}
649
648
650
649
// Draw log icon
@@ -681,62 +680,6 @@ void paintLogging()
681
680
}
682
681
}
683
682
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
-
740
683
// Survey in is running. Show 3D Mean and elapsed time.
741
684
void paintBaseTempSurveyStarted ()
742
685
{
0 commit comments