[PhotonClient] Fix misc bugs and dataflow errors (#861)

Fixes leftover bugs from #767 and #856

- Because new URLs aren't based on hash URL schemas, all the routes need to be updated to final paths instead of relative ones that were previously caught by the hash URL
- Fixed misc Vue warnings pointed out by @mcm001
This commit is contained in:
Sriman Achanta
2023-06-18 00:05:46 -04:00
committed by GitHub
parent 013ff5e7c0
commit f813048462
6 changed files with 15 additions and 18 deletions

View File

@@ -32,7 +32,7 @@
<v-list-item <v-list-item
link link
to="dashboard" to="/dashboard"
@click="rollbackPipelineIndex()" @click="rollbackPipelineIndex()"
> >
<v-list-item-icon> <v-list-item-icon>
@@ -45,7 +45,7 @@
<v-list-item <v-list-item
ref="camerasTabOpener" ref="camerasTabOpener"
link link
to="cameras" to="/cameras"
@click="switchToDriverMode()" @click="switchToDriverMode()"
> >
<v-list-item-icon> <v-list-item-icon>
@@ -57,7 +57,7 @@
</v-list-item> </v-list-item>
<v-list-item <v-list-item
link link
to="settings" to="/settings"
@click="switchToSettingsTab()" @click="switchToSettingsTab()"
> >
<v-list-item-icon> <v-list-item-icon>
@@ -69,7 +69,7 @@
</v-list-item> </v-list-item>
<v-list-item <v-list-item
link link
to="docs" to="/docs"
> >
<v-list-item-icon> <v-list-item-icon>
<v-icon>mdi-bookshelf</v-icon> <v-icon>mdi-bookshelf</v-icon>
@@ -197,7 +197,7 @@
<v-card-text> <v-card-text>
PhotonVision cannot connect to the NetworkTables Server. Please visit the PhotonVision cannot connect to the NetworkTables Server. Please visit the
<router-link <router-link
to="settings" to="/settings"
class="accent--text" class="accent--text"
@click="switchToSettingsTab" @click="switchToSettingsTab"
> >

View File

@@ -144,7 +144,7 @@
</v-menu> </v-menu>
</v-col> </v-col>
<v-col <v-col
v-if="currentPipelineType >= 0" v-if="_currentPipelineType >= 0"
cols="10" cols="10"
md="11" md="11"
lg="10" lg="10"
@@ -152,7 +152,7 @@
class="pa-0" class="pa-0"
> >
<CVselect <CVselect
v-model="currentPipelineType" v-model="_currentPipelineType"
name="Type" name="Type"
tooltip="Changes the pipeline type, which changes the type of processing that will happen on input frames" tooltip="Changes the pipeline type, which changes the type of processing that will happen on input frames"
:list="['Reflective Tape', 'Colored Shape', 'AprilTag']" :list="['Reflective Tape', 'Colored Shape', 'AprilTag']"
@@ -321,7 +321,7 @@ export default {
this.$store.commit('currentPipelineIndex', value - (this.$store.getters.isDriverMode ? 1 : 0)); this.$store.commit('currentPipelineIndex', value - (this.$store.getters.isDriverMode ? 1 : 0));
} }
}, },
currentPipelineType: { _currentPipelineType: {
get() { get() {
return this.$store.getters.currentPipelineSettings.pipelineType - 2; return this.$store.getters.currentPipelineSettings.pipelineType - 2;
}, },
@@ -333,11 +333,11 @@ export default {
methods: { methods: {
showTypeDialog(idx) { showTypeDialog(idx) {
// Only show the dialog if it's a new type // Only show the dialog if it's a new type
this.showPipeTypeDialog = idx !== this.currentPipelineType; this.showPipeTypeDialog = idx !== this._currentPipelineType;
this.proposedPipelineType = idx; this.proposedPipelineType = idx;
}, },
changePipeType(actuallyChange) { changePipeType(actuallyChange) {
const newIdx = actuallyChange ? this.proposedPipelineType : this.currentPipelineType const newIdx = actuallyChange ? this.proposedPipelineType : this._currentPipelineType
this.handleInputWithIndex('pipelineType', newIdx); this.handleInputWithIndex('pipelineType', newIdx);
this.showPipeTypeDialog = false; this.showPipeTypeDialog = false;
}, },
@@ -387,7 +387,7 @@ export default {
if (this.isPipelineNameEdit) { if (this.isPipelineNameEdit) {
this.handleInputWithIndex("changePipelineName", this.newPipelineName); this.handleInputWithIndex("changePipelineName", this.newPipelineName);
} else { } else {
this.handleInputWithIndex("addNewPipeline", [this.newPipelineName, this.currentPipelineType]); // 0 for reflective, 1 for colored shape this.handleInputWithIndex("addNewPipeline", [this.newPipelineName, this._currentPipelineType]); // 0 for reflective, 1 for colored shape
} }
this.discardPipelineNameChange(); this.discardPipelineNameChange();
} }

View File

@@ -323,7 +323,7 @@
> >
<template> <template>
<CVimage <CVimage
:id="cameras-cal" :id="'cameras-cal'"
:idx="1" :idx="1"
:disconnected="!$store.state.backendConnected" :disconnected="!$store.state.backendConnected"
scale="100" scale="100"
@@ -479,13 +479,10 @@ export default {
get() { get() {
return this.unfilteredStreamDivisors.filter(item => { return this.unfilteredStreamDivisors.filter(item => {
const res = this.stringResolutionList[this.selectedFilteredResIndex].split(" X ").map(it => parseInt(it)); const res = this.stringResolutionList[this.selectedFilteredResIndex].split(" X ").map(it => parseInt(it));
console.log(res);
console.log(item);
// Realistically, we need more than 320x240, but lower than this is // Realistically, we need more than 320x240, but lower than this is
// basically unusable. For now, don't allow decimations that take us // basically unusable. For now, don't allow decimations that take us
// below that // below that
const ret = ((res[0] / item) >= 300 && (res[1] / item) >= 220) || (item === 1); const ret = ((res[0] / item) >= 300 && (res[1] / item) >= 220) || (item === 1);
console.log(ret);
return ret; return ret;
}) })
} }

View File

@@ -236,7 +236,7 @@
<v-card-text> <v-card-text>
Because the current resolution {{ this.$store.getters.currentVideoFormat.width }} x {{ this.$store.getters.currentVideoFormat.height }} is not yet calibrated, 3D mode cannot be enabled. Please Because the current resolution {{ this.$store.getters.currentVideoFormat.width }} x {{ this.$store.getters.currentVideoFormat.height }} is not yet calibrated, 3D mode cannot be enabled. Please
<a <a
href="/#/cameras" href="/cameras"
class="white--text" class="white--text"
@click="$emit('switch-to-cameras')" @click="$emit('switch-to-cameras')"
> visit the Cameras tab</a> to calibrate this resolution. For now, SolvePNP will do nothing. > visit the Cameras tab</a> to calibrate this resolution. For now, SolvePNP will do nothing.

View File

@@ -159,7 +159,7 @@
<script> <script>
export default { export default {
// eslint-disable-next-line // eslint-disable-next-line
name: "Device Control", name: "DeviceControl",
data() { data() {
return { return {
snack: false, snack: false,

View File

@@ -17,7 +17,7 @@
export default { export default {
// eslint-disable-next-line // eslint-disable-next-line
name: 'LED Control', name: 'LEDControl',
components: { components: {
CVslider, CVslider,
}, },