Sets the pid gain to the specified motors.
196065
def set_pid_gain(self, pid_for_id, **kwargs):
        
        pid_for_id = dict(itertools.izip(pid_for_id.iterkeys(),
                                         [tuple(reversed(t)) for t in pid_for_id.values()]))
        self._set_pid_gain(pid_for_id, **kwargs)
780575
def _update_pwm(self):
        """"""
        if self._is_on:
            values = self._get_pwm_values()
        else:
            values = [0] * len(self._driver.pins)

        self._driver.set_pwm(values)
1065137
def _set_vibration_win(self, left_motor, right_motor, duration):
        """"""
        self._start_vibration_win(left_motor, right_motor)
        stop_process = Process(target=delay_and_stop,
                               args=(duration,
                                     self.manager.xinput_dll,
                                     self.__device_number))
        stop_process.start()
726583
def setup(self):
        
        self._init_vrep_streaming()

        # Init lifo for temperature spoofing
        for m in self.motors:
            m.__dict__['_load_fifo'] = deque(200 * [1], maxlen=200)

        self.update()
336634
protected function adjustRunningWorkers() : void
    {
        foreach ($this->poolsConfig as $pool => $workerConfig) {
            $workersActive = count($this->pids[$pool]);
            $workersTarget = (int)$workerConfig['instances'];
            if ($workersActive >= $workersTarget) {
                continue;
            }

            $workerDiff = $workersTarget - $workersActive;
            for ($i = 0; $i < $workerDiff; $i++) {
                $this->startupWorker($pool);
            }
        }
    }
849109
public function setControls()
	{
		$this->controls	= array();
		$args	= func_get_args();
		for( $i = 0; $i < $this->type; $i ++ )
			if( isset( $args[$i] ) )
				$this->controls[$i]	= $args[$i];
	}
1309808
def set_speed(self,speed):
	""""""
	self.speed=speed
	self.send_cmd("SPEED"+str(speed))
230830
def setSpeed(self, vehID, speed):
        
        self._connection._sendDoubleCmd(
            tc.CMD_SET_VEHICLE_VARIABLE, tc.VAR_SPEED, vehID, speed)
478289
protected void setRegisters(int[] registers) {
        this.registers = Arrays.copyOf(registers, registers.length);
        this.length = registers.length;
    }
437881
def get_pid_gain(self, ids, **kwargs):
        
        return tuple([tuple(reversed(t)) for t in self._get_pid_gain(ids, **kwargs)])
977728
def inject_pid(self, data):
        """"""
        # Remove already deserialized "pid" field
        pid_value = data.pop('pid', None)
        if pid_value:
            pid_field = current_app.config['PIDSTORE_RECID_FIELD']
            data.setdefault(pid_field, pid_value)
        return data
243632
def _set_pwm(self, raw_values):
        
        for i in range(len(self._pins)):
            self._pi.set_PWM_dutycycle(self._pins[i], raw_values[i])
398675
def set_angle_limit(self, limit_for_id, **kwargs):
        
        convert = kwargs['convert'] if 'convert' in kwargs else self._convert

        if 'wheel' in self.get_control_mode(limit_for_id.keys()):
            raise ValueError('can not change the angle limit of a motor in wheel mode')

        if (0, 0) in limit_for_id.values():
            raise ValueError('can not set limit to (0, 0)')

        self._set_angle_limit(limit_for_id, convert=convert)
1248258
def _set_vibration_nix(self, left_motor, right_motor, duration):
        """"""
        code = self.__get_vibration_code(left_motor, right_motor, duration)
        secs, msecs = convert_timeval(time.time())
        outer_event = struct.pack(EVENT_FORMAT, secs, msecs, 0x15, code, 1)
        self._write_device.write(outer_event)
        self._write_device.flush()
1351676
def set_id(self,pid):
        
        if self.type == 'KAF':
            return self.node.set('pid',pid)
        elif self.type == 'NAF':
            return self.node.set('id',pid)
637086
def pid(self, value):
        """"""
        self.bytearray[self._get_slicers(0)] = bytearray(c_int32(value or 0))
1033644
def set_cooling_motor(self, cooling_motor):
        
        if type(cooling_motor) != bool:
            raise InvalidInput("Cooling motor value must be bool")
        self._config['cooling_motor'] = bool2int(cooling_motor)
        self._q.put(self._config)