mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 17:06:25 +01:00
Fixed 'ghosted' image issue, higher channels now supported
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
zbs243_Tag_FW/powermgt.c
Normal file → Executable file
2
zbs243_Tag_FW/powermgt.c
Normal file → Executable file
@@ -188,7 +188,7 @@ void powerUp(const uint8_t parts) {
|
||||
radioInit();
|
||||
radioRxFilterCfg(mSelfMac, 0x10000, PROTO_PAN_ID);
|
||||
radioSetTxPower(10);
|
||||
if (currentChannel >= 11 && currentChannel <= 25) {
|
||||
if (currentChannel >= 11 && currentChannel <= 27) {
|
||||
radioSetChannel(currentChannel);
|
||||
} else {
|
||||
radioSetChannel(RADIO_FIRST_CHANNEL);
|
||||
|
||||
6
zbs243_Tag_FW/settings.h
Normal file → Executable file
6
zbs243_Tag_FW/settings.h
Normal file → Executable file
@@ -3,9 +3,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define FW_VERSION 014 // version number (max 2.5.5 :) )
|
||||
#define FW_VERSION_SUFFIX "-RE" // suffix, like -RC1 or whatever.
|
||||
#define FW_VERSION 015 // version number (max 2.5.5 :) )
|
||||
#define FW_VERSION_SUFFIX "-RF" // suffix, like -RC1 or whatever.
|
||||
#define HAS_BUTTON // uncomment to enable reading a push button (connect between 'TEST' en 'GND' on the tag, along with a 100nF capacitor in parallel).
|
||||
#define DEBUGBLOCKS // uncomment to enable extra debug information on the block transfers
|
||||
//#define DEBUGBLOCKS // uncomment to enable extra debug information on the block transfers
|
||||
//#define PRINT_LUT // uncomment if you want the tag to print the LUT for the current temperature bracket
|
||||
#endif
|
||||
@@ -615,6 +615,7 @@ static bool downloadImageDataToEEPROM(const struct AvailDataInfo *__xdata avail)
|
||||
if (xMemEqual((const void *__xdata) & avail->dataVer, (const void *__xdata) & curDataInfo.dataVer, 8) && curDataInfo.dataSize) {
|
||||
// looks like we did. We'll carry on where we left off.
|
||||
pr("restarting image download");
|
||||
curImgSlot = nextImgSlot;
|
||||
} else {
|
||||
// go to the next image slot
|
||||
nextImgSlot++;
|
||||
@@ -657,6 +658,9 @@ static bool downloadImageDataToEEPROM(const struct AvailDataInfo *__xdata avail)
|
||||
if (getDataBlock(dataRequestSize)) {
|
||||
// succesfully downloaded datablock, save to eeprom
|
||||
powerUp(INIT_EEPROM);
|
||||
#ifdef DEBUGBLOCKS
|
||||
pr("Saving block %d to slot %d\n", curBlock.blockId, curImgSlot);
|
||||
#endif
|
||||
saveImgBlockData(curImgSlot, curBlock.blockId);
|
||||
powerDown(INIT_EEPROM);
|
||||
curBlock.blockId++;
|
||||
@@ -676,6 +680,9 @@ static bool downloadImageDataToEEPROM(const struct AvailDataInfo *__xdata avail)
|
||||
eih->size = imageSize;
|
||||
eih->dataType = curDataInfo.dataType;
|
||||
|
||||
#ifdef DEBUGBLOCKS
|
||||
pr("Now writing datatype 0x%02X to slot %d\n", curDataInfo.dataType, curImgSlot);
|
||||
#endif
|
||||
powerUp(INIT_EEPROM);
|
||||
eepromWrite(getAddressForSlot(curImgSlot), eih, sizeof(struct EepromImageHeader));
|
||||
powerDown(INIT_EEPROM);
|
||||
|
||||
Reference in New Issue
Block a user