系统设置->关于点击次数改为20. 魔墙增加旋转参数

This commit is contained in:
fangxiang 2022-12-12 10:17:13 +08:00
parent 35c6baba37
commit 2ea3d579ff
5 changed files with 66 additions and 10 deletions

View File

@ -1253,6 +1253,16 @@ export default class ClientConnection {
} }
} }
public async testA() {
try {
return await this.doRpc<Protocol.RpcTestAResponseEntity>(
new Protocol.RpcTestARequestEntity()
);
} catch (e) {
console.error(e);
}
}
public async setHdmiInDecodeType(index: number, type: string) { public async setHdmiInDecodeType(index: number, type: string) {
try { try {
return await this.doRpc<Protocol.SetHdmiInDecodeTypeResponseEntity>( return await this.doRpc<Protocol.SetHdmiInDecodeTypeResponseEntity>(

View File

@ -1166,9 +1166,7 @@
<div <div
v-if=" v-if="
(click_count >= target_click_count && click_count >= target_click_count ||
(click_count % target_click_count == 0 ||
click_count % target_click_count == 1)) ||
$store.state.advanced_debug $store.state.advanced_debug
" "
> >
@ -1361,8 +1359,6 @@ import { EWeekDays } from "src/entities/EWeekDays";
import SystenSettingAdvancedNetworkDialog from "src/components/SystenSettingAdvancedNetworkDialog.vue"; import SystenSettingAdvancedNetworkDialog from "src/components/SystenSettingAdvancedNetworkDialog.vue";
import { AdvancedIpAddressEntity } from "src/entities/AdvancedIpAddressEntity"; import { AdvancedIpAddressEntity } from "src/entities/AdvancedIpAddressEntity";
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
import version from "../../package.json"; import version from "../../package.json";
import { Md5 } from "ts-md5"; import { Md5 } from "ts-md5";
@ -1521,7 +1517,7 @@ export default defineComponent({
const timing_tasks: Ref<TimingTaskEntity[]> = ref([]); const timing_tasks: Ref<TimingTaskEntity[]> = ref([]);
let click_count = ref(0); let click_count = ref(0);
const target_click_count = ref(30); const target_click_count = ref(20);
let client_version = ref(version); let client_version = ref(version);
let server_version = ref("unknow"); let server_version = ref("unknow");
let server_commit_hash = ref("unknow"); let server_commit_hash = ref("unknow");

View File

@ -1,8 +1,8 @@
import RectF from "./RectF"; import RotatedRectF from "./RectF";
export default class MagicWallConfig { export default class MagicWallConfig {
magic_wall_enable = false; magic_wall_enable = false;
row = 0; row = 0;
col = 0; col = 0;
windows: RectF[] = []; windows: RotatedRectF[] = [];
} }

View File

@ -2,13 +2,33 @@ export default class RectF {
lt: PointF = new PointF(0, 0); lt: PointF = new PointF(0, 0);
w: number = 0; w: number = 0;
h: number = 0; h: number = 0;
constructor(lt: PointF = new PointF(0, 0), h: number = 0, w: number = 0) {
this.lt = lt;
this.h = h;
this.w = w;
}
} }
export class PointF { export class PointF {
constructor(x: number, y: number) { constructor(x: number = 0, y: number = 0) {
this.x = x; this.x = x;
this.y = y; this.y = y;
} }
x: number = 0; x: number = 0;
y: number = 0; y: number = 0;
} }
export class RotatedRectF extends RectF {
angle: number = 0;
constructor(
lt: PointF = new PointF(0, 0),
h: number = 0,
w: number = 0,
angle: number = 0
) {
super(lt, h, w);
this.angle = angle;
}
}

View File

@ -483,6 +483,10 @@ export namespace Protocol {
return Commands.PROTOCOL_PREFIX + "RpcGetMagicWallConfig"; return Commands.PROTOCOL_PREFIX + "RpcGetMagicWallConfig";
} }
public static get kRpcTestA() {
return Commands.PROTOCOL_PREFIX + "RpcTestA";
}
static _all_commands = new Set([ static _all_commands = new Set([
Commands.kUnKnowCommand, Commands.kUnKnowCommand,
Commands.kSearchDevice, Commands.kSearchDevice,
@ -601,6 +605,7 @@ export namespace Protocol {
Commands.kSetHDMIRotation, Commands.kSetHDMIRotation,
Commands.kRpcGetMagicWallConfig, Commands.kRpcGetMagicWallConfig,
Commands.kRpcSetMagicWallConfig, Commands.kRpcSetMagicWallConfig,
Commands.kRpcTestA,
]); ]);
public static get AllCommands() { public static get AllCommands() {
return this._all_commands; return this._all_commands;
@ -3088,4 +3093,29 @@ export namespace Protocol {
config: MagicWallConfig = new MagicWallConfig(); config: MagicWallConfig = new MagicWallConfig();
success = false; success = false;
} }
export class RpcTestARequestEntity extends PacketEntity {
constructor(rpc_id = 0) {
super();
super.command = Commands.kRpcTestA;
super.flag = PacketEntity.FLAG_REQUEST;
super.rpc_id = rpc_id;
}
timestamp = 0;
}
export class RpcTestAResponseEntity extends PacketEntity {
constructor() {
super();
super.flag = PacketEntity.FLAG_RESPONSE;
}
lt_t = 0;
lt_l = 0;
rt_t = 0;
rt_r = 0;
rb_b = 0;
rb_r = 0;
lb_b = 0;
lb_l = 0;
}
} }