fix:修复无法搜索到网关的问题
This commit is contained in:
parent
139d16387c
commit
5e1d1bd0c1
@ -349,7 +349,7 @@ class BlueManage {
|
|||||||
// 128位,判断前8位的第3、第4位
|
// 128位,判断前8位的第3、第4位
|
||||||
if (cleanUuid.length >= 32) {
|
if (cleanUuid.length >= 32) {
|
||||||
if (deviceType == DeviceType.blue) {
|
if (deviceType == DeviceType.blue) {
|
||||||
final String thirdAndFourth = cleanUuid.substring(2, 4); // 索引2和3
|
final String thirdAndFourth = cleanUuid.substring(6, 8); // 索引2和3
|
||||||
for (final prefix in prefixes) {
|
for (final prefix in prefixes) {
|
||||||
if (thirdAndFourth == prefix) {
|
if (thirdAndFourth == prefix) {
|
||||||
if (isSingle) {
|
if (isSingle) {
|
||||||
@ -369,7 +369,7 @@ class BlueManage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (deviceType == DeviceType.gateway) {
|
} else if (deviceType == DeviceType.gateway) {
|
||||||
final String thirdAndFourth = cleanUuid.substring(2, 8); // 索引2和3
|
final String thirdAndFourth = cleanUuid.substring(6, 8); // 索引2和3
|
||||||
for (final prefix in prefixes) {
|
for (final prefix in prefixes) {
|
||||||
if (thirdAndFourth == prefix) {
|
if (thirdAndFourth == prefix) {
|
||||||
if (isSingle) {
|
if (isSingle) {
|
||||||
|
|||||||
@ -9,10 +9,10 @@ List<String> getDeviceType(DeviceType deviceType) {
|
|||||||
List<String> t = ['758824'];
|
List<String> t = ['758824'];
|
||||||
switch (deviceType) {
|
switch (deviceType) {
|
||||||
case DeviceType.blue:
|
case DeviceType.blue:
|
||||||
t = ['758824', '75', '768824', '76'];
|
t = ['758824', '75', '768824', '76','24'];
|
||||||
break;
|
break;
|
||||||
case DeviceType.gateway:
|
case DeviceType.gateway:
|
||||||
t = ['758825'];
|
t = ['758825','25'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@ -337,17 +337,15 @@ class NearbyLockLogic extends BaseGetXController {
|
|||||||
// 'featureSettingValue': state.featureSettingValue,
|
// 'featureSettingValue': state.featureSettingValue,
|
||||||
// 'featureSettingParams': state.featureSettingParams,
|
// 'featureSettingParams': state.featureSettingParams,
|
||||||
// });
|
// });
|
||||||
Get.toNamed(Routers.saveLockPage,
|
Get.toNamed(Routers.saveLockPage, arguments: <String, Object?>{
|
||||||
arguments: <String, Object?>{
|
'addressInfo': {},
|
||||||
'addressInfo': {},
|
'pwdTimestamp': state.timestampValue * 1000,
|
||||||
'pwdTimestamp': state.timestampValue * 1000,
|
'lockInfo': state.lockInfo,
|
||||||
'lockInfo': state.lockInfo,
|
'featureValue': state.featureValue,
|
||||||
'featureValue': state.featureValue,
|
'featureSettingValue': state.featureSettingValue,
|
||||||
'featureSettingValue': state.featureSettingValue,
|
'featureSettingParams': state.featureSettingParams,
|
||||||
'featureSettingParams': state.featureSettingParams,
|
'isFromMap': 0,
|
||||||
'isFromMap': 0,
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
|
|||||||
@ -25,6 +25,7 @@ class SelectGatewayListLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 监听设备返回的数据
|
// 监听设备返回的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription =
|
_replySubscription =
|
||||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
||||||
@ -35,7 +36,6 @@ class SelectGatewayListLogic extends BaseGetXController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// WIFI配网结果
|
|
||||||
Future<void> _replyGatewayGetStatusReply(Reply reply) async {
|
Future<void> _replyGatewayGetStatusReply(Reply reply) async {
|
||||||
final int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
|
|
||||||
@ -213,6 +213,10 @@ class SelectGatewayListLogic extends BaseGetXController {
|
|||||||
void dispose() {
|
void dispose() {
|
||||||
_replySubscription.cancel();
|
_replySubscription.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
_replySubscription.cancel();
|
||||||
|
super.onClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user