<commit_before>var arDrone = require('ar-drone');
var client  = arDrone.createClient();

var XboxController = require('xbox-controller');
var xbox = new XboxController();

console.log(xbox.serialNumber + ' online');

const DEFAULT_MOVEMENT_SPEED = 0.2;

// Emergency mode, calibrate and flat trim
xbox.on('start:press', function (key) {
  console.log('start:press - recover from emergency mode');
  client.disableEmergency();
  client.land();
});

xbox.on('back:press', function (key) {
  console.log('back:press - calibrate magnetometer');
  client.calibrate(0);
});

xbox.on('y:press', function (key) {
  console.log('y:press - flat trim');
  client.ftrim();<commit_msg>Switch between front and bottom camera<commit_after>var arDrone = require('ar-drone');
var client  = arDrone.createClient();

var XboxController = require('xbox-controller');
var xbox = new XboxController();

console.log(xbox.serialNumber + ' online');

const DEFAULT_MOVEMENT_SPEED = 0.2;

// Emergency mode, calibrate and flat trim
xbox.on('start:press', function (key) {
  console.log('start:press - recover from emergency mode');
  client.disableEmergency();
  client.land();
});

xbox.on('back:press', function (key) {
  console.log('back:press - calibrate magnetometer');
  client.calibrate(0);
});

xbox.on('y:press', function (key) {
  console.log('y:press - flat trim');
  client.ftrim();
});

// Camera settings
xbox.on('dup:press', function (key) {
  console.log('dup:press - front camera');
  client.config('video:video_channel', 0);
});

xbox.on('ddown:press', function (key) {
  console.log('ddown:press - bottom camera');
  client.config('video:video_channel', 3);
{'fraction_non_alphanumeric': 0.17201695941853423, 'fraction_numerical': 0.004845548152634767, 'mean_word_length': 5.329501915708812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3965852', 'n_tokens_mistral': 554, 'n_tokens_neox': 541, 'n_words': 118}