Go away from Limit Switch
339885
def ReleaseSW(self):
        '  '
        while self.ReadStatusBit(2) == 1:           # is Limit Switch ON ?
            spi.SPI_write(self.CS, [0x92, 0x92] | (~self.Dir & 1))     # release SW 
            while self.IsBusy():
                pass
            self.MoveWait(10)
1313570
def stop(self):
        
        self.debug("()")
        # Not sure if this is necessary, but good form
        if self._is_running:
            for gpio in self.gpios:
                GPIO.remove_event_detect(gpio)
            # Cleanup - includes used numbering scheme
        GPIO.cleanup()
        # Leave audience
        try:
            self.changer.on_person_leave(self.people)
        except:
            self.exception("Failed to remove people from audience")
        super(GPIODetector, self).stop()
1108825
def limit(self, keys):
        ''' 
        '''
        if not isinstance(keys, list) and not isinstance(keys, tuple):
            keys = [keys]
        remove_keys = [k for k in self.keys() if k not in keys]
        for k in remove_keys:
            self.pop(k)
271632
def stop(self):
        
        self.listener.setsockopt(LINGER, 1)
        self.loop = False
        with nslock:
            self.listener.close()
117300
def stop(self) -> None:
        """"""
        self._running = False
        if self._timeout is not None:
            self.io_loop.remove_timeout(self._timeout)
            self._timeout = None
1201868
def _pop_entities(self, limit=50):
        
        pop = self.data['entities'][:limit]
        del self.data['entities'][:limit]
        return pop
882262
def stop(self):
        """"""
        self.state = False
        with display_manager(self.display) as d:
            d.record_disable_context(self.ctx)
            d.ungrab_keyboard(X.CurrentTime)
        with display_manager(self.display2):
            d.record_disable_context(self.ctx)
            d.ungrab_keyboard(X.CurrentTime)
217449
def limit(self, limit):
        """"""
        clone = self._clone()

        if isinstance(limit, int):
            clone._limit = limit

        return clone
90825
def stop(self, handle, reason=None):
        """"""
        params = self._get_params(reason=reason)
        self._transport.stop(handle, params)
1221011
def off(device):
    '''
    
    '''
    cmd = 'quotaoff {0}'.format(device)
    __salt__['cmd.run'](cmd, python_shell=False)
    return True
1280380
def stop(self):
        

        self._hw_virtualization = False
        yield from self._stop_remote_console()
        yield from self._stop_ubridge()

        try:
            if (yield from self.is_running()):
                if self.acpi_shutdown:
                    # use ACPI to shutdown the VM
                    yield from self._control_vm("stop", "soft")
                else:
                    yield from self._control_vm("stop")
        finally:
            self._started = False
            self.status = "stopped"

            self._read_vmx_file()
            self._vmnets.clear()
            # remove the adapters managed by GNS3
            for adapter_number in range(0, self._adapters):
                vnet = "ethernet{}.vnet".format(adapter_number)
                if self._get_vmx_setting(vnet) or self._get_vmx_setting("ethernet{}.connectiontype".format(adapter_number)) is None:
                    if vnet in self._vmx_pairs:
                        vmnet = os.path.basename(self._vmx_pairs[vnet])
                        if not self.manager.is_managed_vmnet(vmnet):
                            continue
                    log.debug("removing adapter {}".format(adapter_number))
                    self._vmx_pairs[vnet] = "vmnet1"
                    self._vmx_pairs["ethernet{}.connectiontype".format(adapter_number)] = "custom"

            # re-enable any remaining network adapters
            for adapter_number in range(self._adapters, self._maximum_adapters):
                if self._get_vmx_setting("ethernet{}.present".format(adapter_number), "TRUE"):
                    log.debug("enabling remaining adapter {}".format(adapter_number))
                    self._vmx_pairs["ethernet{}.startconnected".format(adapter_number)] = "TRUE"
            self._write_vmx_file()

        yield from super().stop()
        log.info("VMware VM '{name}' [{id}] stopped".format(name=self.name, id=self.id))
214683
def stop(name):
    '''
    
    '''
    __salt__['file.touch']('{0}/down'.format(_service_path(name)))
    cmd = 'svc -d {0}'.format(_service_path(name))
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
1150979
def stop(self, check=True):
        
        if (check and self.countiter > 0 and self.opts['termination_callback'] and
                self.opts['termination_callback'] != str(self.opts['termination_callback'])):
            self.callbackstop = self.opts['termination_callback'](self)

        return self._stopdict(self, check)
861169
protected function limit()
    {
        if (($connectionLimit = config('ratchet.connectionLimit')) && $this->connections - 1 >= $connectionLimit) {
            $this->console->info(sprintf('To many connections: %d of %d', $this->connections - 1, $connectionLimit));
            $this->conn->send(trans('ratchet::messages.tooManyConnections'));
            $this->conn->close();
        }

        return $this;
    }
567814
def stop(self):
        """"""
        _LOGGER.info('Stopping gateway')
        self._disconnect()
        if self.connect_task and not self.connect_task.cancelled():
            self.connect_task.cancel()
            self.connect_task = None
        if not self.persistence:
            return
        if self._cancel_save is not None:
            self._cancel_save()
            self._cancel_save = None
        yield from self.loop.run_in_executor(
            None, self.persistence.save_sensors)
1247756
async def stop(self):
        """"""
        await self._command_task.future_command(['_set_mode', 0, 0])  # Disable advertising
        await self._cleanup_old_connections()

        self._command_task.stop()
        self._stream.stop()
        self._serial_port.close()

        await super(BLED112Server, self).stop()
1181943
def halt(self):
        """"""

        buf = []
        buf.append(self.act_end)
        buf.append(0)

        crc = self.calculate_crc(buf)
        self.clear_bitmask(0x08, 0x80)
        self.card_write(self.mode_transrec, buf)
        self.clear_bitmask(0x08, 0x08)
        self.authed = False