Skip to content

Commit 22261e2

Browse files
committed
MatrixLCD autoscroll avoidance
1 parent f292375 commit 22261e2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

modGPS.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266

267267
If modMatrixLCD.DashMode = True Then
268268
If modMatrixLCD.intToast = 0 Then
269-
modMatrixLCD.ShowNotification(CStr(Math.Round(dblSpeed * KnotsToMPH, 1)) & " mph " & CStr(Math.Round(DistanceToNext, 1)), CurrentLatitude.ToString.PadRight(7, Convert.ToChar("0")).Substring(0, 7) & "," & CurrentLongitude.ToString.PadRight(8, Convert.ToChar("0")).Substring(0, 8), False)
269+
modMatrixLCD.ShowNotification(CurrentLatitude.ToString.PadRight(7, Convert.ToChar("0")).Substring(0, 7) & "," & CurrentLongitude.ToString.PadRight(8, Convert.ToChar("0")).Substring(0, 8), CStr(Math.Round(dblSpeed * KnotsToMPH, 1)) & " mph " & CStr(Math.Round(DistanceToNext, 1)), False)
270270
Else
271271
modMatrixLCD.intToast = modMatrixLCD.intToast - 1
272272
End If

modMatrixLCD.vb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@
5252
End If
5353
MatrixLCDisplay.WriteString(strLine1)
5454
If strLine2 <> "" Then
55-
MatrixLCDisplay.NewLine()
55+
If strLine1.Length < MatrixLCDisplay.Cols Then
56+
MatrixLCDisplay.NewLine()
57+
End If
5658
If strLine2.Length >= MatrixLCDisplay.Cols Then
57-
strLine2 = strLine2.Substring(0, MatrixLCDisplay.Cols)
59+
strLine2 = strLine2.Substring(0, MatrixLCDisplay.Cols - 1)
5860
End If
5961
MatrixLCDisplay.WriteString(strLine2)
6062
End If

0 commit comments

Comments
 (0)