浏览代码

Merge pull request #312 from wizmo2/st7789-mod

Allow offset on ST7789
philippe44 1 年之前
父节点
当前提交
8df6b853e6
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      components/display/ST77xx.c

+ 2 - 4
components/display/ST77xx.c

@@ -289,10 +289,8 @@ struct GDS_Device* ST77xx_Detect(char *Driver, struct GDS_Device* Device) {
 	struct PrivateSpace* Private = (struct PrivateSpace*) Device->Private;
 	Private->Model = Model;
 
-	if (Model == ST7735) {
-		sscanf(Driver, "%*[^:]%*[^x]%*[^=]=%hu", &Private->Offset.Height);		
-		sscanf(Driver, "%*[^:]%*[^y]%*[^=]=%hu", &Private->Offset.Width);		
-	}
+	sscanf(Driver, "%*[^:]%*[^x]%*[^=]=%hu", &Private->Offset.Height);		
+	sscanf(Driver, "%*[^:]%*[^y]%*[^=]=%hu", &Private->Offset.Width);		
 	
 	if (Depth == 18) {
 		Device->Mode = GDS_RGB666;