fix gps updated
This commit is contained in:
@ -37,6 +37,8 @@ class DestinationController extends GetxController {
|
||||
double currentLat = 0.0;
|
||||
double currentLon = 0.0;
|
||||
|
||||
bool gps_push_started = false;
|
||||
|
||||
bool skip_10s = false;
|
||||
|
||||
List<Destination> currentSelectedDestinations = <Destination>[].obs;
|
||||
@ -571,7 +573,9 @@ class DestinationController extends GetxController {
|
||||
break;
|
||||
}
|
||||
}
|
||||
pushGPStoServer();
|
||||
if (gps_push_started == false) {
|
||||
pushGPStoServer();
|
||||
}
|
||||
//print("--- 123 ---- $skip_gps----");
|
||||
} catch (e) {
|
||||
//print("An error occurred: $e");
|
||||
@ -585,6 +589,7 @@ class DestinationController extends GetxController {
|
||||
Future<void> pushGPStoServer() async {
|
||||
try {
|
||||
await Future.delayed(const Duration(minutes: 5));
|
||||
gps_push_started = true;
|
||||
ExternalService().pushGPS();
|
||||
} catch (e) {
|
||||
//print("An error occurred: $e");
|
||||
|
||||
Reference in New Issue
Block a user