Exemplo n.º 1
0
 def test_setcalibration_saves_calibration(self):
     targetCal = [{
         'x': 150,
         'y': 150
     }, {
         'x': 450,
         'y': 150
     }, {
         'x': 400,
         'y': 300
     }, {
         'x': 200,
         'y': 300
     }]
     servoCal = [{
         'x': 10,
         'y': 10
     }, {
         'x': 50,
         'y': 10
     }, {
         'x': 50,
         'y': 50
     }, {
         'x': 10,
         'y': 50
     }]
     self.model.setCalibration(targetCal, servoCal)
     self.model = LaserModel(self.servos, 150, 650, 400)
     tc, sc = self.model.getCalibration()
     self.assertEqual(tc, targetCal)
     self.assertEqual(sc, servoCal)
Exemplo n.º 2
0
 def setUp(self):
     self.servos = TestServos()
     self.model = LaserModel(self.servos, 150, 650, 400)