解决了因为汉字在两个数据块直接导致的数据流乱码,

下个版本打算两字节两个字节的读取,这样就就不怕数据块中
换行太多导致显示不下。

Signed-off-by: 无闻风 <53944749+wuwenfengmi1998@users.noreply.github.com>
This commit is contained in:
无闻风
2021-03-13 17:10:37 +08:00
parent 1dee44ab7c
commit 82980c4cdc
50 changed files with 12650 additions and 11067 deletions
+11 -5
View File
@@ -361,6 +361,10 @@ void LCD_ShowString(uint16_t x,uint16_t y,uint8_t *p,uint8_t size,uint16_t bg,ui
if(*p=='\r')
{
p++;
if(*p!='\n')
{
return ;
}
}
if(*p=='\n')
{
@@ -368,15 +372,17 @@ void LCD_ShowString(uint16_t x,uint16_t y,uint8_t *p,uint8_t size,uint16_t bg,ui
y+=size;
p++;
}
if(*p<127)
{
LCD_ShowChar(x,y,*p,size,bg,color);
x+=(size/2);
}else
if(*p>127)
{
Show_Font(x,y,p,size,bg,color);
p++;
x+=size;
}else
{
LCD_ShowChar(x,y,*p,size,bg,color);
x+=(size/2);
}
p++;