Quote:
Originally Posted by wolfgang
The only thing I do not understand is that label4.Text = n displays only even numbers
|
You may be getting two LocationChanged events each time and are being re-entered when you update the labels. You can check with some code like this.
Code:
ReEntry = false ' in Globals
...
Sub gpsint_GPSLocationChanged
If Not(ReEntry) Then
ReEntry = true
If gpsint.GPSValid = true Then
n = n + 1
label2.Text = gpsint.GPSUTCTime
label6.Text = gpsint.GPSSpeed & " [knots]"
label4.Text = n
Else
label2.Text = "no fix, wait"
End If
hw.KeepAlive
ReEntry = false
End IF
End Sub