def stop(opsoroapp): with Hardware.lock: Hardware.servo_disable() global circumplex_t if circumplex_t is not None: circumplex_t.stop()
def stop(opsoroapp): with Hardware.lock: Hardware.servo_disable() # Remove all overlay functions for dofname, dof in Expression.dofs.iteritems(): if overlay_fn in dof.overlays: dof.overlays.remove(overlay_fn)
def stop(opsoroapp): with Hardware.lock: Hardware.servo_disable() global socialscriptloop_t if socialscriptloop_t is not None: socialscriptloop_t.stop() if socialscript_t is not None: socialscript_t.stop()
def start(opsoroapp): # Turn servo power off, init servos, update expression with Hardware.lock: Hardware.servo_disable() Hardware.servo_init() Hardware.servo_neutral() with Expression.lock: Expression.set_emotion(valence=0.0, arousal=0.0) Expression.update() # Start update thread global circumplex_t circumplex_t = StoppableThread(target=CircumplexLoop) circumplex_t.start()
def start(opsoroapp): global dof_positions dof_positions = {} # Apply overlay function for servo in Expression.servos: if servo.pin < 0 or servo.pin > 15: continue # Skip invalid pins dof_positions[servo.dofname] = 0.0 if servo.dofname in Expression.dofs: Expression.dofs[servo.dofname].overlays.append(overlay_fn) # Turn servo power off, init servos, update expression with Hardware.lock: Hardware.servo_disable() Hardware.servo_init() Hardware.servo_neutral() with Expression.lock: Expression.update()
def start(opsoroapp): # Apply overlay function for servo in Expression.servos: if servo.pin < 0 or servo.pin > 15: continue # Skip invalid pins dof_positions[servo.dofname] = 0.0 # Turn servo power off, init servos, update expression with Hardware.lock: Hardware.servo_disable() Hardware.servo_init() Hardware.servo_neutral() with Expression.lock: Expression.set_emotion(valence=0.0, arousal=0.0) Expression.update() # Start update thread global socialscriptloop_t socialscriptloop_t = StoppableThread(target=SocialscriptLoop) socialscriptloop_t.start();
def servosdisable(): print_info("Servos disabled") with Hardware.lock: Hardware.servo_disable()
def s_servosdisable(conn, data): print_info("Servos disabled") with Hardware.lock: Hardware.servo_disable()