Example #1
0
"""

#
# Code under the MIT license by Alexander Pruss
#

from drawing import Drawing
from math import pi, sin, cos
import time
import displayprovider
import configuration as conf

fdd = displayprovider.get_display(conf.WIDTH, conf.HEIGHT)
d = Drawing(fdd)
d.penwidth(1)


class Hand:
    def __init__(self, center, scale, length):
        self.center = center
        self.length = length
        self.scale = scale
        self.previousValue = None

    def update(self, value):
        if self.previousValue is not None and self.previousValue is not value:
            self.drawLine(self.previousValue, True)
        self.drawLine(value, False)
        self.previousValue = value