未验证 提交 1fa35886 编写于 作者: O openharmony_ci 提交者: Gitee

!9990 修改帧率信息

Merge pull request !9990 from youngshady/master
......@@ -28,7 +28,7 @@ struct CustomContainerUser {
@State StepTips: string = '操作步骤:根据操作提示滑动系统桌面测试帧率'+'\n'+'预期结果:帧率大于55帧测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State Fps: string = '0';
@State Fps: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
......@@ -43,13 +43,14 @@ struct CustomContainerUser {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '\n' + '\n' + `1.点击开始键进入系统桌面`+ '\n' + '\n' + `2.左右滑动系统桌面连续10s以上`
+ '\n' + '\n' + '3.回到DeskFps测试项点击结束键' + '\n' + '\n' + `4.若测试最高帧率大于55帧则通过测试`
+ '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' )
Text(`测试步骤:`+ '\n' + '\n' + '\n' + '\n' + `1.点击开始键进入系统桌面` + '\n' + '\n' + '2.点击悬浮球开始测试'+ '\n' + '\n' +
`3.左右滑动系统桌面连续10s以上` + '\n' + '\n' + '4.待悬浮球倒计时结束显示为done后返回validator应用' + '\n' + '\n' + `5.点击结束观察测试结果` + '\n' + '\n' +
`6.若测试最高帧率大于55帧则通过测试` + '\n' + '\n' + `注意事项:` + '\n' + '\n' +
`※1.若悬浮球显示连接失败,需重启设备并在run.bat中输入run validator拉起测试` + '\n' + '\n' + `※2.双击悬浮球中断测试,长按悬浮球提前结束测试` + '\n' + '\n')
.fontColor(Color.White).fontSize('20fp')
}
Row(){
......@@ -84,30 +85,18 @@ struct CustomContainerUser {
.onClick(() => {
this.StartEnable = !this.StartEnable
let report = globalThis.resultNum;
// let headList = new Array();
// let endList = new Array();
// let head = report.indexOf(":");
// let end = report.indexOf('|');
// let Fps = new Array();
//
// while(head > -1){
// headList.push(head);
// head = report.indexOf(":",head + 1);
// }
// while(end > -1){
// endList.push(end);
// end = report.indexOf("|",end + 1);
// }
// for(let i = 0; i < headList.length; i++) {
// Fps[i] = Number(report.substring(headList[i]+1,endList[i]));
// }
let reg = /fps:(\d+)/g;
let matches = report.match(reg);
let fpsValues = matches.map(match => parseInt(match.substring(4)));
let maxFps = Math.max(...fpsValues);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
this.Vue = true;
if (matches == null) {
this.Fps = 0;
}
else {
let fpsValues = matches.map(match => parseInt(match.substring(4)));
let maxFps = Math.max(...fpsValues);
this.Fps = maxFps;
if(maxFps >= 55) {
this.Vue = true;
}
}
globalThis.HideFloatingWindow();
})
......
......@@ -24,7 +24,7 @@ struct CustomContainerUser {
@State StepTips: string = '操作步骤:根据操作提示滑动图库测试帧率'+'\n'+'预期结果:帧率大于或等于55帧测试通过';
@State Vue: boolean = false;
@State StartEnable: boolean = true;
@State Fps: string = '0';
@State Fps: number = 0;
scroller: Scroller = new Scroller();
async aboutToAppear(){
await FirstDialog.ChooseDialog(this.StepTips,this.name);
......@@ -39,13 +39,14 @@ struct CustomContainerUser {
Scroll(this.scroller) {
Column(){
Row(){
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' + '\n' + '\n'+ '\n' + '\n' + '\n' + '\n')
Text(`根据以下操作步骤完成测试`+ '\n' + '\n' )
.fontColor(Color.White).fontSize('24fp')
}
Row(){
Text(`测试步骤:`+ '\n' + '\n' + '\n' + '\n' + `1.在图库中预置500张图片`+ '\n' + '\n' + `2.点击开始键进入图库`
+ '\n' + '\n' + `3.滑动图库缩略图界面连续10s以上` + '\n' + '\n' + '4.回到PhotoFps测试项点击结束键' + '\n' + '\n' +
`5.若测试最高帧率大于或等于55帧则通过测试` + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' )
Text(`测试步骤:`+ '\n' + '\n' + '\n' + '\n' + `1.在图库中预置500张图片` + '\n' + '\n' + '2.点击开始键进入图库'+ '\n' + '\n' +
`3.点击悬浮球开始测试` + '\n' + '\n' + '4.滑动图库缩略图界面连续10s以上' + '\n' + '\n' + `5.待悬浮球倒计时结束显示为done后返回validator应用` + '\n' + '\n' +
`6.点击结束观察测试结果` + '\n' + '\n' + `7.若测试最高帧率大于或等于55帧则通过测试` + '\n' + '\n' + `注意事项:` + '\n' + '\n' +
`※1.若悬浮球显示连接失败,需重启设备并在run.bat中输入run validator拉起测试` + '\n' + '\n' + `※2.双击悬浮球中断测试,长按悬浮球提前结束测试` + '\n' + '\n')
.fontColor(Color.White).fontSize('20fp')
}
Row(){
......@@ -85,11 +86,16 @@ struct CustomContainerUser {
let report = globalThis.resultNum;
let reg = /fps:(\d+)/g;
let matches = report.match(reg);
let fpsValues = matches.map(match => parseInt(match.substring(4)));
let maxFps = Math.max(...fpsValues);
this.Fps = maxFps.toString();
if(maxFps >= 55) {
this.Vue = true;
if (matches == null) {
this.Fps = 0;
}
else {
let fpsValues = matches.map(match => parseInt(match.substring(4)));
let maxFps = Math.max(...fpsValues);
this.Fps = maxFps;
if(maxFps >= 55) {
this.Vue = true;
}
}
globalThis.HideFloatingWindow();
})
......
......@@ -31,7 +31,7 @@ export struct CustomContainer {
Url : string = '';
@Link StartEnable : boolean
@Link Vue : boolean;
@Link Fps : string;
@Link Fps : number;
@BuilderParam content: () => void;
@Builder
PassBtn(text: Resource, isFullScreen: boolean) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册