[change]修复乘客屏分发线程没启动问题
This commit is contained in:
@@ -473,34 +473,44 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
adasConnectStatusListener.onConnectionIPCStatus(ipcConnectionStatus.get(), reason);
|
||||
}
|
||||
if (status == Constants.IPC_CONNECTION_STATUS.CONNECTED) {
|
||||
if (dispatchHandler != null) {
|
||||
dispatchHandler.start();
|
||||
}
|
||||
if (dispatchHandlerPointCloud != null) {
|
||||
dispatchHandlerPointCloud.start();
|
||||
}
|
||||
if (dispatchHandlerParsePointCloud != null) {
|
||||
dispatchHandlerParsePointCloud.start();
|
||||
}
|
||||
startDispatchHandler();
|
||||
startCheckCompatibility();
|
||||
} else {
|
||||
stopCheckCompatibility();
|
||||
}
|
||||
if (status == Constants.IPC_CONNECTION_STATUS.DISCONNECTED) {
|
||||
AdasManager.getInstance().setCarConfig(null);
|
||||
if (dispatchHandler != null) {
|
||||
dispatchHandler.stop();
|
||||
}
|
||||
if (dispatchHandlerPointCloud != null) {
|
||||
dispatchHandlerPointCloud.stop();
|
||||
}
|
||||
if (dispatchHandlerParsePointCloud != null) {
|
||||
dispatchHandlerParsePointCloud.stop();
|
||||
}
|
||||
stopDispatchHandler();
|
||||
}
|
||||
CupidLogUtils.i(TAG, "工控机连接状态 status=" + status + " reason=" + reason);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startDispatchHandler() {
|
||||
if (dispatchHandler != null) {
|
||||
dispatchHandler.start();
|
||||
}
|
||||
if (dispatchHandlerPointCloud != null) {
|
||||
dispatchHandlerPointCloud.start();
|
||||
}
|
||||
if (dispatchHandlerParsePointCloud != null) {
|
||||
dispatchHandlerParsePointCloud.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopDispatchHandler() {
|
||||
if (dispatchHandler != null) {
|
||||
dispatchHandler.stop();
|
||||
}
|
||||
if (dispatchHandlerPointCloud != null) {
|
||||
dispatchHandlerPointCloud.stop();
|
||||
}
|
||||
if (dispatchHandlerParsePointCloud != null) {
|
||||
dispatchHandlerParsePointCloud.stop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查兼容性
|
||||
*/
|
||||
|
||||
@@ -200,6 +200,20 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startDispatchHandler() {
|
||||
if (mChannel != null) {
|
||||
mChannel.startDispatchHandler();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopDispatchHandler() {
|
||||
if (mChannel != null) {
|
||||
mChannel.stopDispatchHandler();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工控机链接配置
|
||||
*
|
||||
|
||||
@@ -214,6 +214,16 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
void decoderRaw(byte[] bytes);
|
||||
|
||||
/**
|
||||
* 启动分发线程
|
||||
*/
|
||||
void startDispatchHandler();
|
||||
|
||||
/**
|
||||
* 停止分发线程
|
||||
*/
|
||||
void stopDispatchHandler();
|
||||
|
||||
/**
|
||||
* Log是否开启打印
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user