Work in progress for release v1.7/1.8

This is a refactoring of the entire Inky-Calendar software and is work in progress. The reason for uploading is to test if everything works fine. Please do not attempt to use/install this software as it can potentially break your system. If you have any improvement ideas, you're most welcome to mention them in the Issues section. Thanks!
This commit is contained in:
Ace
2019-10-21 07:54:19 +02:00
committed by GitHub
parent 93426b3dea
commit e3a4997fdb
28 changed files with 1118 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Calibration module for the Black-White and Black-White-Red E-Paper display
Calibration refers to flushing all pixels in a single colour to prevent
ghosting.
"""
from __future__ import print_function
import time
from settings import display_colours
from image_data import black, white, red
def calibration():
"""Function for Calibration"""
import e_paper_drivers
epd = e_paper_drivers.EPD()
print('_________Calibration for E-Paper started_________'+'\n')
for i in range(2):
epd.init()
print('Calibrating black...')
epd.display_frame(epd.get_frame_buffer(black))
if display_colours == "bwr":
print('calibrating red...')
epd.display_frame(epd.get_frame_buffer(red))
print('Calibrating white...')
epd.display_frame(epd.get_frame_buffer(white))
epd.sleep()
print('Cycle', str(i+1)+'/2', 'complete'+'\n')
print('Calibration complete')
def main():
"""Added timer"""
start = time.time()
calibration()
end = time.time()
print('Calibration complete in', int(end - start), 'seconds')
if __name__ == '__main__':
main()