fix:修复锁升级因为不兼容问题,导致无法升级。提高了对 固件 json 结构的解析

This commit is contained in:
anfe 2024-07-08 17:25:26 +08:00
parent 6041290ebd
commit a8414d1876

View File

@ -76,7 +76,7 @@ class LockEscalationLogic extends BaseGetXController {
} }
// ota // ota
void blueOTAUpgrade(Map data, List<int> token) { void blueOTAUpgrade(Map<dynamic, dynamic> data, List<int> token) {
BlueManage().blueSendData(BlueManage().connectDeviceName, BlueManage().blueSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState deviceConnectionState) async { (BluetoothConnectionState deviceConnectionState) async {
if (deviceConnectionState == BluetoothConnectionState.connected) { if (deviceConnectionState == BluetoothConnectionState.connected) {
@ -92,8 +92,8 @@ class LockEscalationLogic extends BaseGetXController {
lockID: BlueManage().connectDeviceName, lockID: BlueManage().connectDeviceName,
userID: uid, userID: uid,
keyID: BlueManage().connectDeviceName, keyID: BlueManage().connectDeviceName,
platform: int.tryParse(data['platform']) ?? 0, platform: int.tryParse(data['platform'] ?? '0'),
product: int.tryParse(data['product']) ?? 0, product: int.tryParse(data['product'] ?? '0'),
hwVersion: data['hwVersion'], hwVersion: data['hwVersion'],
fwVersion: data['fwVersion'], fwVersion: data['fwVersion'],
fwSize: data['fwSize'], fwSize: data['fwSize'],