mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 05:06:39 +01:00
Merge pull request #242 from VstudioLAB/M3_58-26-29FREEZER
M3 58 26 29 freezer
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,3 +26,4 @@
|
||||
sdcc/sdcc
|
||||
|
||||
ESP32_AP-Flasher/.vscode/extensions.json
|
||||
ARM_Tag_FW\Newton_M3_nRF52811\$PROJECT_DIR
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -105,6 +105,7 @@ struct tagSpecs {
|
||||
uint8_t buttonCount = 0;
|
||||
bool hasNFC = false;
|
||||
bool hasLED = false;
|
||||
bool hasThirdColor = false;
|
||||
uint16_t macSuffix = 0x0000;
|
||||
uint8_t OEPLtype = 0;
|
||||
uint8_t solumType = 0;
|
||||
|
||||
@@ -36,6 +36,13 @@ void identifyTagInfo() {
|
||||
CA FE BA DE 15 0B 12 04 00 10 01 E0 01 20 03 39 00 03 81 9D 00 00 4C FF FF FF FF FF FF FF FF FF 7.4 UC8179
|
||||
F3 22 BC 05 15 0A 0D 04 00 19 01 A0 02 C0 03 38 07 07 01 80 00 00 64 FF FF FF FF FF FF FF FF FF 9.7 SSD
|
||||
AD BA FE CA 15 0A 1B 04 00 19 01 A0 02 C0 03 38 07 07 01 80 00 00 64 FF FF FF FF FF FF FF FF FF 9.7 type 2
|
||||
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
|
||||
|
||||
|
||||
|
||||
MAC | calib | |?????|Xres |Yres | ??? |capab| |type|
|
||||
|
||||
@@ -49,7 +56,7 @@ void identifyTagInfo() {
|
||||
0x12 - SSD (var1.6)
|
||||
0x15 - SSD (2.9 lite)
|
||||
0x19 - SSD (9.7)
|
||||
|
||||
0x0A - Have third color?
|
||||
0x12 - 0x01 | (0x80 if it has a button)
|
||||
0x13 - 0x80 | (0x10 if it has a LED) | (0x0C ?? ) | (0x01 if it has a button)
|
||||
*/
|
||||
@@ -65,13 +72,21 @@ void identifyTagInfo() {
|
||||
capabilities[1] = getUICRByte(0x13);
|
||||
tag.solumType = getUICRByte(0x16);
|
||||
|
||||
if(getUICRByte(0x0A) == 0x01){
|
||||
tag.hasThirdColor = true;
|
||||
}
|
||||
|
||||
switch (controllerType) {
|
||||
case 0x0F:
|
||||
case 0x12:
|
||||
case 0x15:
|
||||
case 0x19:
|
||||
epd = new unissd;
|
||||
break;
|
||||
if(epdXRes == 792 && epdYRes == 272){
|
||||
epd = new dualssd;
|
||||
}else{
|
||||
epd = new unissd;
|
||||
}
|
||||
break;
|
||||
case 0x0D:
|
||||
epd = new epdvar29;
|
||||
break;
|
||||
@@ -105,6 +120,25 @@ void identifyTagInfo() {
|
||||
if (capabilities[1] & 0x01) tag.buttonCount++;
|
||||
if (capabilities[1] & 0x10) tag.hasLED = true;
|
||||
if (capabilities[0] & 0x01) tag.hasNFC = true;
|
||||
|
||||
printf("TagType report:\n");
|
||||
printf("Resolution: %d*%d Px\n", epd->Xres,epd->Yres);
|
||||
printf("Nb of buttons: %d\n", tag.buttonCount);
|
||||
if(tag.hasLED){
|
||||
printf("This tag have a led: Yes\n");
|
||||
}else{
|
||||
printf("This tag have a led: No\n");
|
||||
}
|
||||
if(tag.hasNFC){
|
||||
printf("This tag have NFC: Yes\n");
|
||||
}else{
|
||||
printf("This tag have NFC: No\n");
|
||||
}
|
||||
if(tag.hasThirdColor){
|
||||
printf("This tag is Black and white only: No\n");
|
||||
}else{
|
||||
printf("This tag is Black and white only: Yes\n");
|
||||
}
|
||||
|
||||
// we'll calculate image slot size here
|
||||
uint32_t imageSize = epd->Xres * epd->Yres / 4;
|
||||
@@ -115,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;
|
||||
@@ -122,6 +158,12 @@ void identifyTagInfo() {
|
||||
tag.OEPLtype = SOLUM_M3_BWR_22;
|
||||
epd->XOffset = 8;
|
||||
break;
|
||||
case STYPE_SIZE_026:
|
||||
tag.macSuffix = 0xB3D0;
|
||||
epd->drawDirectionRight = true;
|
||||
tag.OEPLtype = SOLUM_M3_BWR_22;
|
||||
epd->XOffset = 8;
|
||||
break;
|
||||
case STYPE_SIZE_029:
|
||||
tag.OEPLtype = SOLUM_M3_BWR_29;
|
||||
if (tag.buttonCount == 2) {
|
||||
@@ -134,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;
|
||||
@@ -145,6 +193,16 @@ void identifyTagInfo() {
|
||||
// epd->mirrorH = true;
|
||||
tag.OEPLtype = SOLUM_M3_BWR_43;
|
||||
break;
|
||||
case STYPE_SIZE_058:
|
||||
tag.macSuffix = 0xE3D0;
|
||||
epd->epdMirrorV = true;
|
||||
tag.OEPLtype = SOLUM_M3_BWR_58;
|
||||
break;
|
||||
case STYPE_SIZE_058_FREEZER:
|
||||
tag.macSuffix = 0x84D0;
|
||||
epd->epdMirrorV = true;
|
||||
tag.OEPLtype = SOLUM_M3_BW_58;
|
||||
break;
|
||||
case STYPE_SIZE_060:
|
||||
tag.macSuffix = 0xB890;
|
||||
tag.OEPLtype = SOLUM_M3_BWR_60;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[platformio]
|
||||
core_dir = $PROJECT_DIR/core
|
||||
core_dir = D:/Documents/GitHub/OpenEPaperLink/ARM_Tag_FW/Newton_M3_nRF52811/core
|
||||
|
||||
[env]
|
||||
platform = nordicnrf52@9.6.0
|
||||
|
||||
220
ARM_Tag_FW/Newton_M3_nRF52811/src/epd_driver/dualssd.cpp
Normal file
220
ARM_Tag_FW/Newton_M3_nRF52811/src/epd_driver/dualssd.cpp
Normal file
@@ -0,0 +1,220 @@
|
||||
#include <Arduino.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "lut.h"
|
||||
#include "settings.h"
|
||||
#include "hal.h"
|
||||
#include "wdt.h"
|
||||
|
||||
#include "drawing.h"
|
||||
#include "dualssd.h"
|
||||
|
||||
#define CMD_DRV_OUTPUT_CTRL 0x01
|
||||
#define CMD_SOFT_START_CTRL 0x0C
|
||||
#define CMD_ENTER_SLEEP 0x10
|
||||
#define CMD_DATA_ENTRY_MODE 0x11
|
||||
#define CMD_SOFT_RESET 0x12
|
||||
#define CMD_SOFT_RESET2 0x13
|
||||
#define CMD_SETUP_VOLT_DETECT 0x15
|
||||
#define CMD_TEMP_SENSOR_CONTROL 0x18
|
||||
#define CMD_ACTIVATION 0x20
|
||||
#define CMD_DISP_UPDATE_CTRL 0x21
|
||||
#define CMD_DISP_UPDATE_CTRL2 0x22
|
||||
#define CMD_WRITE_FB_BW 0x24
|
||||
#define CMD_WRITE_FB_RED 0x26
|
||||
#define CMD_VCOM_GLITCH_CTRL 0x2B
|
||||
#define CMD_LOAD_OTP_LUT 0x31
|
||||
#define CMD_WRITE_LUT 0x32
|
||||
#define CMD_BORDER_WAVEFORM_CTRL 0x3C
|
||||
#define CMD_WINDOW_X_SIZE 0x44
|
||||
#define CMD_WINDOW_Y_SIZE 0x45
|
||||
#define CMD_WRITE_PATTERN_RED 0x46
|
||||
#define CMD_WRITE_PATTERN_BW 0x47
|
||||
#define CMD_XSTART_POS 0x4E
|
||||
#define CMD_YSTART_POS 0x4F
|
||||
#define CMD_ANALOG_BLK_CTRL 0x74
|
||||
#define CMD_DIGITAL_BLK_CTRL 0x7E
|
||||
|
||||
#define SCREEN_CMD_CLOCK_ON 0x80
|
||||
#define SCREEN_CMD_CLOCK_OFF 0x01
|
||||
#define SCREEN_CMD_ANALOG_ON 0x40
|
||||
#define SCREEN_CMD_ANALOG_OFF 0x02
|
||||
#define SCREEN_CMD_LATCH_TEMPERATURE_VAL 0x20
|
||||
#define SCREEN_CMD_LOAD_LUT 0x10
|
||||
#define SCREEN_CMD_USE_MODE_2 0x08 // modified commands 0x10 and 0x04
|
||||
#define SCREEN_CMD_REFRESH 0xC7
|
||||
|
||||
void dualssd::selectLUT(uint8_t lut) {
|
||||
// implement alternative LUTs here. Currently just reset the watchdog to two minutes,
|
||||
// to ensure it doesn't reset during the much longer bootup procedure
|
||||
lut += 1; // make the compiler a happy camper
|
||||
wdt120s();
|
||||
return;
|
||||
}
|
||||
|
||||
void dualssd::epdEnterSleep() {
|
||||
epdWrite(CMD_ENTER_SLEEP, 1, 0x01);
|
||||
}
|
||||
void dualssd::epdSetup() {
|
||||
|
||||
printf("init epd...\n");
|
||||
epdReset();
|
||||
epdWrite(CMD_SOFT_RESET, 0);
|
||||
delay(10);
|
||||
switch (this->controllerType) {
|
||||
case 0x0F:
|
||||
case 0x12:
|
||||
case 0x15:
|
||||
/* 5.85 INIT SEQUENCE
|
||||
0x11, 0x00
|
||||
0x91, 0x01
|
||||
0x44, 0x31, 0x00
|
||||
0x45, 0x0F, 0x01, 0x00, 0x00
|
||||
0x4E, 0x31
|
||||
0x4F, 0x0F, 0x01
|
||||
0xC4, 0x00, 0x31
|
||||
0xC5, 0x0F, 0x01, 0x00, 0x00
|
||||
0xCE, 0x00
|
||||
0xCF, 0x0F, 0x01, 0x3C, 0x01
|
||||
|
||||
*/
|
||||
/* 5.85 BW INIT SEQUENCE
|
||||
0x11, 0x00
|
||||
0x91, 0x01
|
||||
0x44, 0x31, 0x00
|
||||
0x45, 0x0F, 0x01, 0x00, 0x00
|
||||
0x4E, 0x31
|
||||
0x4F, 0x0F, 0x01
|
||||
0xC4, 0x00, 0x31
|
||||
0xC5, 0x0F, 0x01, 0x00, 0x00
|
||||
0xCE, 0x00
|
||||
0xCF, 0x0F, 0x01, 0x3C, 0x01
|
||||
|
||||
*/
|
||||
|
||||
|
||||
epdWrite(0x11, 1, 0x00);
|
||||
epdWrite(0x91, 1, 0x01);
|
||||
if(tag.hasThirdColor){
|
||||
epdWrite(0x21, 2, 0x08, 0x10);
|
||||
}else{
|
||||
epdWrite(0x21, 2, 0x48, 0x10);
|
||||
}
|
||||
//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(0x44, 2, 0x31, 0x00);
|
||||
epdWrite(0x45, 4, 0x0F, 0x01, 0x00, 0x00);
|
||||
//epdWrite(0x4E, 2, this->XOffset / 8, ((this->XOffset + this->effectiveXRes) / 8) - 1);
|
||||
//epdWrite(0x4F, 4, (this->YOffset + this->effectiveYRes) & 0xFF, (this->YOffset + this->effectiveYRes) >> 8, this->YOffset & 0xFF, this->YOffset >> 8);
|
||||
epdWrite(0x4E, 1, 0x31);
|
||||
epdWrite(0x4F, 2, 0x0F, 0x01);
|
||||
epdWrite(0xC4, 2, 0x00, 0x31);
|
||||
epdWrite(0xC5, 4, 0x0F, 0x01, 0x00, 0x00);
|
||||
epdWrite(0xCE, 1, 0x00);
|
||||
epdWrite(0xCF, 4, 0x0F, 0x01, 0x3C, 0x01);
|
||||
epdWrite(0x3C, 1, 0x01);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void dualssd::epdWriteDisplayData() {
|
||||
|
||||
uint8_t *buf[2] = {0, 0}; // this will hold pointers to odd/even data lines
|
||||
// Those dual SSD controller (SSD1683??) behave as 2 400pxx wide screens, that needs independent data transfers.
|
||||
uint8_t c_increment = 1;
|
||||
if(!tag.hasThirdColor){
|
||||
c_increment = 2;
|
||||
}
|
||||
for (uint8_t c = 0; c < 4; c = c + c_increment) {
|
||||
delay(10);
|
||||
if (c == 0) epd_cmd(0x24);//BW
|
||||
if (c == 1) epd_cmd(0x26);//RED
|
||||
if (c == 2) epd_cmd(0xA4);//BW
|
||||
if (c == 3) epd_cmd(0xA6);//RED
|
||||
|
||||
delay(10);
|
||||
markData();
|
||||
epdSelect();
|
||||
|
||||
for (uint16_t curY = 0; curY < epd->effectiveYRes; curY += 2) {
|
||||
// Get 'even' screen line
|
||||
buf[0] = (uint8_t *)calloc(epd->effectiveXRes / 8, 1);
|
||||
|
||||
if (epd->epdMirrorV) {
|
||||
drawItem::renderDrawLine(buf[0], (epd->effectiveYRes - 1) - curY, c%2);
|
||||
} else {
|
||||
drawItem::renderDrawLine(buf[0], curY, c%2);
|
||||
}
|
||||
|
||||
if (epd->epdMirrorH) drawItem::reverseBytes(buf[0], epd->effectiveXRes / 8);
|
||||
// on the first pass, the second (buf[1]) buffer is unused, so we don't have to wait for it to flush to the display / free it
|
||||
if (buf[1]) {
|
||||
// wait for 'odd' display line to finish writing to the screen
|
||||
epdSPIWait();
|
||||
free(buf[1]);
|
||||
}
|
||||
|
||||
// start transfer of even data line to the screen
|
||||
if(c<2){
|
||||
epdSPIAsyncWrite(buf[0] + (epd->effectiveXRes / 16), (epd->effectiveXRes / 16)+1);
|
||||
}else{
|
||||
epdSPIAsyncWrite(buf[0], (epd->effectiveXRes / 16)+1);
|
||||
}
|
||||
|
||||
// Get 'odd' screen display line
|
||||
buf[1] = (uint8_t *)calloc(epd->effectiveXRes / 8, 1);
|
||||
|
||||
if (epd->epdMirrorV) {
|
||||
drawItem::renderDrawLine(buf[1], (epd->effectiveYRes - 1) - (curY + 1), c%2);
|
||||
} else {
|
||||
drawItem::renderDrawLine(buf[1], curY + 1, c%2);
|
||||
}
|
||||
if (epd->epdMirrorH) drawItem::reverseBytes(buf[1], epd->effectiveXRes / 8);
|
||||
|
||||
// wait until the 'even' data has finished writing
|
||||
epdSPIWait();
|
||||
free(buf[0]);
|
||||
|
||||
// start transfer of the 'odd' data line
|
||||
if(c<2){
|
||||
epdSPIAsyncWrite(buf[1]+(epd->effectiveXRes / 16), (epd->effectiveXRes / 16)+1);
|
||||
}else{
|
||||
|
||||
epdSPIAsyncWrite(buf[1], (epd->effectiveXRes / 16)+1);
|
||||
}
|
||||
}
|
||||
// check if this was the first pass. If it was, we'll need to wait until the last display line finished writing
|
||||
if (c == 0 || c==2) {
|
||||
epdSPIWait();
|
||||
epdDeselect();
|
||||
free(buf[1]);
|
||||
buf[1] = nullptr;
|
||||
}
|
||||
}
|
||||
// flush the draw list, make sure items don't appear on subsequent screens
|
||||
drawItem::flushDrawItems();
|
||||
|
||||
// wait until the last line of display has finished writing and clean our stuff up
|
||||
epdSPIWait();
|
||||
epdDeselect();
|
||||
if (buf[1]) free(buf[1]);
|
||||
}
|
||||
|
||||
|
||||
void dualssd::draw() {
|
||||
drawNoWait();
|
||||
getVoltage();
|
||||
epdBusyWaitFalling(120000);
|
||||
}
|
||||
void dualssd::drawNoWait() {
|
||||
epdWriteDisplayData();
|
||||
//epdWrite(CMD_DISP_UPDATE_CTRL2, 1, 0xF7);
|
||||
epdWrite(CMD_ACTIVATION, 0);
|
||||
}
|
||||
void dualssd::epdWaitRdy() {
|
||||
epdBusyWaitFalling(120000);
|
||||
}
|
||||
23
ARM_Tag_FW/Newton_M3_nRF52811/src/epd_driver/dualssd.h
Normal file
23
ARM_Tag_FW/Newton_M3_nRF52811/src/epd_driver/dualssd.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _EPD_DUALSSD_H_
|
||||
#define _EPD_DUALSSD_H_
|
||||
|
||||
class dualssd : public epdInterface {
|
||||
public:
|
||||
void epdSetup();
|
||||
void epdEnterSleep();
|
||||
void draw();
|
||||
void drawNoWait();
|
||||
void epdWaitRdy();
|
||||
void epdWriteDisplayData();
|
||||
void selectLUT(uint8_t lut);
|
||||
|
||||
protected:
|
||||
void commandReadBegin(uint8_t cmd);
|
||||
void commandReadEnd();
|
||||
uint8_t epdReadByte();
|
||||
void setWindowX(uint16_t start, uint16_t end);
|
||||
void setWindowY(uint16_t start, uint16_t end);
|
||||
void setPosXY(uint16_t x, uint16_t y);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,6 +21,7 @@ void selectLUT(uint8_t lut);
|
||||
|
||||
#include "uc_variant_043.h"
|
||||
#include "unissd.h"
|
||||
#include "dualssd.h"
|
||||
#include "uc_variant_029.h"
|
||||
#include "uc8159.h"
|
||||
#include "uc8179.h"
|
||||
|
||||
@@ -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,12 +26,19 @@ bool lowBatteryShown = false;
|
||||
bool noAPShown = false;
|
||||
|
||||
void addOverlay() {
|
||||
|
||||
if (currentChannel == 0) {
|
||||
drawMask(epd->Xres - 27, 5, 22, 22, COLOR_BLACK);
|
||||
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);
|
||||
drawMask(epd->Xres - 28, 4, 24, 24, COLOR_BLACK);
|
||||
if(tag.hasThirdColor){
|
||||
drawMask(epd->Xres - 28, 4, 24, 24, 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{
|
||||
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;
|
||||
@@ -39,8 +46,13 @@ void addOverlay() {
|
||||
|
||||
if (lowBattery) {
|
||||
drawMask(epd->Xres - 27, epd->Yres - 26, 22, 22, COLOR_BLACK);
|
||||
drawMask(epd->Xres - 27, epd->Yres - 26, 22, 22, COLOR_RED);
|
||||
drawRoundedRectangle(epd->Xres - 28, epd->Yres - 26, 24, 24, COLOR_RED);
|
||||
if(tag.hasThirdColor){
|
||||
drawMask(epd->Xres - 27, epd->Yres - 26, 22, 22, COLOR_RED);
|
||||
drawRoundedRectangle(epd->Xres - 28, epd->Yres - 26, 24, 24, COLOR_RED);
|
||||
}else{
|
||||
drawMask(epd->Xres - 27, epd->Yres - 26, 22, 22, COLOR_BLACK);
|
||||
drawRoundedRectangle(epd->Xres - 28, epd->Yres - 26, 24, 24, COLOR_BLACK);
|
||||
}
|
||||
addBufferedImage(epd->Xres - 24, epd->Yres - 19, COLOR_BLACK, rotation::ROTATE_0, battery, DRAW_NORMAL);
|
||||
lowBatteryShown = true;
|
||||
} else {
|
||||
@@ -48,10 +60,16 @@ void addOverlay() {
|
||||
}
|
||||
#ifdef DEBUG_BUILD
|
||||
fontrender fr(&FreeSansBold18pt7b);
|
||||
drawMask(15, epd->Yres - 53, 129, 33, COLOR_BLACK);
|
||||
drawMask(15, epd->Yres - 53, 129, 33, COLOR_RED);
|
||||
drawRoundedRectangle(15, epd->Yres - 53, 129, 33, COLOR_RED);
|
||||
fr.epdPrintf(17, epd->Yres - 50, COLOR_RED, rotation::ROTATE_0, "DEBUG");
|
||||
drawMask(15, epd->Yres - 53, 130, 33, COLOR_BLACK);
|
||||
if(tag.hasThirdColor){
|
||||
drawMask(15, epd->Yres - 53, 140, 35, COLOR_RED);
|
||||
drawRoundedRectangle(15, epd->Yres - 53, 129, 33, COLOR_RED);
|
||||
fr.epdPrintf(17, epd->Yres - 50, COLOR_RED, rotation::ROTATE_0, "DEBUG");
|
||||
}else{
|
||||
drawMask(15, epd->Yres - 53, 130, 33, COLOR_BLACK);
|
||||
drawRoundedRectangle(15, epd->Yres - 53, 129, 33, COLOR_BLACK);
|
||||
fr.epdPrintf(17, epd->Yres - 50, COLOR_BLACK, rotation::ROTATE_0, "DEBUG");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -67,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);
|
||||
@@ -81,6 +99,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_026:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(2, 2, COLOR_BLACK, rotation::ROTATE_0, "OpenEPaperLink");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(10, 38, COLOR_RED, rotation::ROTATE_0, "Newton M3 2.6\"");
|
||||
// fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(5, epd->Yres - 40, 0, rotation::ROTATE_0, "FW: %04X-%s", fwVersion, fwVersionSuffix);
|
||||
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:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(2, 2, COLOR_BLACK, rotation::ROTATE_0, "OpenEPaperLink");
|
||||
@@ -91,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");
|
||||
@@ -111,6 +149,26 @@ void showSplashScreen() {
|
||||
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 - 120, 32, 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_058:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(2, 2, COLOR_BLACK, rotation::ROTATE_0, "OpenEPaperLink");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(10, 38, COLOR_RED, rotation::ROTATE_0, "Newton M3 5.85\"");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(epd->Xres - 17, 0, 0, rotation::ROTATE_270, "FW: %04X-%s", fwVersion, fwVersionSuffix);
|
||||
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_058_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 5.85\" 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_060:
|
||||
fr.setFont(&FreeSansBold24pt7b);
|
||||
fr.epdPrintf(10, 10, COLOR_BLACK, rotation::ROTATE_0, "OpenEPaperLink");
|
||||
@@ -147,10 +205,17 @@ void showSplashScreen() {
|
||||
}
|
||||
#ifdef DEBUGBLOCKS
|
||||
drawMask(15, epd->Yres - 53, 129, 33, COLOR_BLACK);
|
||||
drawMask(15, epd->Yres - 53, 129, 33, COLOR_RED);
|
||||
drawRoundedRectangle(15, epd->Yres - 53, 129, 33, COLOR_RED);
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(17, epd->Yres - 50, COLOR_RED, rotation::ROTATE_0, "DEBUG");
|
||||
if(tag.hasThirdColor){
|
||||
drawMask(15, epd->Yres - 53, 129, 33, COLOR_RED);
|
||||
drawRoundedRectangle(15, epd->Yres - 53, 129, 33, COLOR_RED);
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(17, epd->Yres - 50, COLOR_RED, rotation::ROTATE_0, "DEBUG");
|
||||
}else{
|
||||
drawMask(15, epd->Yres - 53, 129, 33, COLOR_BLACK);
|
||||
drawRoundedRectangle(15, epd->Yres - 53, 129, 33, COLOR_BLACK);
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(17, epd->Yres - 50, COLOR_BLACK, rotation::ROTATE_0, "DEBUG");
|
||||
}
|
||||
#endif
|
||||
draw();
|
||||
}
|
||||
@@ -198,6 +263,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_026:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "AP Found");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(10, 53, COLOR_RED, 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_RED, rotation::ROTATE_0, "RSSI: %ddBm LQI: %d", mLastRSSI, mLastLqi);
|
||||
fr.epdPrintf(10, 89, COLOR_RED, 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_029:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "AP Found");
|
||||
@@ -210,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");
|
||||
@@ -235,6 +324,30 @@ 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_058:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "AP Found");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
fr.epdPrintf(10, 53, COLOR_RED, 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_RED, rotation::ROTATE_0, "RSSI: %ddBm LQI: %d", mLastRSSI, mLastLqi);
|
||||
fr.epdPrintf(10, 89, COLOR_RED, 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 - 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_058_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, COLOR_BLACK, rotation::ROTATE_0, "Battery: %d.%dV Temp: %d'C", batteryVoltage / 1000, batteryVoltage % 1000, temperature);
|
||||
fr.epdPrintf(10, epd->Yres - 25, 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_060:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "AP Found - Waiting for data");
|
||||
@@ -296,6 +409,16 @@ 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_026:
|
||||
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 scanning");
|
||||
fr.epdPrintf(10, 129, COLOR_BLACK, rotation::ROTATE_0, "the NFC-wake area with your phone");
|
||||
break;
|
||||
case STYPE_SIZE_029:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "No AP Found");
|
||||
@@ -305,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");
|
||||
@@ -328,6 +460,26 @@ void showNoAP() {
|
||||
fr.epdPrintf(152, 89, COLOR_BLACK, rotation::ROTATE_0, "can force a retry now by scanning");
|
||||
fr.epdPrintf(152, 109, COLOR_BLACK, rotation::ROTATE_0, "the NFC-wake area with your phone");
|
||||
break;
|
||||
case STYPE_SIZE_058:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "No AP Found");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
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]);
|
||||
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(152, 109, COLOR_BLACK, rotation::ROTATE_0, "can force a retry now by scanning");
|
||||
fr.epdPrintf(152, 129, COLOR_BLACK, rotation::ROTATE_0, "the NFC-wake area with your phone");
|
||||
break;
|
||||
case STYPE_SIZE_058_FREEZER:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "No AP Found");
|
||||
fr.setFont(&FreeSans9pt7b);
|
||||
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]);
|
||||
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(152, 109, COLOR_BLACK, rotation::ROTATE_0, "can force a retry now by scanning");
|
||||
fr.epdPrintf(152, 129, COLOR_BLACK, rotation::ROTATE_0, "the NFC-wake area with your phone");
|
||||
break;
|
||||
case STYPE_SIZE_060:
|
||||
fr.setFont(&FreeSansBold18pt7b);
|
||||
fr.epdPrintf(7, 7, COLOR_BLACK, rotation::ROTATE_0, "No AP Found U_U");
|
||||
@@ -357,7 +509,8 @@ void showNoAP() {
|
||||
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, 39, COLOR_BLACK, rotation::ROTATE_0, "Couldn't find an AP :(");
|
||||
fr.epdPrintf(10, 58, COLOR_BLACK, rotation::ROTATE_0, "I'll try again in a little while, but you");
|
||||
fr.epdPrintf(10, 77, COLOR_BLACK, rotation::ROTATE_0, "can force a retry now by pressing a button");
|
||||
fr.epdPrintf(10, 77, COLOR_BLACK, rotation::ROTATE_0, "can force a retry now by scanning");
|
||||
fr.epdPrintf(10, 98, COLOR_BLACK, rotation::ROTATE_0, "the NFC-wake area with your phone");
|
||||
addFlashImage(200, 128, COLOR_BLACK, rotation::ROTATE_0, pandablack);
|
||||
addFlashImage(312, 274, COLOR_RED, rotation::ROTATE_0, pandared);
|
||||
break;
|
||||
|
||||
@@ -291,17 +291,19 @@ void drawImageAtAddress(uint32_t addr, uint8_t lut) {
|
||||
void drawRoundedRectangle(uint16_t xpos, uint16_t ypos, uint16_t width, uint16_t height, bool color) {
|
||||
uint16_t widthBytes = width / 8;
|
||||
if (width % 8) widthBytes++;
|
||||
uint32_t framebufferSize = (widthBytes + 1) * height;
|
||||
uint32_t framebufferSize = widthBytes * height;
|
||||
uint8_t *framebuffer = (uint8_t *)calloc(framebufferSize + 4, 1);
|
||||
if (framebuffer == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
((uint16_t *)framebuffer)[0] = width + 1;
|
||||
uint8_t frameBufferZerosize = width;
|
||||
if((width % 8) != 0){
|
||||
frameBufferZerosize++;
|
||||
}
|
||||
((uint16_t *)framebuffer)[0] = frameBufferZerosize;
|
||||
((uint16_t *)framebuffer)[1] = height;
|
||||
|
||||
framebuffer += 4;
|
||||
|
||||
uint16_t w = width - 1;
|
||||
uint16_t x = 1;
|
||||
while (w--) {
|
||||
|
||||
@@ -38,8 +38,11 @@
|
||||
#define SOLUM_M3_BWY_26 0x3A
|
||||
#define SOLUM_M3_BWR_29 0x33 // the 'standard' SSD1619 version
|
||||
#define SOLUM_M3_BWY_29 0x3B
|
||||
#define SOLUM_M3_BW_29 0x40
|
||||
#define SOLUM_M3_BWR_42 0x34
|
||||
#define SOLUM_M3_BWY_42 0x3C
|
||||
#define SOLUM_M3_BWR_58 0x41
|
||||
#define SOLUM_M3_BW_58 0x42
|
||||
#define SOLUM_M3_BWR_60 0x35
|
||||
#define SOLUM_M3_BWY_60 0x3D
|
||||
#define SOLUM_M3_BWR_75 0x36
|
||||
@@ -47,6 +50,7 @@
|
||||
#define SOLUM_M3_BWR_116 0x37
|
||||
#define SOLUM_M3_BWY_116 0x3F
|
||||
|
||||
|
||||
// M3 Tags overflow
|
||||
#define SOLUM_M3_BW_29 0x40
|
||||
#define SOLUM_M3_BWR_58 0x41
|
||||
@@ -75,9 +79,13 @@
|
||||
// Solum types - customer data byte 16 in M3 (nRF) UICR
|
||||
#define STYPE_SIZE_016 0x40
|
||||
#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
|
||||
#define STYPE_SIZE_058_FREEZER 0x24
|
||||
#define STYPE_SIZE_060 0x48
|
||||
#define STYPE_SIZE_075 0x4C
|
||||
#define STYPE_SIZE_097 0x64
|
||||
|
||||
Reference in New Issue
Block a user