v0027 M2 ZBS243, fixes inadvertent redraw

This commit is contained in:
jjwbruijn
2024-03-01 14:02:37 +01:00
parent 1b256c3fba
commit 6bdf99a8e7
4 changed files with 37 additions and 29 deletions

View File

@@ -9,26 +9,26 @@ BINDIR="../binaries/Tag"
echo -e "\nBuilding 1.54 version..."
make BUILD=zbs154_ssd1619 CPU=8051 SOC=zbs243 > /dev/null
mv main.bin ${BINDIR}/SOLUM_154_SSD1619-00-${VER}.bin -v
mv main.bin ${BINDIR}/SOL_M2_154_SSD_${VER}.bin -v
make clean > /dev/null
echo -e "\n\nBuilding 2.9 (SSD1619) version..."
make BUILD=zbs29_ssd1619 CPU=8051 SOC=zbs243 > /dev/null
mv main.bin ${BINDIR}/SOLUM_29_SSD1619-01-${VER}.bin -v
mv main.bin ${BINDIR}/SOL_M2_29_SSD_${VER}.bin -v
make clean > /dev/null
echo -e "\n\nBuilding 4.2 version..."
make BUILD=zbs42_ssd1619 CPU=8051 SOC=zbs243 > /dev/null
mv main.bin ${BINDIR}/SOLUM_42_SSD1619-02-${VER}.bin -v
mv main.bin ${BINDIR}/SOL_M2_42_SSD_${VER}.bin -v
make clean > /dev/null
echo -e "\n\nBuilding 2.9 (UC8151) version..."
make BUILD=zbs29_uc8151 CPU=8051 SOC=zbs243 > /dev/null
mv main.bin ${BINDIR}/SOLUM_29_UC8151-11-${VER}.bin -v
mv main.bin ${BINDIR}/SOL_M2_29_UC_${VER}.bin -v
make clean > /dev/null
echo -e "\n\nBuilding 2.9 BW (SSD1619 - freezer) version..."
make BUILD=zbs29_BW_ssd1619 CPU=8051 SOC=zbs243 > /dev/null
mv main.bin ${BINDIR}/SOLUM_29_BW_LOWTEMP-21-${VER}.bin -v
mv main.bin ${BINDIR}/SOL_M2_29_LT_${VER}.bin -v
make clean > /dev/null

View File

