mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 05:06:39 +01:00
updates
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -39,6 +39,8 @@ void identifyTagInfo() {
|
||||
92 C3 80 05 15 08 19 04 00 12 01 18 03 10 01 04 07 07 01 80 00 00 63 FF FF FF FF FF FF FF FF FF 5.85 BWR
|
||||
22 F0 BF 05 15 0A 14 04 00 12 00 18 03 10 01 04 07 07 01 80 00 00 24 FF FF FF FF FF FF FF FF FF 5.85 BW
|
||||
99 78 B1 05 15 0A 06 04 00 0D 01 68 01 B8 00 38 07 07 01 80 00 00 43 FF FF FF FF FF FF FF FF FF 2.6"
|
||||
72 92 1E 7E 15 0B 09 04 00 15 00 80 01 A8 00 38 00 01 01 9C 00 00 22 FF FF FF FF FF FF FF FF FF 2.9" FREEZER
|
||||
31 50 53 06 16 02 19 04 00 12 01 C8 00 C8 00 04 00 07 01 9C 00 00 40 FF FF FF FF FF FF FF FF FF
|
||||
|
||||
|
||||
|
||||
@@ -147,6 +149,8 @@ void identifyTagInfo() {
|
||||
tag.macSuffix = 0xB0D0;
|
||||
epd->epdMirrorV = true;
|
||||
tag.OEPLtype = SOLUM_M3_BWR_16;
|
||||
epd->effectiveXRes = epdXRes;
|
||||
epd->effectiveYRes = epdYRes-1; //Yeah... I wonder why too....
|
||||
break;
|
||||
case STYPE_SIZE_022:
|
||||
tag.macSuffix = 0xB190;
|
||||
@@ -172,6 +176,12 @@ void identifyTagInfo() {
|
||||
epd->drawDirectionRight = true;
|
||||
epd->XOffset = 8;
|
||||
break;
|
||||
case STYPE_SIZE_029_FREEZER:
|
||||
tag.OEPLtype = SOLUM_M3_BW_29;
|
||||
tag.macSuffix = 0x82D0;
|
||||
epd->drawDirectionRight = true;
|
||||
epd->XOffset = 8;
|
||||
break;
|
||||
case STYPE_SIZE_042:
|
||||
tag.macSuffix = 0xB6D0;
|
||||
tag.OEPLtype = SOLUM_M3_BWR_42;
|
||||
|
||||
@@ -212,7 +212,7 @@ void dualssd::draw() {
|
||||
}
|
||||
void dualssd::drawNoWait() {
|
||||
epdWriteDisplayData();
|
||||
epdWrite(CMD_DISP_UPDATE_CTRL2, 1, 0xF7);
|
||||
//epdWrite(CMD_DISP_UPDATE_CTRL2, 1, 0xF7);
|
||||
epdWrite(CMD_ACTIVATION, 0);
|
||||
}
|
||||
void dualssd::epdWaitRdy() {
|
||||
|
||||
@@ -76,13 +76,17 @@ void unissd::epdSetup() {
|
||||
// stock init 1.6"
|
||||
epdWrite(CMD_DRV_OUTPUT_CTRL, 3, this->effectiveYRes & 0xFF, this->effectiveYRes >> 8, 0x00);
|
||||
epdWrite(CMD_DATA_ENTRY_MODE, 1, 0x01);
|
||||
epdWrite(CMD_WINDOW_X_SIZE, 2, this->XOffset / 8, ((this->XOffset + this->effectiveXRes) / 8) - 1);
|
||||
epdWrite(CMD_WINDOW_X_SIZE, 2, this->XOffset / 8, ((this->XOffset + this->effectiveXRes) / 8)-1);
|
||||
epdWrite(CMD_WINDOW_Y_SIZE, 4, (this->YOffset + this->effectiveYRes) & 0xFF, (this->YOffset + this->effectiveYRes) >> 8, this->YOffset & 0xFF, this->YOffset >> 8);
|
||||
epdWrite(CMD_BORDER_WAVEFORM_CTRL, 1, 0x05);
|
||||
epdWrite(CMD_TEMP_SENSOR_CONTROL, 1, 0x80);
|
||||
// end stock init
|
||||
// added
|
||||
epdWrite(CMD_DISP_UPDATE_CTRL, 2, 0x08, 0x00); // fix reversed image with stock setup
|
||||
if(tag.hasThirdColor){
|
||||
epdWrite(CMD_DISP_UPDATE_CTRL, 2, 0x08, 0x00); // fix reversed image with stock setup
|
||||
}else{
|
||||
epdWrite(CMD_DISP_UPDATE_CTRL, 2, 0x48, 0x00); // fix reversed image with stock setup
|
||||
}
|
||||
break;
|
||||
case 0x19:
|
||||
// stock init 9.7"
|
||||
@@ -108,7 +112,11 @@ void unissd::epdSetup() {
|
||||
void unissd::epdWriteDisplayData() {
|
||||
// this display expects two entire framebuffers worth of data to be written, one for b/w and one for red
|
||||
uint8_t *buf[2] = {0, 0}; // this will hold pointers to odd/even data lines
|
||||
for (uint8_t c = 0; c < 2; c++) {
|
||||
uint8_t c_end = 2; //The loop must be executed 2 times if BWR, 1 time if BW
|
||||
if(!tag.hasThirdColor){
|
||||
c_end = 1;
|
||||
}
|
||||
for (uint8_t c = 0; c < c_end; c++) {
|
||||
switch (this->controllerType) {
|
||||
case 0x0F:
|
||||
case 0x12:
|
||||
|
||||
@@ -26,23 +26,7 @@ bool lowBatteryShown = false;
|
||||
bool noAPShown = false;
|
||||
|
||||
void addOverlay() {
|
||||
/*if (currentChannel == 0) {
|
||||
drawMask(epd->Xres - 27, 5, 22, 22, COLOR_BLACK);
|
||||
if(tag.hasThirdColor){
|
||||
drawMask(epd->Xres - 27, 5, 22, 22, COLOR_RED);
|
||||
drawRoundedRectangle(epd->Xres - 28, 4, 24, 24, COLOR_RED);
|
||||
addBufferedImage(epd->Xres - 24, 8, COLOR_BLACK, rotation::ROTATE_0, ant, DRAW_NORMAL);
|
||||
addBufferedImage(epd->Xres - 16, 15, COLOR_RED, rotation::ROTATE_0, cross, DRAW_NORMAL);
|
||||
}else{
|
||||
drawMask(epd->Xres - 27, 5, 22, 22, COLOR_BLACK);
|
||||
drawRoundedRectangle(epd->Xres - 28, 4, 24, 24, COLOR_BLACK);
|
||||
addBufferedImage(epd->Xres - 24, 8, COLOR_BLACK, rotation::ROTATE_0, ant, DRAW_NORMAL);
|
||||
addBufferedImage(epd->Xres - 16, 15, COLOR_BLACK, rotation::ROTATE_0, cross, DRAW_NORMAL);
|
||||
}
|
||||
noAPShown = true;
|
||||
} else {
|
||||
noAPShown = false;
|
||||
}*/
|
||||
|
||||
if (currentChannel == 0) {
|
||||
drawMask(epd->Xres - 28, 4, 24, 24, COLOR_BLACK);
|
||||
if(tag.hasThirdColor){
|
||||
@@ -101,9 +85,9 @@ void showSplashScreen() {
|
||||
case STYPE_SIZE_016:
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(2, 2, COLOR_BLACK, rotation::ROTATE_0, "OpenEPaperLink");
|
||||
fr.epdPrintf(10, 38, COLOR_RED, rotation::ROTATE_0, "Newton M3 2.2\"");
|
||||
fr.epdPrintf(10, 38, COLOR_RED, rotation::ROTATE_0, "Newton M3 1.6\"");
|
||||
fr.epdPrintf(5, epd->Yres - 40, 0, rotation::ROTATE_0, "FW: %04X-%s", fwVersion, fwVersionSuffix);
|
||||
fr.epdPrintf(2, epd->Yres - 20, 0, rotation::ROTATE_0, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
fr.epdPrintf(2, epd->Yres - 20, 0, rotation::ROTATE_0, "%02X:%02X:%02X:%02X:%02X:%02X", mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
break;
|
||||
case STYPE_SIZE_022:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
@@ -135,6 +119,16 @@ void showSplashScreen() {
|
||||
fr.epdPrintf(5, epd->Yres - 20, 0, rotation::ROTATE_0, "MAC: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
addQR(epd->Xres - 120, 42, 3, 3, "https://openepaperlink.eu/tag/0/%02X/%02X%02X%02X%02X%02X%02X%02X%02X/", tag.OEPLtype, mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
break;
|
||||
case STYPE_SIZE_029_FREEZER:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(2, 2, COLOR_BLACK, rotation::ROTATE_0, "OpenEPaperLink");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(10, 38, COLOR_BLACK, rotation::ROTATE_0, "Newton M3 2.9\" Freezer");
|
||||
// fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(epd->Xres - 17, 0, COLOR_BLACK, rotation::ROTATE_270, "FW: %04X-%s", fwVersion, fwVersionSuffix);
|
||||
fr.epdPrintf(5, epd->Yres - 20, COLOR_BLACK, rotation::ROTATE_0, "MAC: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
addQR(epd->Xres - 120, 42, 3, 3, "https://openepaperlink.eu/tag/0/%02X/%02X%02X%02X%02X%02X%02X%02X%02X/", tag.OEPLtype, mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
break;
|
||||
case STYPE_SIZE_042:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(2, 2, COLOR_BLACK, rotation::ROTATE_0, "OpenEPaperLink");
|
||||
@@ -293,6 +287,18 @@ void showAPFound() {
|
||||
fr.epdPrintf(10, epd->Yres - 25, 0, rotation::ROTATE_0, "MAC: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
addQR(epd->Xres - 66, 47, 3, 2, "https://openepaperlink.eu/tag/1/%02X/%02X%02X%02X%02X%02X%02X%02X%02X/", tag.OEPLtype, mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
break;
|
||||
case STYPE_SIZE_029_FREEZER:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "AP Found");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(10, 53, COLOR_BLACK, rotation::ROTATE_0, "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", APmac[7], APmac[6], APmac[5], APmac[4], APmac[3], APmac[2], APmac[1], APmac[0]);
|
||||
fr.epdPrintf(10, 71, COLOR_BLACK, rotation::ROTATE_0, "RSSI: %ddBm LQI: %d", mLastRSSI, mLastLqi);
|
||||
fr.epdPrintf(10, 89, COLOR_BLACK, rotation::ROTATE_0, "Ch %d", currentChannel);
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(10, epd->Yres - 43, 0, rotation::ROTATE_0, "Battery: %d.%dV Temp: %d'C", batteryVoltage / 1000, batteryVoltage % 1000, temperature);
|
||||
fr.epdPrintf(10, epd->Yres - 25, 0, rotation::ROTATE_0, "MAC: %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
addQR(epd->Xres - 66, 47, 3, 2, "https://openepaperlink.eu/tag/1/%02X/%02X%02X%02X%02X%02X%02X%02X%02X/", tag.OEPLtype, mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
break;
|
||||
case STYPE_SIZE_042:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "AP Found");
|
||||
@@ -422,6 +428,15 @@ void showNoAP() {
|
||||
fr.epdPrintf(10, 89, COLOR_BLACK, rotation::ROTATE_0, "I'll try again in a little while, but you");
|
||||
fr.epdPrintf(10, 109, COLOR_BLACK, rotation::ROTATE_0, "can force a retry now by pressing a button");
|
||||
break;
|
||||
case STYPE_SIZE_029_FREEZER:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "No AP Found");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
addQR(epd->Xres - 66, 47, 3, 2, "https://openepaperlink.eu/tag/1/%02X/%02X%02X%02X%02X%02X%02X%02X%02X/", tag.OEPLtype, mSelfMac[7], mSelfMac[6], mSelfMac[5], mSelfMac[4], mSelfMac[3], mSelfMac[2], mSelfMac[1], mSelfMac[0]);
|
||||
fr.epdPrintf(10, 69, COLOR_BLACK, rotation::ROTATE_0, "Couldn't find an AP :(");
|
||||
fr.epdPrintf(10, 89, COLOR_BLACK, rotation::ROTATE_0, "I'll try again in a little while, but you");
|
||||
fr.epdPrintf(10, 109, COLOR_BLACK, rotation::ROTATE_0, "can force a retry now by pressing a button");
|
||||
break;
|
||||
case STYPE_SIZE_042:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "No AP Found");
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
#define STYPE_SIZE_022 0x41
|
||||
#define STYPE_SIZE_026 0x43
|
||||
#define STYPE_SIZE_029 0x42
|
||||
#define STYPE_SIZE_029_FREEZER 0x22
|
||||
#define STYPE_SIZE_042 0x46
|
||||
#define STYPE_SIZE_043 0x47
|
||||
#define STYPE_SIZE_058 0x63
|
||||
|
||||
Reference in New Issue
Block a user