Skip to content

Commit

Permalink
fix app to match lib changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Apr 29, 2018
1 parent db58bda commit 3955874
Showing 1 changed file with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,27 +255,12 @@ private void prepareFota() throws McuMgrException {
}
mBleTransport = new McuMgrBleTransport(this, mDevice);
mManager = new FirmwareUpgradeManager(mBleTransport, data, this);
mManager.setUploadMtu(512);
mManager.setCallbackOnUiThread(this);
mManager.start();
}

private final static char[] hexArray = "0123456789ABCDEF".toCharArray();

private String toHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for (int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
}
return new String(hexChars);
}



@Override
public boolean confirmUpgrade(FirmwareUpgradeManager firmwareUpgrade) {
return true;
public void onStart(FirmwareUpgradeManager manager) {

}

@Override
Expand Down

0 comments on commit 3955874

Please sign in to comment.