Merge pull request #4 from HalfSweetStudio/test

随缘更新
This commit is contained in:
HalfSweet
2022-02-13 23:35:40 +08:00
committed by GitHub
3 changed files with 112 additions and 16 deletions

View File

@@ -182,8 +182,8 @@ void EPaperDrive::DrawEmptyBox(int x, int y, int w, int h)
{
DrawXline(y, y + w, x);
DrawXline(y, y + w, x + h);
DrawYline(x, x + w, y);
DrawYline(x, x + w, y + w);
DrawYline(x, x + h, y);
DrawYline(x, x + h, y + w);
}
void EPaperDrive::DrawChart(int x, int y, int w, int c1, int c2, int c3, int c4, int c5, int c6)
@@ -2086,8 +2086,8 @@ void EPaperDrive::EPD_init_Full(void)
// Serial.printf("即将写入全刷波形 \n");
EPD_Write((uint8_t *)LUTDefault_full_GDEY042Z98, sizeof(LUTDefault_full_GDEY042Z98));
EPD_WriteCMD(0x3F);
EPD_WriteData(*(LUTDefault_full_GDEY042Z98 + 227 + 1));
//EPD_WriteCMD(0x3F);
//EPD_WriteData(*(LUTDefault_full_GDEY042Z98 + 227 + 1));
EPD_WriteCMD(0x03); //门电压 gate voltage
EPD_WriteData(*(LUTDefault_full_GDEY042Z98 + 228 + 1));
@@ -2452,6 +2452,10 @@ void EPaperDrive::EPD_Dis_Full(uint8_t *DisBuffer, uint8_t Label)
else if (EPD_Type == WF29 || EPD_Type == WF58 || EPD_Type == WF29BZ03 || EPD_Type == C154 || EPD_Type == WF42 || EPD_Type == WFT0290CZ10)
{
if(EPD_Type == WFT0290CZ10)
{
EPD_WriteDispRam_Old(xDot / 8, yDot, (uint8_t *)DisBuffer, 0, 0xff);
}
if (Label == 2)
{
EPD_WriteDispRam(xDot / 8, yDot, (uint8_t *)DisBuffer, 0, 0xff); // white

View File

@@ -463,6 +463,11 @@ public:
*/
void EPD_Write(uint8_t *value, uint8_t datalen);
void EPD_WriteDispRam_Old(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
void EPD_WriteDispRam(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
void EPD_SetRamPointer(uint16_t addrX, uint8_t addrY, uint8_t addrY1);
private:
uint8_t _CS;
uint8_t _RST;
@@ -489,14 +494,13 @@ private:
void driver_delay_xms(unsigned long xms);
void EPD_WriteDispRam_RED(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
void EPD_WriteDispRam(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
// void EPD_SetRamArea(uint16_t Xstart,uint16_t Xend,uint8_t Ystart,uint8_t Ystart1,uint8_t Yend,uint8_t Yend1);
void EPD_SetRamPointer(uint16_t addrX, uint8_t addrY, uint8_t addrY1);
void EPD_WirteLUT(uint8_t *LUTvalue, uint8_t Size);
void EPD_Init(void);
void EPD_WriteCMD_p1(uint8_t command, uint8_t para);
void EPD_WriteDispRam_Old(unsigned int XSize, unsigned int YSize, uint8_t *Dispbuff, unsigned int offset, uint8_t label);
void EPD_SetRamArea(uint16_t Xstart, uint16_t Xend, uint8_t Ystart, uint8_t Ystart1, uint8_t Yend, uint8_t Yend1);
int getIcon(int weathercodeindex);

View File

@@ -814,8 +814,8 @@ const uint8_t lut_bb_part_WFT0290CZ10[]={
const uint8_t LUTDefault_full_GDEY042Z98[] = {
0x32,
//VCOM
0x01, 0x28, 0x28, 0x14, 0x3C, 0x01, 0x01,
0x01, 0x28, 0x28, 0x14, 0x3C, 0x01, 0x01,
0x01, 0x1E, 0x1E, 0x05, 0x3C, 0x02, 0x03,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -823,8 +823,8 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//RED
0x01, 0x28, 0x28, 0x94, 0xFC, 0x01, 0x01,
0x01, 0x28, 0x28, 0x94, 0xFC, 0x01, 0x01,
0x01, 0x5E, 0x9E, 0x85, 0xFC, 0x02, 0x03,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -832,8 +832,8 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//WHITE
0x01, 0x68, 0xA8, 0x14, 0x3C, 0x01, 0x01,
0x01, 0x68, 0xA8, 0x14, 0x3C, 0x01, 0x01,
0x01, 0x5E, 0x9E, 0x05, 0x3C, 0x02, 0x03,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -841,8 +841,8 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//BLACK
0x01, 0xA8, 0x68, 0x14, 0x3C, 0x01, 0x01,
0x01, 0xA8, 0x68, 0x14, 0x3C, 0x01, 0x01,
0x01, 0x9E, 0x5E, 0x05, 0x3C, 0x02, 0x03,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -850,7 +850,7 @@ const uint8_t LUTDefault_full_GDEY042Z98[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x22, 0x17, 0x41, 0xA8,
0x03, 0x00, 0x00, 0x22, 0x17, 0x41, 0xA8,
0x32, 0x48,
};
@@ -907,6 +907,94 @@ const uint8_t LUTDefault_part_GDEY042Z98[] = {
0x32, 0x08,
};
const uint8_t LUT_gray_GDEY042Z98[] = {
0x32,
//VCOM
0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//RED
0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//WHITE
0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//BLACK
0x01, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x22, 0x17, 0x4B, 0xA8,
0x32, 0x48,
};
const uint8_t LUT_gray_red_GDEY042Z98[] = {
0x32,
//VCOM
0x01, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//RED
0x01, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//WHITE
0x01, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//BLACK
0x01, 0xC9, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x22, 0x17, 0x4B, 0xA8,
0x32, 0x48,
};
static const uint8_t LUTDefault_full_HINKE0266A15A0[] = {
0x32, // command