[3.4.0][状态栏] 优化RTK数据源获取逻辑
This commit is contained in:
@@ -52,7 +52,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
return
|
||||
}
|
||||
check?.takeIf { it.isActive }?.cancel()
|
||||
launch(Dispatchers.Unconfined) {
|
||||
launch(Dispatchers.Default) {
|
||||
CallerAutoPilotControlManager.sendStatusQueryReq()
|
||||
delay(5000)
|
||||
isOldVersion.set(true)
|
||||
@@ -87,10 +87,9 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (isOldVersion.get()) {
|
||||
if (isRTKEnabled()) {
|
||||
if ((timeOutCheck == null || timeOutCheck?.isCompleted == true) && isRTKEnabled()) {
|
||||
send(RTKStatus("RTK", 0))
|
||||
timeOutCheck?.takeIf { it.isActive }?.cancel()
|
||||
launch(Dispatchers.Unconfined) {
|
||||
launch(Dispatchers.Default) {
|
||||
delay(4000)
|
||||
send(RTKStatus("", -1))
|
||||
}.also {
|
||||
|
||||
Reference in New Issue
Block a user