Hi,
I'm getting the GPS speed in m/sec and converting to Kmh. No matter what I try when I get to 100Kmh or above it will only display the first 2 digits (10).
I have tried hard code 100 and it displays 100.
I have checked that the m/sec figure is correct and it is.
I have tried Round and NumberFormat and each display the same 2 digits at 100, ie 10.
The speed figure is assigned to the big label shown in the designer.
I'm at a loss. Hope someone can help.
I'm getting the GPS speed in m/sec and converting to Kmh. No matter what I try when I get to 100Kmh or above it will only display the first 2 digits (10).
I have tried hard code 100 and it displays 100.
I have checked that the m/sec figure is correct and it is.
I have tried Round and NumberFormat and each display the same 2 digits at 100, ie 10.
The speed figure is assigned to the big label shown in the designer.
I'm at a loss. Hope someone can help.
B4X:
lblSpeed.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.RIGHT)
Dim iSpeed As Int
Dim cSpeed As String
iSpeed = NumberFormat((Location1.Speed*3.6),0,0)
cSpeed = iSpeed
'lblSpeed.Text = $"$1.2{Round(Location1.Speed*3.6)}"$
lblSpeed.Text = cSpeed