mirror of
https://github.com/cheveguerra/FLP_2.0.git
synced 2026-04-17 19:36:42 +00:00
- Se agregó código para mande ubicación MINIMO cada minuto
This commit is contained in:
23
Tracker.bas
23
Tracker.bas
@@ -152,23 +152,30 @@ End Sub
|
||||
|
||||
Sub flp_LocationChanged (Location1 As Location)
|
||||
LogColor($"Location Changed - Acc: ${Location1.Accuracy}"$, Colors.blue)
|
||||
Private minsTranscurridos As String = Subs.ticksAMins(DateTime.Now - Subs.traeUltimaUbicacionGuardada.Time) 'Minutos transcurridos desde la ultima ubicacion guardada.
|
||||
LogColor(">>>>>>>>>>>>>>>>>>>>>>> " & minsTranscurridos, Colors.red)
|
||||
If Not(IsPaused(Main)) Then
|
||||
Main.laUbicacion = Location1
|
||||
If Starter.logger Then Log("Main.laubicacion actializada")
|
||||
End If
|
||||
Dim el_texto As String = ""
|
||||
Starter.UUC = Location1
|
||||
flp.RequestLocationUpdates(CreateLocationRequest)
|
||||
If Starter.logger Then LogColor("FLP_LocationChanged", Colors.Red)
|
||||
If Starter.logger Then Log(Location1.Accuracy&" - "&Location1.AccuracyValid)
|
||||
el_texto = $"LocChange - Coords NO enviadas (Acc:${Location1.Accuracy})."$
|
||||
'Solo mandamos la ubicacion si la precision es dentro de XX mts
|
||||
If Location1.Accuracy < minAccuracy Then
|
||||
Subs.mandaLoc2(Location1, Starter.devModel)
|
||||
el_texto = $"LocChange - Coords enviadas (Acc:${Location1.Accuracy})."$
|
||||
If minsTranscurridos > 0 Then
|
||||
flp.RequestLocationUpdates(CreateLocationRequest)
|
||||
'Solo mandamos la ubicacion si la precision es dentro de XX mts
|
||||
el_texto = $"LocChange - Coords NO enviadas (Acc:${Location1.Accuracy})."$
|
||||
If Location1.Accuracy < minAccuracy Then
|
||||
Subs.mandaLoc2(Location1, Starter.devModel)
|
||||
el_texto = $"LocChange - Coords enviadas (Acc:${Location1.Accuracy})."$
|
||||
End If
|
||||
' If Starter.logger Then Log("Loc changed : "&Location1.Latitude&","&Location1.Longitude&"|"&Starter.devModel&"|")
|
||||
Subs.bitacora($"${el_texto}"$)
|
||||
' ToastMessageShow("LocChanged MORE than a min.", False)
|
||||
Else
|
||||
' ToastMessageShow("Locatin changed but less than a min!.", False)
|
||||
End If
|
||||
' If Starter.logger Then Log("Loc changed : "&Location1.Latitude&","&Location1.Longitude&"|"&Starter.devModel&"|")
|
||||
Subs.bitacora($"${el_texto}"$)
|
||||
End Sub
|
||||
|
||||
Sub flp_ConnectionSuspended(SuspendedCause1 As Int)
|
||||
|
||||
Reference in New Issue
Block a user