diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index fd5c8f3..a62974b 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -1551,6 +1551,15 @@ export default class ClientConnection { ); } + public async SetProjectorResolution( + width: number, + height: number + ) { + return await this.doRpc( + new Protocol.SetProjectorResolutionRequestEntity(width, height) + ); + } + public async setCloudServerSetting( cloud_server_address: string, cloud_server_verify_key: string, diff --git a/src/entities/WSProtocol.ts b/src/entities/WSProtocol.ts index 93a0267..f5a411d 100644 --- a/src/entities/WSProtocol.ts +++ b/src/entities/WSProtocol.ts @@ -548,6 +548,9 @@ export namespace Protocol { public static get kDelBlendingCtrlPoint() { return Commands.PROTOCOL_PREFIX + "DelBlendingCtrlPoint"; } + public static get kSetProjectorResolution() { + return Commands.PROTOCOL_PREFIX + "SetProjectorResolution"; + } public static get kRpcFileManagerGetFileList() { return Commands.PROTOCOL_PREFIX + "RpcFileManagerGetFileList"; } @@ -701,6 +704,7 @@ export namespace Protocol { Commands.kDeleteBlendingScene, Commands.kAddBlendingCtrlPoint, Commands.kDelBlendingCtrlPoint, + Commands.kSetProjectorResolution, Commands.kRpcSetMagicWallGridState, Commands.kRpcGetMagicWallGridState, Commands.kRpcFileManagerGetFileList, @@ -3672,6 +3676,26 @@ export namespace Protocol { column = 0; count = 0; //控制点数量 } + + export class SetProjectorResolutionRequestEntity extends PacketEntity { + constructor( + width: number, + height: number, + rpc_id = 0 + ) { + super(); + super.command = Commands.kSetProjectorResolution; + super.flag = PacketEntity.FLAG_REQUEST; + super.rpc_id = rpc_id; + + this.width = width ?? 0; + this.height = height ?? 0; + } + + width = 0; + height = 0; + } + export class RpcFileManagerGetFileListRequest extends PacketEntity { dir_path: string = ""; constructor(dir_path: string, rpc_id = 0) {