Esempio n. 1
0
 def servodriver(self, ssctime, leg, turret, gun, serial):
 
     cmd = ''
 
     # leg Servos
     for legIndex in xrange(4):
         cmd = cmd + leg[legIndex].moveleg(leg[legIndex].coxaangle, leg[legIndex].tibiaangle, leg[legIndex].femurangle)
 
     # turret Servos
     cmd = cmd + turret.moveturret(turret.panangle, turret.tiltangle)
 
     # gun
     cmd = cmd + gun.command()
 
     #print cmd
 
     # Send the servo commands
     serial.sendcommand(cmd + 'T' + str(ssctime))
Esempio n. 2
0
 def sit(self, ssctime, leg, turret, gun, serial):
 
     cmd = ''
 
     # leg Servos
     cmd = cmd + leg[0].moveleg(45, 15, 0)
     cmd = cmd + leg[1].moveleg(45, 15, 0)
     cmd = cmd + leg[2].moveleg(-45, 15, 0)
     cmd = cmd + leg[3].moveleg(-45, 15, 0)
 
     # turret Servos
     cmd = cmd + turret.moveturret(0, 0)
 
     # gun
     gun.stop()
     cmd = cmd + gun.command()
 
     #print cmd
 
     # Send the servo commands
     serial.sendcommand(cmd + 'T' + str(ssctime))