[code_opt_3.3.0] fix ui

This commit is contained in:
zhongchao
2023-06-07 17:50:48 +08:00
parent 65abe76e7d
commit 94d41eb26b
24 changed files with 116 additions and 125 deletions

View File

@@ -57,7 +57,8 @@ object CallerAutoPilotControlManager {
linkChainLog = CHAIN_TYPE_SOCKET_AUTOPILOT,
linkCode = CHAIN_SOURCE_ADAS,
nodeAliasCode = CHAIN_CODE_EAGLE_START_AUTOPILOT,
paramIndexes = [0]
paramIndexes = [0],
endPoint = false
)
fun startAutoPilot(controlParameters: AutopilotControlParameters?) {
if (controlParameters == null) {

View File

@@ -1,6 +1,5 @@
package com.mogo.eagle.core.function.call.autopilot
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
@@ -109,11 +108,6 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
val listener = it.value
listener.onChassisLocationGCJ02(mogoLocation)
// FileUtils.writeToFile(
// "/sdcard/Download/",
// "location_gcj02.txt",
// "${mogoLocation.longitude},${mogoLocation.latitude},${sourceType}\n"
// )
}

View File

@@ -94,11 +94,6 @@ object CallerChassisLocationWGS84ListenerManager : CallerBase<IMoGoChassisLocati
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
val listener = it.value
listener.onChassisLocationWGS84(mogoLocation)
// FileUtils.writeToFile(
// "/sdcard/Download/",
// "location_wgs84.txt",
// "${mogoLocation.longitude},${mogoLocation.latitude},${sourceType}\n"
// )
}

View File

@@ -2,20 +2,32 @@ package com.mogo.eagle.core.function.call.autopilot
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisSteeringStateListener
import com.mogo.eagle.core.function.call.base.CallerBase
import kotlin.properties.Delegates
/**
* 车辆方向盘转向角 回调监听
*/
object CallerChassisSteeringStateListenerManager : CallerBase<IMoGoChassisSteeringStateListener>() {
//todo emArrow 总结
private var steering: Float? by Delegates.observable(0.0f) { _, oldValue, newValue ->
if (newValue == null) {
return@observable
}
if (oldValue == newValue) {
return@observable
}
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotSteeringData(newValue)
}
}
/**
* 车辆方向盘转向角回调
* @param steering 方向盘转向角
*/
fun invokeAutopilotSteeringData(steering: Float){
M_LISTENERS.forEach{
val listener = it.value
listener.onAutopilotSteeringData(steering)
}
fun invokeAutopilotSteeringData(steering: Float) {
this.steering = steering
}
}