Skip to content

Commit

Permalink
Revert "Switch Crc library (#9)"
Browse files Browse the repository at this point in the history
This reverts commit d5dad3b.
  • Loading branch information
vovagorodok committed May 2, 2023
1 parent d5dad3b commit ea15400
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 40 deletions.
37 changes: 0 additions & 37 deletions library.json

This file was deleted.

11 changes: 11 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name=ArduinoBleOta
version=1.0.0
author=vovagorodok
maintainer=vovagorodok <[email protected]>
sentence=Bluetooth low energy (BLE) library for uploads.
paragraph=This library supports functionality of uploads via BLE
url=https://github.com/vovagorodok/ArduinoBleOta
category=Communication
architectures=esp32,samd,megaavr,mbed,apollo3,mbed_nano,mbed_portenta,mbed_nicla
includes=ArduinoBleOTA.h
depends=ArduinoOTA,CRC32,CircularBuffer,NimBLE-Arduino,ArduinoBLE
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ default_envs =
framework = arduino
lib_deps =
jandrassy/ArduinoOTA@^1.0.9
robtillaart/CRC@^0.3.3
bakercp/CRC32@^2.0.0
rlogiacco/CircularBuffer@^1.3.3

[env:esp32dev]
Expand Down
4 changes: 2 additions & 2 deletions src/BleOtaUploader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void BleOtaUploader::handleEnd(const uint8_t* data, size_t length)
uint32_t firmwareCrc;
memcpy(&firmwareCrc, data, length);

if (crc.getCRC() != firmwareCrc)
if (crc.finalize() != firmwareCrc)
{
terminateUpload();
send(CHECKSUM_ERROR);
Expand Down Expand Up @@ -278,7 +278,7 @@ void BleOtaUploader::fillData(const uint8_t* data, size_t length)
#else
storage->write(data[i]);
#endif
crc.add(data[i]);
crc.update(data[i]);
}
}

Expand Down

0 comments on commit ea15400

Please sign in to comment.