Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Prime version and fix associated logic #1673

Merged
merged 10 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions web/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@fontsource/space-mono": "^4.5.10",
"@improbable-eng/grpc-web": "^0.13.0",
"@mdi/js": "^6.9.96",
"@viamrobotics/prime": "^0.0.79",
"@viamrobotics/prime": "^0.0.100",
"@viamrobotics/rpc": "^0.1.32",
"@viamrobotics/sdk": "^0.0.8",
"@vitejs/plugin-vue": "^3.1.2",
Expand Down
22 changes: 10 additions & 12 deletions web/frontend/src/components/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,30 +198,28 @@ const baseRun = () => {
}
};

const viewPreviewCamera = (name: string) => {
for (const [key, value] of baseStreamStates) {
// Only turn on if state is off
if (name.includes(key) && value === false) {
baseStreamStates.set(key, true);
const viewPreviewCamera = (values: string) => {
for (const [key] of baseStreamStates) {
if (values.split(',').includes(key)) {
try {
// Only add stream if other components have not already
if (!cameraStreamStates.get(name)) {
if (!cameraStreamStates.get(key) && !baseStreamStates.get(key)) {
addStream(props.client, key);
}
} catch (error) {
displayError(error as ServiceError);
}
// Only turn off if state is on
} else if (!name.includes(key) && value === true) {
baseStreamStates.set(key, false);
baseStreamStates.set(key, true);
} else if (baseStreamStates.get(key) === true) {
try {
// Only remove stream if other components are not using the stream
if (!cameraStreamStates.get(name)) {
if (!cameraStreamStates.get(key)) {
removeStream(props.client, key);
}
} catch (error) {
displayError(error as ServiceError);
}
baseStreamStates.set(key, false);
}
}
};
Expand Down Expand Up @@ -296,10 +294,10 @@ onUnmounted(() => {
@toggle="(active: boolean) => { !active && (pressed.size > 0 || !stopped) && stop() }"
/>
<div v-if="filterResources(resources, 'rdk', 'component', 'camera')">
<v-select
<v-multiselect
v-model="selectCameras"
class="mb-4"
variant="multiple"
clearable="false"
placeholder="Select Cameras"
aria-label="Select Cameras"
:options="
Expand Down
Loading