diff --git a/tag_fw/fw154.bin b/tag_fw/fw154.bin index 55346592..0f94c4b1 100644 Binary files a/tag_fw/fw154.bin and b/tag_fw/fw154.bin differ diff --git a/tag_fw/fw29.bin b/tag_fw/fw29.bin index cd9d84b0..1a24f95d 100644 Binary files a/tag_fw/fw29.bin and b/tag_fw/fw29.bin differ diff --git a/tag_fw/fw42.bin b/tag_fw/fw42.bin index e313f05c..a688ab2a 100644 Binary files a/tag_fw/fw42.bin and b/tag_fw/fw42.bin differ diff --git a/tag_fw/main.c b/tag_fw/main.c index b70b61db..8b1082e1 100644 --- a/tag_fw/main.c +++ b/tag_fw/main.c @@ -187,7 +187,6 @@ void main() { powerUp(INIT_EPD_VOLTREADING | INIT_TEMPREADING); powerDown(INIT_RADIO); - powerUp(INIT_EEPROM); // get the highest slot number, number of slots initializeProto(); @@ -314,9 +313,9 @@ void main() { if ((!currentChannel && !noAPShown) || (lowBattery && !lowBatteryShown) || (scanAttempts == (INTERVAL_1_ATTEMPTS + INTERVAL_2_ATTEMPTS - 1))) { powerUp(INIT_EPD); + wdt60s(); if (curImgSlot != 0xFF) { powerUp(INIT_EEPROM); - wdt60s(); drawImageFromEeprom(curImgSlot); powerDown(INIT_EEPROM); } else if ((scanAttempts >= (INTERVAL_1_ATTEMPTS + INTERVAL_2_ATTEMPTS - 1))) { diff --git a/tag_fw/syncedproto.c b/tag_fw/syncedproto.c index 2e29b241..5a1f950f 100644 --- a/tag_fw/syncedproto.c +++ b/tag_fw/syncedproto.c @@ -479,7 +479,7 @@ static bool getDataBlock(const uint16_t blockSize) { partsThisBlock = BLOCK_MAX_PARTS; memset(curBlock.requestedParts, 0xFF, BLOCK_REQ_PARTS_BYTES); } else { - partsThisBlock = blockSize / BLOCK_PART_DATA_SIZE; + partsThisBlock = (sizeof(struct blockData)+blockSize) / BLOCK_PART_DATA_SIZE; if (blockSize % BLOCK_PART_DATA_SIZE) partsThisBlock++; memset(curBlock.requestedParts, 0x00, BLOCK_REQ_PARTS_BYTES); for (uint8_t c = 0; c < partsThisBlock; c++) {