[pb10][金旅M1][电池状态回调]新增金旅M1控制命令和m1状态回调接口,以及电池状态接口

This commit is contained in:
xinfengkun
2023-01-11 19:27:02 +08:00
parent 60349f8d33
commit bceea30a52
13 changed files with 435 additions and 8 deletions

View File

@@ -0,0 +1,21 @@
package com.mogo.eagle.core.function.call.autopilot
import chassis.ChassisStatesOuterClass
import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 电池管理系统 包含 电量剩余百分比 电压 电流等
*/
object CallerBatteryManagementSystemListenerManager : CallerBase<IMoGoBatteryManagementSystemListener>() {
/**
* 电池管理系统
*/
fun invokeBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
M_LISTENERS.forEach {
val listener = it.value
listener.onBatteryManagementSystemStates(states)
}
}
}

View File

@@ -0,0 +1,22 @@
package com.mogo.eagle.core.function.call.autopilot
import chassis.ChassisStatesOuterClass
import chassis.VehicleStateOuterClass
import com.mogo.eagle.core.function.api.autopilot.IMoGoRoboBusJinlvM1StatesListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 金旅M1
*/
object CallerRoboBusJinlvM1StatesListenerManager : CallerBase<IMoGoRoboBusJinlvM1StatesListener>() {
/**
* 电池管理系统
*/
fun invokeRoboBusJinlvM1States(states: VehicleStateOuterClass.RoboBusJinlvM1State) {
M_LISTENERS.forEach {
val listener = it.value
listener.onRoboBusJinlvM1States(states)
}
}
}