Skip to content

Commit

Permalink
fix: use moonraker settings for flip when snapshoturl is set
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <meteyou@gmail.com>
  • Loading branch information
meteyou committed Aug 25, 2024
1 parent 0834cde commit 4501692
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/components/panels/Timelapse/TimelapseStatusPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ export default class TimelapseStatusPanel extends Mixins(BaseMixin, TimelapseMix
return (this.$store.state.server.timelapse?.rendering.status ?? '') === 'running'
}
get existsSnapshoturlInMoonrakerConfig() {
return 'snapshoturl' in this.$store.state.server.config.orig.timelapse
}
get moonrakerTimelapseConfig() {
return this.$store.state.server.config.config.timelapse ?? {}
}
get camId() {
return this.$store.state.server.timelapse.settings.camera ?? ''
}
Expand All @@ -143,6 +151,18 @@ export default class TimelapseStatusPanel extends Mixins(BaseMixin, TimelapseMix
}
get webcamStyle() {
// if the snapshoturl is set in moonraker config,
// we also use the flix_x and flip_y values from the moonraker config
if (this.existsSnapshoturlInMoonrakerConfig) {
return {
transform: this.generateTransform(
this.moonrakerTimelapseConfig.flip_x ?? false,
this.moonrakerTimelapseConfig.flip_y ?? false,
0
),
}
}
if (!this.camSettings) return {}
return {
Expand Down

0 comments on commit 4501692

Please sign in to comment.