fix: 1、修复wifi锁、网关配网传入的gatewayJson长度1字节改为2字节
This commit is contained in:
parent
404fcb7a8d
commit
f21e49ae68
@ -1,6 +1,8 @@
|
||||
// 网关配网
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
|
||||
import '../io_reply.dart';
|
||||
import '../io_sender.dart';
|
||||
import '../io_tool/io_tool.dart';
|
||||
@ -47,7 +49,12 @@ class GatewayConfiguringWifiCommand extends SenderProtocol {
|
||||
|
||||
//gatewayConfigurationStr
|
||||
final int clientIdLength = utf8.encode(gatewayConfigurationStr!).length;
|
||||
subData.add(clientIdLength);
|
||||
final double clientIdLengthDouble = clientIdLength / 256;
|
||||
final int clientIdLengthDoubleType1 = clientIdLengthDouble.toInt();
|
||||
final int clientIdLengthDoubleType2 = clientIdLength % 256;
|
||||
// AppLog.log('gatewayConfigurationStr!:$gatewayConfigurationStr! clientIdLength:$clientIdLength clientIdLengthDouble:$clientIdLengthDouble clientIdLengthDoubleType1:$clientIdLengthDoubleType1 clientIdLengthDoubleType2:$clientIdLengthDoubleType2');
|
||||
data.add(clientIdLengthDoubleType1);
|
||||
data.add(clientIdLengthDoubleType2);
|
||||
subData.addAll(utf8.encode(gatewayConfigurationStr!));
|
||||
// subData = getFixedLengthList(subData, 20 - clientIdLength);
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import 'flavors.dart';
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.sky_pre;
|
||||
F.appFlavor = Flavor.xhj_pre;
|
||||
// AppLog.log('local调用了main函数');
|
||||
await runner.main();
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# 1.0.85+2024120301:完善网关功能
|
||||
# 1.0.85+2024120401:修复网关问题,打包给谢敬调试
|
||||
|
||||
version: 1.0.85+2024123102
|
||||
version: 1.0.85+2025010801
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user