Skip to content

Commit

Permalink
fix: idle fps behavior (#553)
Browse files Browse the repository at this point in the history
* idle fps input is no longer required
* idle fps default to fps target to restore previous behavior

Signed-off-by: Mathis Mensing <[email protected]>
  • Loading branch information
matmen authored Mar 2, 2022
1 parent 5ba5160 commit 2a551a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/components/settings/cameras/CameraConfigDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
single-line
hide-details="auto"
v-model.number="camera.fpsidletarget"
:rules="[rules.required]"
></v-text-field>
</app-setting>

Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/camera/CameraItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default class CameraItem extends Vue {
this.camera &&
this.camera.type === 'mjpgadaptive'
) {
const fpsTarget = document.hasFocus() ? (this.camera.fpstarget || 10) : (this.camera.fpsidletarget || 1)
const fpsTarget = (!document.hasFocus() && this.camera.fpsidletarget) || this.camera.fpstarget || 10
const end_time = performance.now()
const current_time = end_time - this.start_time
this.time = (this.time * this.time_smoothing) + (current_time * (1.0 - this.time_smoothing))
Expand Down

0 comments on commit 2a551a4

Please sign in to comment.