mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-04 03:11:40 +00:00
[photon-client] Fix imports and simplify process of updated pipeline settings in store (#946)
* Update CameraSettingsStore.ts * Fix imports
This commit is contained in:
@@ -11,8 +11,7 @@ import { PlaceholderCameraSettings } from "@/types/SettingTypes";
|
||||
import { useStateStore } from "@/stores/StateStore";
|
||||
import type { WebsocketCameraSettingsUpdate } from "@/types/WebsocketDataTypes";
|
||||
import { WebsocketPipelineType } from "@/types/WebsocketDataTypes";
|
||||
import type { ActiveConfigurablePipelineSettings, ActivePipelineSettings } from "@/types/PipelineTypes";
|
||||
import type { PipelineType } from "@/types/PipelineTypes";
|
||||
import type { ActiveConfigurablePipelineSettings, ActivePipelineSettings, PipelineType } from "@/types/PipelineTypes";
|
||||
import axios from "axios";
|
||||
|
||||
interface CameraSettingsStore {
|
||||
@@ -174,9 +173,7 @@ export const useCameraSettingsStore = defineStore("cameraSettings", {
|
||||
settings: Partial<ActivePipelineSettings>,
|
||||
cameraIndex: number = useStateStore().currentCameraIndex
|
||||
) {
|
||||
Object.entries(settings).forEach(([k, v]) => {
|
||||
this.cameras[cameraIndex].pipelineSettings[k] = v;
|
||||
});
|
||||
Object.assign(this.cameras[cameraIndex].pipelineSettings, settings);
|
||||
},
|
||||
/**
|
||||
* Change the nickname of the currently selected pipeline of the provided camera.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { defineStore } from "pinia";
|
||||
import type {
|
||||
ConfigurableNetworkSettings,
|
||||
GeneralSettings,
|
||||
LightingSettings,
|
||||
MetricData,
|
||||
NetworkSettings,
|
||||
ConfigurableNetworkSettings
|
||||
NetworkSettings
|
||||
} from "@/types/SettingTypes";
|
||||
import { NetworkConnectionType } from "@/types/SettingTypes";
|
||||
import { useStateStore } from "@/stores/StateStore";
|
||||
|
||||
Reference in New Issue
Block a user