From 20f41cae5fb1191d09ba99f98b14514b43122583 Mon Sep 17 00:00:00 2001 From: ori agranat Date: Sat, 25 Jan 2020 23:26:07 +0200 Subject: [PATCH] added fps duplicate check --- chameleon-client/src/views/SettingsViewes/Cameras.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chameleon-client/src/views/SettingsViewes/Cameras.vue b/chameleon-client/src/views/SettingsViewes/Cameras.vue index 8fb6fd241..8dd9d1b18 100644 --- a/chameleon-client/src/views/SettingsViewes/Cameras.vue +++ b/chameleon-client/src/views/SettingsViewes/Cameras.vue @@ -106,7 +106,7 @@ handleData(val) { this.handleInput(val, this.pipeline[val]); }, - changeFps(){ + changeFps() { this.handleInput('videoModeIndex', this.filteredFpsList[this.pipeline['videoModeIndex']]['actualIndex']); }, sendCameraSettings() { @@ -232,9 +232,11 @@ let tmpList = []; for (let i in this.$store.state.resolutionList) { let res = JSON.parse(JSON.stringify(this.$store.state.resolutionList[i])); - if (res.width === selectedRes.width && res.height === selectedRes.height) { - res['actualIndex'] = parseInt(i); - tmpList.push(res); + if (!tmpList.some(e => e['fps'] === res['fps'])) { + if (res.width === selectedRes.width && res.height === selectedRes.height) { + res['actualIndex'] = parseInt(i); + tmpList.push(res); + } } } return tmpList;