From ed472e3d13bbe85fa604afe4b0ce146b4b4ee377 Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Tue, 30 Jan 2024 01:47:16 -0500 Subject: [PATCH] Small updates --- lib/src/collection.dart | 1 + lib/src/isolates/parent.dart | 1 + lib/src/utils/constants.dart | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/src/collection.dart b/lib/src/collection.dart index f619f6a..dea0e32 100644 --- a/lib/src/collection.dart +++ b/lib/src/collection.dart @@ -48,6 +48,7 @@ class Collection { Future dispose() async { parent.stopAll(); parent.killAll(); + parent.isolates.clear(); await videoServer.dispose(); } diff --git a/lib/src/isolates/parent.dart b/lib/src/isolates/parent.dart index 95d338c..4a78be5 100644 --- a/lib/src/isolates/parent.dart +++ b/lib/src/isolates/parent.dart @@ -72,6 +72,7 @@ class VideoController extends IsolateParent{ final command = VideoCommand(details: CameraDetails(status: CameraStatus.CAMERA_DISABLED)); for (final name in CameraName.values) { if (name == CameraName.CAMERA_NAME_UNDEFINED) continue; + if (name == CameraName.ROVER_FRONT) continue; send(data: command, id: name); } } diff --git a/lib/src/utils/constants.dart b/lib/src/utils/constants.dart index 0b72a7a..7d6d3e5 100644 --- a/lib/src/utils/constants.dart +++ b/lib/src/utils/constants.dart @@ -16,9 +16,9 @@ Map cameraNames = { /// Map for WINDOWS devices Map cameraIndexes = { - CameraName.ROVER_FRONT: 0, - CameraName.ROVER_REAR: 1, - CameraName.AUTONOMY_DEPTH: 2, + CameraName.ROVER_REAR: 0, + CameraName.AUTONOMY_DEPTH: 1, + CameraName.ROVER_FRONT: 2, CameraName.SUBSYSTEM1: 3, CameraName.SUBSYSTEM2: 4, CameraName.SUBSYSTEM3: 5,