@@ -365,14 +365,20 @@ void printReports()
365
365
// If we are in rover mode, display HPA and SIV
366
366
if (inRoverMode () == true )
367
367
{
368
+ systemPrintf (" Rover: " );
369
+
368
370
float hpa = gnssGetHorizontalAccuracy ();
369
371
370
- char modifiedHpa[20 ];
371
- const char *hpaUnits =
372
- getHpaUnits (hpa, modifiedHpa, sizeof (modifiedHpa), 3 ); // Returns string of the HPA units
372
+ if (hpa <= 30 .)
373
+ {
374
+ char modifiedHpa[20 ];
375
+ const char *hpaUnits =
376
+ getHpaUnits (hpa, modifiedHpa, sizeof (modifiedHpa), 3 ); // Returns string of the HPA units
373
377
374
- systemPrintf (" Rover Accuracy (%s): %s, SIV: %d GNSS State: " , hpaUnits, modifiedHpa,
375
- gnssGetSatellitesInView ());
378
+ systemPrintf (" Accuracy (%s): %s, " , hpaUnits, modifiedHpa);
379
+ }
380
+
381
+ systemPrintf (" SIV: %d GNSS State: " , gnssGetSatellitesInView ());
376
382
377
383
if (gnssIsRTKFix () == true )
378
384
systemPrint (" RTK Fix" );
@@ -721,11 +727,14 @@ const char *getHpaUnits(double hpa, char *buffer, int length, int decimals)
721
727
{
722
728
const char *units;
723
729
730
+ static const char unknown[] = " Unknown" ;
731
+ static const char inch[] = " in" ;
732
+
724
733
// Return the units
725
734
if (settings.measurementScale >= MEASUREMENT_SCALE_MAX)
726
735
{
727
- units = " Unknown " ;
728
- strcpy (buffer, " Unknown " );
736
+ units = unknown ;
737
+ strncpy (buffer, unknown, length );
729
738
}
730
739
else
731
740
{
@@ -747,7 +756,7 @@ const char *getHpaUnits(double hpa, char *buffer, int length, int decimals)
747
756
snprintf (buffer, length, " %.*f" , decimals, feet);
748
757
else
749
758
{
750
- units = " in " ;
759
+ units = inch ;
751
760
snprintf (buffer, length, " %.*f" , decimals, inches);
752
761
}
753
762
break ;
0 commit comments