[code_opt_3.3.0] fix plugin bug and add trace

This commit is contained in:
zhongchao
2023-06-13 23:25:12 +08:00
parent 1c59412d0e
commit e741d23351
22 changed files with 265 additions and 109 deletions

View File

@@ -49,15 +49,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
}
}
private var connectStatus:Boolean by Delegates.observable(false){_, oldValue, newValue ->
if(oldValue != newValue){
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotConnectInfo(newValue)
}
}
}
@Volatile
private var autoPilotMessageCode: String = ""
@@ -142,7 +133,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
*/
@Synchronized
fun invokeAutoPilotStatus() {
connectStatus = mAutopilotStatusInfo.connectStatus
invokeAutoPilotStatus(mAutopilotStatusInfo)
}
@@ -154,7 +144,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
fun invokeAutoPilotStatus(autopilotStatusInfo: AutopilotStatusInfo) {
mAutopilotStatusInfo = autopilotStatusInfo
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotStatusResponse(mAutopilotStatusInfo)
}
@@ -167,7 +156,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
@Synchronized
fun invokeArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotArriveAtStation(arrivalNotification)
}
@@ -179,7 +167,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
@Synchronized
fun invokeAutopilotSNRequest() {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onAutopilotSNRequest()
}

View File

@@ -10,8 +10,8 @@ object CallerMapIdentifyManager {
get() = ARouter.getInstance().build( MogoServicePaths.PATH_MAP_BIZ)
.navigation() as IMogoRoma
fun romaTrigger(romaStatus:Boolean, requestSuccess:((Boolean) -> Unit)? = null){
romaApi.trigger(romaStatus, requestSuccess)
fun romaTrigger(romaStatus:Boolean){
romaApi.trigger(romaStatus)
}
}

View File

@@ -6,11 +6,22 @@ import com.mogo.eagle.core.function.call.base.CallerBase
object CallerMapRomaListener : CallerBase<IMoGoRomaListener>() {
private var roma = false
private var romaStatus = -1
private var romaMsg: String = ""
override fun doSomeAfterAddListener(tag: String, listener: IMoGoRomaListener) {
listener.romaStatus(roma)
}
fun invokeMapRomaStatus(status: Int, msg: String) {
romaStatus = status
romaMsg = msg
M_LISTENERS.forEach {
val listener = it.value
listener.mapRomaStatus(romaStatus, romaMsg)
}
}
fun invokeMapRoma(romaStatus: Boolean) {
roma = romaStatus
M_LISTENERS.forEach {