diff --git a/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/dfu/FirmwareUpgradeManager.java b/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/dfu/FirmwareUpgradeManager.java index 9e308dcb..060ad4fd 100644 --- a/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/dfu/FirmwareUpgradeManager.java +++ b/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/dfu/FirmwareUpgradeManager.java @@ -337,7 +337,7 @@ public void onResponse(@NonNull final McuMgrImageStateResponse response) { // Check for an error return code if (!response.isSuccess()) { - fail(new McuMgrErrorException(response.getRc())); + fail(new McuMgrErrorException(response.getReturnCode())); return; } @@ -432,7 +432,7 @@ public void onResponse(@NonNull McuMgrImageStateResponse response) { Log.v(TAG, "Test response: " + response.toString()); // Check for an error return code if (!response.isSuccess()) { - fail(new McuMgrErrorException(response.getRc())); + fail(new McuMgrErrorException(response.getReturnCode())); return; } if (response.images.length != 2) { @@ -495,7 +495,7 @@ public void onResponse(@NonNull McuMgrResponse response) { Log.v(TAG, "Reset request sent. Waiting for reset"); // Check for an error return code if (!response.isSuccess()) { - fail(new McuMgrErrorException(response.getRc())); + fail(new McuMgrErrorException(response.getReturnCode())); } } @@ -516,7 +516,7 @@ public void onResponse(@NonNull McuMgrImageStateResponse response) { Log.v(TAG, "Confirm response: " + response.toString()); // Check for an error return code if (!response.isSuccess()) { - fail(new McuMgrErrorException(response.getRc())); + fail(new McuMgrErrorException(response.getReturnCode())); return; } if (response.images.length == 0) { diff --git a/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/response/McuMgrResponse.java b/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/response/McuMgrResponse.java index 557314b4..a654aee5 100644 --- a/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/response/McuMgrResponse.java +++ b/mcumgr-android-lib/src/main/java/io/runtime/mcumgr/response/McuMgrResponse.java @@ -49,7 +49,7 @@ public class McuMgrResponse { /** * The return code (enum) for this response. For the raw return code use the "rc" property. */ - private McuMgrErrorCode mRc; + private McuMgrErrorCode mReturnCode; /** * McuMgr payload for this response. This does not include the McuMgr header for standard @@ -91,12 +91,12 @@ public McuMgrHeader getHeader() { * * @return Mcu Manager return code. */ - public int getRcValue() { - if (mRc == null) { + public int getReturnCodeValue() { + if (mReturnCode == null) { Log.w(TAG, "Response does not contain a McuMgr return code."); return 0; } else { - return mRc.value(); + return mReturnCode.value(); } } @@ -105,8 +105,8 @@ public int getRcValue() { * * @return The return code enum. */ - public McuMgrErrorCode getRc() { - return mRc; + public McuMgrErrorCode getReturnCode() { + return mReturnCode; } /** @@ -187,7 +187,7 @@ void initFields(McuMgrScheme scheme, byte[] bytes, McuMgrHeader header, byte[] p mBytes = bytes; mHeader = header; mPayload = payload; - mRc = rc; + mReturnCode = rc; } /**