@@ -558,6 +558,10 @@ void executeCommand(uint8_t cmd) {
eraseImageBlocks();
powerDown(INIT_EEPROM);
break;
case CMD_GET_BATTERY_VOLTAGE:
longDataReqCounter = LONG_DATAREQ_INTERVAL + 1;
voltageCheckCounter = VOLTAGE_CHECK_INTERVAL;
break;
#ifndef LEAN_VERSION
case CMD_ENTER_SLIDESHOW_FAST:
powerUp(INIT_EEPROM);
@@ -757,7 +761,7 @@ void main() {
#ifdef DEBUGMAIN
pr("MAIN: Ap Found!\n");
#endif
//showNoAP();
// showNoAP();
showAPFound();
// write the settings to the eeprom
@@ -772,7 +776,7 @@ void main() {
#ifdef DEBUGMAIN
pr("MAIN: No AP found...\n");
#endif
//showAPFound();
// showAPFound();
showNoAP();
// write the settings to the eeprom
powerUp(INIT_EEPROM);

View File

@@ -3,17 +3,17 @@
#include <stdint.h>
#define FW_VERSION 0x0026 // version number
#define FW_VERSION_SUFFIX "-MD5" // suffix, like -RC1 or whatever.
#define FW_VERSION 0x0027 // version number
#define FW_VERSION_SUFFIX "-RDRW" // suffix, like -RC1 or whatever.
// #define DEBUGBLOCKS // uncomment to enable extra debug information on the block transfers
#define DEBUGPROTO // debug protocol
//#define DEBUGPROTO // debug protocol
// #define DEBUGOTA // debug OTA FW updates
#define DEBUGDRAWING // debug the drawing part
#define DEBUGEPD // debug the EPD driver
#define DEBUGMAIN // parts in the main loop
#define DEBUGNFC // debug NFC functions
//#define DEBUGDRAWING // debug the drawing part
//#define DEBUGEPD // debug the EPD driver
//#define DEBUGMAIN // parts in the main loop
//#define DEBUGNFC // debug NFC functions
// #define DEBUGGUI // debug GUI drawing (enabled)
#define DEBUGSETTINGS // debug settings module (preferences/eeprom)
//#define DEBUGSETTINGS // debug settings module (preferences/eeprom)
// #define DEBUGEEPROM // eeprom-related debug messages
#define VALIDATE_IMAGE_MD5 // The firmware can validate the image MD5 before displaying it. This costs about 8mAS (milliamp-second) for a 1.54, 16
// #define PRINT_LUT // uncomment if you want the tag to print the LUT for the current temperature bracket
@@ -59,4 +59,4 @@ void writeSettings();
void loadSettings();
void loadSettingsFromBuffer(uint8_t* p);
void invalidateSettingsEEPROM();
#endif
#endif

View File

@@ -217,9 +217,9 @@ static void sendAvailDataReq() {
commsTxNoCpy(outBuffer);
}
struct AvailDataInfo *__xdata getAvailDataInfo() {
#ifdef DEBUGPROTO
#ifdef DEBUGPROTO
pr("PROTO: Full AvailData\n");
#endif
#endif
radioRxEnable(true, true);
uint32_t __xdata t;
for (uint8_t c = 0; c < DATA_REQ_MAX_ATTEMPTS; c++) {
@@ -244,9 +244,9 @@ struct AvailDataInfo *__xdata getAvailDataInfo() {
return NULL;
}
struct AvailDataInfo *__xdata getShortAvailDataInfo() {
#ifdef DEBUGPROTO
#ifdef DEBUGPROTO
pr("PROTO: Short AvailData\n");
#endif
#endif
radioRxEnable(true, true);
uint32_t __xdata t;
for (uint8_t c = 0; c < DATA_REQ_MAX_ATTEMPTS; c++) {
@@ -683,9 +683,9 @@ static bool getDataBlock(const uint16_t blockSize) {
curBlock.requestedParts[c / 8] |= (1 << (c % 8));
}
requestPartialBlock = false;
#ifdef DEBUGPROTO
#ifdef DEBUGPROTO
pr("PROTO: blk failed validation!\n");
#endif
#endif
}
} else {
#ifndef DEBUGBLOCKS
@@ -695,9 +695,9 @@ static bool getDataBlock(const uint16_t blockSize) {
requestPartialBlock = true;
}
}
#ifdef DEBUGPROTO
#ifdef DEBUGPROTO
pr("PROTO: failed getting block\n");
#endif
#endif
return false;
}
@@ -948,7 +948,9 @@ inline bool processImageDataAvail(struct AvailDataInfo *__xdata avail) {
} else {
// currently not displayed
#ifdef DEBUGPROTO
pr("PROTO: currently not shown image\n");
#endif
// try to find the data in the SPI EEPROM
powerUp(INIT_EEPROM);
uint8_t findImgSlot = findSlotVer(&(avail->dataVer));
@@ -956,6 +958,9 @@ inline bool processImageDataAvail(struct AvailDataInfo *__xdata avail) {
// Is this image already in a slot somewhere
if (findImgSlot != 0xFF) {
#ifdef DEBUGPROTO
pr("PROTO: Found image in EEPROM\n");
#endif
// found a (complete)valid image slot for this version
powerUp(INIT_RADIO);
sendXferComplete();
@@ -994,9 +999,8 @@ inline bool processImageDataAvail(struct AvailDataInfo *__xdata avail) {
return false;
}
}
// keep track on what is currently displayed
xMemCopy8(curDispDataVer, xferDataInfo.dataVer);
// keep track on what is currently displayed
xMemCopy8(curDispDataVer, &xferDataInfo.dataVer);
return true;
}
}
@@ -1228,4 +1232,4 @@ bool validateFWMagic() {
void initializeProto() {
getNumSlots();
curHighSlotId = getHighSlotId();
}
}