You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: react-native-mcu-manager/android/src/main/java/uk/co/playerdata/reactnativemcumanager/ReactNativeMcuManagerModule.kt
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,14 @@ class ReactNativeMcuManagerModule() : Module() {
66
66
try {
67
67
val nameResult = manager.bootloaderInfo(DefaultManager.BOOTLOADER_INFO_QUERY_BOOTLOADER)
68
68
info.bootloader = nameResult.bootloader
69
-
} catch(ex:McuMgrErrorException) {
69
+
70
+
if (info.bootloader ==MCUBOOT) {
71
+
val mcuMgrResult = manager.bootloaderInfo(DefaultManager.BOOTLOADER_INFO_MCUBOOT_QUERY_MODE)
72
+
73
+
info.mode = mcuMgrResult.mode
74
+
info.noDowngrade = mcuMgrResult.noDowngrade
75
+
}
76
+
} catch (ex:McuMgrErrorException) {
70
77
transport.release()
71
78
72
79
// For consistency with iOS, if the error code is 8 (MGMT_ERR_ENOTSUP), return null
@@ -78,13 +85,6 @@ class ReactNativeMcuManagerModule() : Module() {
78
85
throw ex;
79
86
}
80
87
81
-
if (info.bootloader ==MCUBOOT) {
82
-
val mcuMgrResult = manager.bootloaderInfo(DefaultManager.BOOTLOADER_INFO_MCUBOOT_QUERY_MODE)
0 commit comments