[Opt]优化耗时和降频刷新

This commit is contained in:
chenfufeng
2023-01-06 10:43:16 +08:00
parent 7ba81fffae
commit da1eb070a9
3 changed files with 7 additions and 7 deletions

View File

@@ -207,7 +207,7 @@ class DebugSettingView @JvmOverloads constructor(
logInfoView!!.onEnterForeground()
}
// 开启定时查询速度
Timer().schedule(timerTaskRefresh, Date(), 100)
Timer().schedule(timerTaskRefresh, Date(), 300)
if (AppConfigInfo.isConnectAutopilot && (AppConfigInfo.plateNumber.isNullOrEmpty() || AppConfigInfo.iPCMacAddress.isNullOrEmpty())) {
//查询工控机基础配置信息
CallerAutoPilotManager.getCarConfig()
@@ -1806,10 +1806,10 @@ class DebugSettingView @JvmOverloads constructor(
}"
)
tvAutopilotInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
tvIpcInfo.text = GsonUtils.toJson(mAutoPilotStatusInfo)
tvIpcInfoKey.text = GsonUtils.toJson(mAutoPilotStatusInfo)
val autopilotJson = GsonUtils.toJson(mAutoPilotStatusInfo)
tvAutopilotInfo.text = autopilotJson
tvIpcInfo.text = autopilotJson
tvIpcInfoKey.text = autopilotJson
tvCarInfo.text =
"GPS时间${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +

View File

@@ -178,7 +178,7 @@ public class SpeedChartView extends View {
setAnimation(lastAngle, currentAngle, 1000);
lastAngle = currentAngle;
//重新绘制
postInvalidate();
invalidate();
}
}

View File

@@ -89,7 +89,7 @@ class SpeedPanelView @JvmOverloads constructor(
}
}
this.timerTask = task
timer.schedule(task, Date(), 100)
timer.schedule(task, Date(), 200)
}
override fun onDetachedFromWindow() {