diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index a62974b..dadb8aa 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -1560,6 +1560,15 @@ export default class ClientConnection { ); } + public async SetProjectorLayout( + row: number, + column: number + ) { + return await this.doRpc( + new Protocol.SetProjectorResolutionRequestEntity(row, column) + ); + } + 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 f5a411d..51852a8 100644 --- a/src/entities/WSProtocol.ts +++ b/src/entities/WSProtocol.ts @@ -551,6 +551,9 @@ export namespace Protocol { public static get kSetProjectorResolution() { return Commands.PROTOCOL_PREFIX + "SetProjectorResolution"; } + public static get kSetProjectorLayout() { + return Commands.PROTOCOL_PREFIX + "SetProjectorLayout"; + } public static get kRpcFileManagerGetFileList() { return Commands.PROTOCOL_PREFIX + "RpcFileManagerGetFileList"; } @@ -705,6 +708,7 @@ export namespace Protocol { Commands.kAddBlendingCtrlPoint, Commands.kDelBlendingCtrlPoint, Commands.kSetProjectorResolution, + Commands.kSetProjectorLayout, Commands.kRpcSetMagicWallGridState, Commands.kRpcGetMagicWallGridState, Commands.kRpcFileManagerGetFileList, @@ -3696,6 +3700,25 @@ export namespace Protocol { height = 0; } + export class SetProjectorLayoutRequestEntity extends PacketEntity { + constructor( + row: number, + column: number, + rpc_id = 0 + ) { + super(); + super.command = Commands.kSetProjectorResolution; + super.flag = PacketEntity.FLAG_REQUEST; + super.rpc_id = rpc_id; + + this.row = row ?? 0; + this.column = column ?? 0; + } + + row = 0; + column = 0; + } + export class RpcFileManagerGetFileListRequest extends PacketEntity { dir_path: string = ""; constructor(dir_path: string, rpc_id = 0) {