同步修改协议
This commit is contained in:
parent
6393b8f370
commit
9b137cc68a
|
@ -28,7 +28,7 @@ export default class ClientConnectionCustom {
|
|||
}
|
||||
|
||||
public async setVideoWallConfig(
|
||||
outputs: OutputBoardItemConfigEntity[],
|
||||
rotation_180_outputs: number[],
|
||||
wall_rows: number,
|
||||
wall_cols: number,
|
||||
device_rotation: number
|
||||
|
@ -37,7 +37,7 @@ export default class ClientConnectionCustom {
|
|||
try {
|
||||
return await this.connection.doRpc<CustomProtocol.ISVSetVideoWallConfigResponseEntity>(
|
||||
new CustomProtocol.ISVSetVideoWallConfigRequestEntity(
|
||||
outputs,
|
||||
rotation_180_outputs,
|
||||
wall_rows,
|
||||
wall_cols,
|
||||
device_rotation
|
||||
|
|
|
@ -237,8 +237,6 @@ export default defineComponent({
|
|||
const preview_rotation = ref(0);
|
||||
const previce_grid_height = ref(100);
|
||||
|
||||
let cache_outputs: OutputBoardItemConfigEntity[] = [];
|
||||
|
||||
class parseSpliceModeResult {
|
||||
rotation = 0;
|
||||
rows = 2;
|
||||
|
@ -363,8 +361,6 @@ export default defineComponent({
|
|||
splice_mode.value += " (180°)";
|
||||
}
|
||||
// preview_rotation.value = video_wall_config.outputs[pos].rotation;
|
||||
|
||||
cache_outputs = video_wall_config.outputs;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -387,26 +383,17 @@ export default defineComponent({
|
|||
try {
|
||||
const result = parseSpliceMode(splice_mode.value);
|
||||
|
||||
const output = <OutputBoardItemConfigEntity[]>[];
|
||||
if (result.rotation != 0) {
|
||||
for (let i = 0; i < result.cols * result.rows; ++i) {
|
||||
let item = cache_outputs.find((e) => e && e.index == i);
|
||||
if (!item) {
|
||||
item = new OutputBoardItemConfigEntity();
|
||||
item.index = i;
|
||||
item.output_index = i;
|
||||
item.rotation = 0;
|
||||
}
|
||||
item.rotation = result.rotation == 180 ? 1 : 0;
|
||||
output.push(item);
|
||||
const rotation_180_outputs = <number[]>[];
|
||||
if (result.rotation == 180) {
|
||||
for (let i = 0; i < result.cols; ++i) {
|
||||
rotation_180_outputs.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await GlobalData.getInstance()
|
||||
.getCurrentClient()
|
||||
?.customConnection.setVideoWallConfig(
|
||||
output,
|
||||
rotation_180_outputs,
|
||||
result.rows,
|
||||
result.cols,
|
||||
screen_mode.value == 0 ? 0 : 90
|
||||
|
|
|
@ -52,12 +52,12 @@ export namespace CustomProtocol {
|
|||
}
|
||||
|
||||
export class ISVSetVideoWallConfigRequestEntity extends Protocol.PacketEntity {
|
||||
outputs: OutputBoardItemConfigEntity[] = [];
|
||||
rotation_180_outputs: number[] = [];
|
||||
wall_rows = 2;
|
||||
wall_cols = 2;
|
||||
device_rotation = 0;
|
||||
constructor(
|
||||
outputs: OutputBoardItemConfigEntity[],
|
||||
rotation_180_outputs: number[],
|
||||
wall_rows: number,
|
||||
wall_cols: number,
|
||||
device_rotation: number,
|
||||
|
@ -66,7 +66,9 @@ export namespace CustomProtocol {
|
|||
super();
|
||||
this.rpc_id = rpcid ?? 0;
|
||||
this.command = Commands.kISVSetVideoWallConfig;
|
||||
this.outputs = Array.isArray(outputs) ? outputs : [];
|
||||
this.rotation_180_outputs = Array.isArray(rotation_180_outputs)
|
||||
? rotation_180_outputs
|
||||
: [];
|
||||
this.wall_cols = wall_cols;
|
||||
this.wall_rows = wall_rows;
|
||||
this.device_rotation = device_rotation;
|
||||
|
|
Loading…
Reference in New Issue