Example #1
0
 def step3(self, job):
     forward_job = Job(
         self.factory.stepper['forward'],
         steps=self.forward_steps,
         direction=Stepper.ANTICLOCKWISE,
         callback=self.callback)
     forward_job.start()
Example #2
0
 def step2(self, job):
     down_job = Job(
         self.factory.stepper['down'],
         steps = Stepper.FULLCIRCLE / self.quantity_delay,
         direction=Stepper.ANTICLOCKWISE,
         delay=self.quantity_delay)
     rotate_job = Job(self.factory.stepper['rotate'], callback=self.step3)
     down_job.start()
     rotate_job.start()
Example #3
0
    def run(self):
        logging.info('starting chocolate job')
        rotate_job = Job(
            self.factory.stepper['rotate'],
            steps=Stepper.FULLCIRCLE * self.rounds,
            callback=self.callback)
        forward_job = Job(
            self.factory.stepper['forward'],
            delay=self.forward_delay,
            steps=(Stepper.FULLCIRCLE * self.rounds) / self.forward_delay)
        down_job = Job(
            self.factory.stepper['down'],
            delay=ChocolateFactory.DOWN_DELAY,
            direction=Stepper.ANTICLOCKWISE,
            steps=(Stepper.FULLCIRCLE * self.rounds) / ChocolateFactory.DOWN_DELAY)

        rotate_job.start()
        forward_job.start()
        down_job.start()
Example #4
0
 def step1(self):
     forward_job = Job(
         self.factory.stepper['forward'],
         steps=self.forward_steps,
         callback=self.step2)
     forward_job.start()