This commit is contained in:
zhongchao
2021-02-26 11:51:03 +08:00
parent 37436e9679
commit 1c12fec6c0

View File

@@ -93,7 +93,7 @@ public class SocketHandler {
@Override
public void onMsgReceived(int msgType, WebSocketData webSocketData) {
if (msgType == MSG_TYPE_ACK.getMsgType()) {
if (webSocketData.getMsgType() == MSG_TYPE_ACK.getMsgType()) {
FrequencyData frequencyData = GsonUtil.objectFromJson(webSocketData.getData(), FrequencyData.class);
if (frequencyData == null) {
Logger.e(TAG, "onMsgReceived FrequencyData == null ");
@@ -108,7 +108,7 @@ public class SocketHandler {
}
}
}
if (msgType == MSG_TYPE_DOWNLINK_CAR_DATA.getMsgType()) {
if (webSocketData.getMsgType() == MSG_TYPE_DOWNLINK_CAR_DATA.getMsgType()) {
MogoSnapshotSetData snapshotSetData = GsonUtil.objectFromJson(webSocketData.getData(), MogoSnapshotSetData.class);
if (snapshotSetData == null) {
Logger.e(TAG, "onMsgReceived MogoSnapshotSetData == null ");