29/9/23 - Correcciones en el envío de la ubicacion.

This commit is contained in:
2023-09-29 13:17:17 -06:00
parent a721a76d56
commit c9e05a01df
6 changed files with 52 additions and 298 deletions

View File

@@ -119,7 +119,7 @@ Sub deleteGPS_DB
' gps_hist.ExecQuery
gps_hist.ExecNonQuery("delete from RUTA_GPS")
gps_hist.ExecNonQuery("vacuum;")
Log("RUTA_GPS borrada")
If Starter.logger Then Log("RUTA_GPS borrada")
End Sub
Sub borramosArchivoGPS
@@ -134,7 +134,7 @@ Sub revisaBD
' Starter.ruta = File.DirInternal
If File.Exists(Starter.ruta, "gps_hist.db") = False Then
File.Copy(File.DirAssets, "gps_hist.db", Starter.ruta, "gps_hist.db")
Log("No existe gps_hist, copiamos gps_hist.db")
If Starter.logger Then Log("No existe gps_hist, copiamos gps_hist.db")
End If
End Sub
@@ -174,7 +174,7 @@ Sub mandaLocAServer(loc As Location, id As String)
Starter.cmd.Name = "guardaDatos"
Starter.cmd.Parameters = Array As Object(fechaKMT(DateTime.Now), id, fechaKMT(DateTime.Now), $"${loc.Latitude},${loc.Longitude},${loc.Accuracy},${loc.AccuracyValid},${loc.Speed},${loc.SpeedValid}"$, "Coords")
' If Starter.logger Then
Log($"Mandamos loc a server: ${fechaKMT(DateTime.Now)}|${id}|${fechaKMT(DateTime.Now)}|${loc.Latitude},${loc.Longitude}|Coords"$)
If Starter.logger Then Log($"Mandamos loc a server: ${fechaKMT(DateTime.Now)}|${id}|${fechaKMT(DateTime.Now)}|${loc.Latitude},${loc.Longitude}|Coords"$)
' End If
Starter.reqManager.ExecuteCommand(Starter.cmd,"guardaDatos")
End Sub
@@ -185,4 +185,4 @@ Sub ConvertMillisecondsToString(t As Long) As String 'ignore
minutes = (t Mod DateTime.TicksPerHour) / DateTime.TicksPerMinute
seconds = (t Mod DateTime.TicksPerMinute) / DateTime.TicksPerSecond
Return $"$1.0{hours}:$2.0{minutes}:$2.0{seconds}"$
End Sub
End Sub