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

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

View File

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

View File

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

View File

@@ -80,7 +80,7 @@ class SpeedPanelView @JvmOverloads constructor(
} }
} }
this.timerTask = task this.timerTask = task
timer.schedule(task, Date(), 100) timer.schedule(task, Date(), 200)
} }
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) { override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {