forked from martinr1000/AliensMotionTracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calibrationGraphics.py
30 lines (23 loc) · 1 KB
/
calibrationGraphics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import pygame, random, math, time, pygame.mixer
import time
import sys
from pygame.locals import *
from contacts import Contacts,Contact
from resources import resources
from compass import Compass
class CalibrationGraphics:
smallNumber = ""
def __init__(self, scope, resources, calibration):
self.scope = scope #Use a pyscope object so we can run the program from the console
self.resources = resources #get the resources class instance
self.calibration = calibration #get a calibration class instance
def initBackground(self):
background_colour = (0,0,0)
self.scope.screen.fill(background_colour)
def update(self, xy, calibration):
self.scope.screen.blit(self.resources.contactBack[3], (xy[0]-25,xy[1]-25))
self.scope.screen.blit(self.resources.contactFore[3], (xy[0]-25,xy[1]-25))
self.draw()
def draw(self):
#update the display and show our images
pygame.display.update()