|
|
|
@ -216,11 +216,6 @@ class OtaUpgradeController extends GetxController { |
|
|
|
// 版本检查 |
|
|
|
bool isUpdate = _isNewVersionAvailable(product.version!); |
|
|
|
|
|
|
|
if (isUpdate) { |
|
|
|
await _bleManager.setEnterOta(true); |
|
|
|
await Future.delayed(const Duration(seconds: 2)); |
|
|
|
jlota.init(); |
|
|
|
} |
|
|
|
|
|
|
|
isUpdateAvailable.value = isUpdate; |
|
|
|
} catch (e) { |
|
|
|
@ -337,6 +332,10 @@ class OtaUpgradeController extends GetxController { |
|
|
|
|
|
|
|
// 修改后的startDownload方法 |
|
|
|
Future<void> startDownload() async { |
|
|
|
await _bleManager.setEnterOta(true); |
|
|
|
await Future.delayed(const Duration(seconds: 2)); |
|
|
|
jlota.init(); |
|
|
|
|
|
|
|
isDownloading.value = true; |
|
|
|
showDetailedStatus.value = true; |
|
|
|
detailedStatus.value = '准备下载固件包...'; |
|
|
|
|