fix:增加通话数据未收到时定时器判断

This commit is contained in:
liyi 2024-12-06 13:44:17 +08:00
parent 6736760d3b
commit dee12e09c1

View File

@ -10,6 +10,11 @@ import 'package:star_lock/talk/startChart/proto/ble_message.pb.dart';
import 'package:star_lock/talk/startChart/proto/gateway_reset.pb.dart'; import 'package:star_lock/talk/startChart/proto/gateway_reset.pb.dart';
import 'package:star_lock/talk/startChart/proto/generic.pb.dart'; import 'package:star_lock/talk/startChart/proto/generic.pb.dart';
import 'package:star_lock/talk/startChart/proto/remote_unlock.pb.dart'; import 'package:star_lock/talk/startChart/proto/remote_unlock.pb.dart';
import 'package:star_lock/talk/startChart/proto/talk_data.pb.dart';
import 'package:star_lock/talk/startChart/proto/talk_expect.pb.dart';
import 'package:star_lock/talk/startChart/proto/talk_hangup.pb.dart';
import 'package:star_lock/talk/startChart/proto/talk_ping.pb.dart';
import 'package:star_lock/talk/startChart/proto/talk_reject.pb.dart';
import 'package:star_lock/talk/startChart/proto/talk_request.pb.dart'; import 'package:star_lock/talk/startChart/proto/talk_request.pb.dart';
class ScpMessage { class ScpMessage {
@ -325,20 +330,20 @@ class ScpMessage {
final GenericResp genericResp = GenericResp.fromBuffer(byte); final GenericResp genericResp = GenericResp.fromBuffer(byte);
return genericResp; return genericResp;
case PayloadTypeConstant.talkReject: case PayloadTypeConstant.talkReject:
final GenericResp genericResp = GenericResp.fromBuffer(byte); final TalkReject talkReject = TalkReject.fromBuffer(byte);
return genericResp; return talkReject;
case PayloadTypeConstant.talkPing: case PayloadTypeConstant.talkPing:
final GenericResp genericResp = GenericResp.fromBuffer(byte); final TalkPing talkPing = TalkPing.fromBuffer(byte);
return genericResp; return talkPing;
case PayloadTypeConstant.talkExpect: case PayloadTypeConstant.talkExpect:
final GenericResp genericResp = GenericResp.fromBuffer(byte); final TalkExpect talkExpect = TalkExpect.fromBuffer(byte);
return genericResp; return talkExpect;
case PayloadTypeConstant.talkData: case PayloadTypeConstant.talkData:
final GenericResp genericResp = GenericResp.fromBuffer(byte); final TalkData talkData = TalkData.fromBuffer(byte);
return genericResp; return talkData;
case PayloadTypeConstant.talkHangup: case PayloadTypeConstant.talkHangup:
final GenericResp genericResp = GenericResp.fromBuffer(byte); final TalkHangup talkHangup = TalkHangup.fromBuffer(byte);
return genericResp; return talkHangup;
default: default:
print('❌未知的payloadType类型,按照字符串解析'); print('❌未知的payloadType类型,按照字符串解析');
String payload = utf8.decode(byte); String payload = utf8.decode(byte);