Ntrip beállítások sheet, ntrip státusz sheet
This commit is contained in:
@@ -116,4 +116,42 @@ class NtripSettingsController extends GetxController {
|
||||
passwordController.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
/// „Kapcsolat tesztelése" — vevő nélkül is fut: mentés után csatlakozik,
|
||||
/// validálja a caster válaszát, majd azonnal bont.
|
||||
Future<void> testConnection() async {
|
||||
try {
|
||||
isBusy.value = true;
|
||||
if (!await _validateAndSave()) return;
|
||||
|
||||
final message = await _service.testConnection();
|
||||
Get.snackbar(
|
||||
'NTRIP teszt sikeres',
|
||||
message,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: const Color(0xFF2E7D32),
|
||||
colorText: const Color(0xFFFFFFFF),
|
||||
duration: const Duration(seconds: 4),
|
||||
);
|
||||
} on NtripException catch (e) {
|
||||
Get.snackbar(
|
||||
'NTRIP teszt sikertelen',
|
||||
e.message,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: const Color(0xFFB71C1C),
|
||||
colorText: const Color(0xFFFFFFFF),
|
||||
duration: const Duration(seconds: 4),
|
||||
);
|
||||
} catch (e) {
|
||||
Get.snackbar(
|
||||
'NTRIP teszt sikertelen',
|
||||
e.toString(),
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: const Color(0xFFB71C1C),
|
||||
colorText: const Color(0xFFFFFFFF),
|
||||
);
|
||||
} finally {
|
||||
isBusy.value = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user