updated driver files for 7.8", 9.7" and 10.3" parallel epaper displays
This commit is contained in:
		
							
								
								
									
										48
									
								
								inkycal/display/drivers/10_in_3.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								inkycal/display/drivers/10_in_3.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | ||||
| #!python3 | ||||
| """ | ||||
| 10.3" driver class | ||||
| Copyright by aceisace | ||||
| """ | ||||
| from subprocess import run | ||||
| from inkycal.custom import image_folder, top_level | ||||
| from os.path import exists | ||||
| from PIL import Image | ||||
|  | ||||
| # Display resolution | ||||
| EPD_WIDTH = 1872 | ||||
| EPD_HEIGHT = 1404 | ||||
|  | ||||
| # Please insert VCOM of your display. The Minus sign before is not required | ||||
| VCOM = "2.0" | ||||
|  | ||||
| driver_dir = top_level + '/inkycal/display/drivers/parallel_drivers/' | ||||
|  | ||||
| command = f'sudo {driver_dir}epd -{VCOM} 0 {image_folder + "canvas.bmp"}' | ||||
|  | ||||
| class EPD: | ||||
|  | ||||
|     def __init__(self): | ||||
|         """10.3" epaper class""" | ||||
|         pass | ||||
|  | ||||
|     def init(self): | ||||
|         pass | ||||
|  | ||||
|     def display(self, command): | ||||
|         """displays an image""" | ||||
|         try: | ||||
|             run_command = command.split() | ||||
|             run(run_command) | ||||
|         except: | ||||
|             print("oops, something didn't work right :/") | ||||
|  | ||||
|     def getbuffer(self, image): | ||||
|         """ad-hoc""" | ||||
|         image = image.rotate(90, expand=True) | ||||
|         image.convert('RGB').save(image_folder + 'canvas.bmp', 'BMP') | ||||
|         command = f'sudo {driver_dir}epd -{VCOM} 0 {image_folder + "canvas.bmp"}' | ||||
|         print(command) | ||||
|         return command | ||||
|  | ||||
|     def sleep(self): | ||||
|         pass | ||||
		Reference in New Issue
	
	Block a user