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