<commit_before>#include <ADXL345.h>
#include <HMC58X3.h>
#include <ITG3200.h>

//#define DEBUG
#include "DebugUtils.h"

#include "FreeIMU.h"
#include "CommunicationUtils.h"
#include <Wire.h>

#define AVERAGE  1

//int raw_values[9];
//char str[512];
float ypr[3]; // yaw pitch roll
//float val[9];
float myVals[9];

// Set the FreeIMU object
FreeIMU my3IMU = FreeIMU();

void setup() { 
  Serial.begin(115200);
  Wire.begin();
  
  delay(5);
  my3IMU.init(); // the parameter enable or disable fast mode
  delay(5);
}

void loop()
{ 
  ypr[0] = 0.0;
  ypr[1] = 0.0;
  ypr[2] = 0.0;
  
  for (int i = 0; i < AVERAGE; i++)
  {
    float yprTmp[3];
    float accel[9];
    my3IMU.getYawPitchRoll(yprTmp, accel);
    ypr[0] += yprTmp[0];
    ypr[1] += yprTmp[1];
    ypr[2] += yprTmp[2];
    
    for (int i = 0; i < 9; i++)
      myVals[i] += accel[i];
  }
  
  ypr[0] /= AVERAGE;
  ypr[1] /= AVERAGE;
  ypr[2] /= AVERAGE;
  
  for (int i = 0; i < 9; i++)
      myVals[i] /= AVERAGE;
  
  //Serial.print("Yaw: ");
  Serial.print("S");
  Serial.print(ypr[0]);
  Serial.print(",");
  Serial.print(ypr[1]);
  Serial.print(",");
  Serial.print(ypr[2]);<commit_msg>swaped pitch roll<commit_after>#include <ADXL345.h>
#include <HMC58X3.h>
#include <ITG3200.h>

//#define DEBUG
#include "DebugUtils.h"

#include "FreeIMU.h"
#include "CommunicationUtils.h"
#include <Wire.h>

#define AVERAGE  1

//int raw_values[9];
//char str[512];
float ypr[3]; // yaw pitch roll
//float val[9];
float myVals[9];

// Set the FreeIMU object
FreeIMU my3IMU = FreeIMU();

void setup() { 
  Serial.begin(115200);
  Wire.begin();
  
  delay(5);
  my3IMU.init(); // the parameter enable or disable fast mode
  delay(5);
}

void loop()
{ 
  ypr[0] = 0.0;
  ypr[1] = 0.0;
  ypr[2] = 0.0;
  
  for (int i = 0; i < AVERAGE; i++)
  {
    float yprTmp[3];
    float accel[9];
    my3IMU.getYawPitchRoll(yprTmp, accel);
    ypr[0] += yprTmp[0];
    ypr[1] += yprTmp[1];
    ypr[2] += yprTmp[2];
    
    for (int i = 0; i < 9; i++)
      myVals[i] += accel[i];
  }
  
  ypr[0] /= AVERAGE;
  ypr[1] /= AVERAGE;
  ypr[2] /= AVERAGE;
  
  for (int i = 0; i < 9; i++)
      myVals[i] /= AVERAGE;
  
  //Serial.print("Yaw: ");
  Serial.print("S");
  Serial.print(ypr[0]);
  Serial.print(",");
  Serial.print(ypr[2]);
  Serial.print(",");
  Serial.print(ypr[1]);
{'fraction_non_alphanumeric': 0.20534943917169973, 'fraction_numerical': 0.04918032786885246, 'mean_word_length': 2.950596252129472, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 11, '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': '2123283', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1075, 'n_words': 223}