mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[mipi_spi] Fix dimensions (#10443)
This commit is contained in:
		| @@ -309,8 +309,12 @@ class DriverChip: | |||||||
|                 CONF_NATIVE_HEIGHT, height + offset_height * 2 |                 CONF_NATIVE_HEIGHT, height + offset_height * 2 | ||||||
|             ) |             ) | ||||||
|             offset_height = native_height - height - offset_height |             offset_height = native_height - height - offset_height | ||||||
|         # Swap default dimensions if swap_xy is set |         # Swap default dimensions if swap_xy is set, or if rotation is 90/270 and we are not using a buffer | ||||||
|         if transform[CONF_SWAP_XY] is True: |         rotated = not requires_buffer(config) and config.get(CONF_ROTATION, 0) in ( | ||||||
|  |             90, | ||||||
|  |             270, | ||||||
|  |         ) | ||||||
|  |         if transform[CONF_SWAP_XY] is True or rotated: | ||||||
|             width, height = height, width |             width, height = height, width | ||||||
|             offset_height, offset_width = offset_width, offset_height |             offset_height, offset_width = offset_width, offset_height | ||||||
|         return width, height, offset_width, offset_height |         return width, height, offset_width, offset_height | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user