GnssService javítás, refraktálás

This commit is contained in:
2026-05-19 00:10:41 +02:00
parent 24a6b7d513
commit 20a8078f3c
3 changed files with 89 additions and 23 deletions
@@ -129,6 +129,7 @@ class MapSurveyController extends GetxController {
// ── Telefon GPS fallback ──────────────────────────────────────────
StreamSubscription<Position>? _phoneLocationSub;
StreamSubscription<void>? _gnssUpdateSub;
// ── UI controllerek ───────────────────────────────────────────────
final pointIdController = TextEditingController();
@@ -161,7 +162,9 @@ class MapSurveyController extends GetxController {
};
// ── GnssService pozíció változás → EOV, marker, NTRIP GGA ────
ever(_gnss.gpsQuality, (_) => _onGnssUpdate());
_gnssUpdateSub = _gnss.onDataUpdated.listen((_) {
_onGnssUpdate();
});
// ── Supabase realtime ─────────────────────────────────────────
_supaChannel = Supabase.instance.client
@@ -194,6 +197,7 @@ class MapSurveyController extends GetxController {
super.onClose();
_phoneLocationSub?.cancel();
_gnssUpdateSub?.cancel();
await _supaChannel?.unsubscribe();
pointIdController.dispose();