allows left motor to coast to a stop
432107
def right_brake(self):
        """"""
        self.board.digital_write(R_CTRL_1, 1)
        self.board.digital_write(R_CTRL_2, 1)
        self.board.analog_write(PWM_R, 0)
1278352
function rowPluckB(product, left, rowIndex) {
  var columns = left.columns;
  var rowBase = columns * rowIndex;
  for (var column = 0; column < columns; column++) {
    left.deltas[rowBase + column] = product.deltas[column];
  }
}
1129500
def setBottomLeft(self, loc):
        
        offset = self.getBottomLeft().getOffset(loc) # Calculate offset from current bottom left
        return self.setLocation(self.getTopLeft().offset(offset)) # Move top left corner by the same offset
1085416
def on_for_seconds(self, steering, speed, seconds, brake=True, block=True):
        
        (left_speed, right_speed) = self.get_speed_steering(steering, speed)
        MoveTank.on_for_seconds(self, SpeedNativeUnits(left_speed), SpeedNativeUnits(right_speed), seconds, brake, block)
326507
def turn_left(self, angle_degrees, rate=RATE):
        
        flight_time = angle_degrees / rate

        self.start_turn_left(rate)
        time.sleep(flight_time)
        self.stop()
882565
def left_to_right(self):
        """"""
        self._entry_mode |= Command.MODE_INCREMENT
        self.command(self._entry_mode)
617020
def exit(self):
        """"""
        # First detach all servo's, otherwise it somehow doesn't want to close...
        if hasattr(self, 'digital'):
            for pin in self.digital:
                if pin.mode == SERVO:
                    pin.mode = OUTPUT
        if hasattr(self, 'sp'):
            self.sp.close()
74662
def two_motor_drivetrain(l_motor, r_motor, x_wheelbase=2, speed=5, deadzone=None):
    
    return TwoMotorDrivetrain(x_wheelbase, speed, deadzone).get_vector(l_motor, r_motor)
1304624
function move (leftPort, rightPort) {
  leftPort = leftPort || 'b'
  rightPort = rightPort || 'c'
  var write = writeAction('motors_write', [leftPort, rightPort])
  /**
   * Run motors forever
   * @param  {Number} speed speed of motor
   * @param  {Object} opts  object of optional params
   */
  function * forever (speed, turn, opts) {
    speed = speed || motorDefaults.speed
    var speeds = turnToSpeeds(turn, speed)

    yield write('run-forever', {
      left: {
        'speed_sp': speeds.left.toString()
      }, right: {
        'speed_sp': speeds.right.toString()
      }
    })
  }

  /**
   * Run drive motors for a number of degrees
   * @param  {Number} degrees degrees to turn motor
   * @param  {Number} speed   speed at which to turn motors
   * @param  {Number} turn    turn direction
   */
  function * degrees (deg, speed, turn) {
    speed = speed || motorDefaults.speed

    var opts = turnToDegrees(turn, speed, deg)
    yield * writeAndWait('run-to-rel-pos', {
      left: {
        'position_sp': opts.left.degrees.toString(),
        'speed_sp': opts.left.speed.toString()
      },
      right: {
        'position_sp': opts.right.degrees.toString(),
        'speed_sp': opts.right.speed.toString()
      }
    })
  }

  /**
   * Run drive motors for a number of rotations
   * @param  {Number} rotations number of rotations to turn the motor
   * @param  {Number} speed     speed at which to turn motors
   * @param  {Number} turn      turn direction
   */
  function * rotations (rots, speed, turn) {
    speed = speed || motorDefaults.speed
    yield * this.degrees(Math.round(rots * 360), speed, turn)
  }

  /**
   * Run drive motors for a specified amount of time
   * @param  {Number} time  time to run the motors for (in milliseconds)
   * @param  {Number} speed speed at which to turn motors
   * @param  {Number} turn  turn direction
   */
  function * timed (time, speed, turn) {
    speed = speed || motorDefaults.speed

    var speeds = turnToSpeeds(turn, speed)
    yield * writeAndWait('run-timed', {
      left: {
        'time_sp': time.toString(),
        'speed_sp': speeds.left.toString()
      },
      right: {
        'time_sp': time.toString(),
        'speed_sp': speeds.right.toString()
      }
    })
  }

  /**
   * Stops motors
   */
  function * stop () {
    yield write('stop', {left: {}, right: {}})
  }

  /**
   * Write and hold execution until the motors are done moving
   * @param  {string} command move command
   * @param  {object} opts    move options
   */
  function * writeAndWait (command, opts) {
    var ran = false
    yield write(command, opts)
    while (true) {
      var devices = yield * read()
      if (devices.motor(leftPort) === 'running' || devices.motor(rightPort) === 'running') {
        ran = true
      }
      if (devices.motor(leftPort) === '' && devices.motor(rightPort) === '' && ran) {
        break
      }
    }
  }

  return {
    forever: forever,
    degrees: degrees,
    rotations: rotations,
    timed: timed,
    stop: stop
  }
}
915114
def idle_task(self):
        ''''''
        if self.starting_motor:
            if self.gasheli_settings.ignition_disable_time > 0:
                elapsed = time.time() - self.motor_t1
                if elapsed >= self.gasheli_settings.ignition_disable_time:
                    self.module('rc').set_override_chan(self.gasheli_settings.ignition_chan-1, self.old_override)
                    self.starting_motor = False
        if self.stopping_motor:
            elapsed = time.time() - self.motor_t1
            if elapsed >= self.gasheli_settings.ignition_stop_time:
                # hand back control to RC
                self.module('rc').set_override_chan(self.gasheli_settings.ignition_chan-1, self.old_override)
                self.stopping_motor = False
1186356
def left(self):
        '''
        

        '''

        res = self.body_left[self.lcount]()
        self.lcount += 1
        return res
1013785
function Motor (port) {
  if (!(this instanceof Motor)) {
    return new Motor(port)
  }
  try {
    Device.call(this, devices(port))
  } catch (e) {
    throw new Error('Cannot find motor')
  }
  this.write('speed_regulation', 'on')
}
78173
public static Container leftShift(Container self, Component c) {
        self.add(c);
        return self;
    }
790366
def right_motor(self, speed, durationS=-1.0):
        """"""
        if speed > 0:
            self.right_fwd(min(abs(speed), 255))
        else:
            self.right_rev(min(abs(speed), 255))
        if durationS > 0:
            self.board.sleep(durationS)
            self.left_stop()
61107
def backward(self, speed=1):
        
        self.left_motor.backward(speed)
        self.right_motor.backward(speed)
154913
def turn_left():
    """"""
    motors.left_motor(150)  # spin CCW
    motors.right_motor(150)  # spin CCW
    board.sleep(0.5)
    motors.brake();
    board.sleep(0.1)
1039313
private R pushLeft(T first, R acc) {
        synchronized (root) {
            Connector<T, R> l = left;
            if (l == null)
                return acc;
            left = null;
            l.rhs = null;
            T laright = l.right;
            l.right = none();
            if (l.acc == NONE) {
                l.acc = acc;
                l.left = first;
                return none();
            }
            if (this.mergeable.test(laright, first)) {
                l.acc = this.combiner.apply(l.acc, acc);
                return l.drainLeft();
            }
            if (l.left == NONE) {
                left = new Connector<>(null, acc, this);
                return l.drain();
            }
        }
        return acc;
    }