-
Notifications
You must be signed in to change notification settings - Fork 0
/
Output.ino
37 lines (34 loc) · 1.33 KB
/
Output.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* This file is part of the Razor AHRS Firmware */
void output_sensors_text(char raw_or_calibrated)
{
// Serial.print("#A-"); Serial.print(raw_or_calibrated); Serial.print('=');
// Serial.print(accel[0]); Serial.print(",");
// Serial.print(accel[1]); Serial.print(",");
// Serial.print(accel[2]); Serial.println();
//
// Serial.print("#M-"); Serial.print(raw_or_calibrated); Serial.print('=');
// Serial.print(magnetom[0]); Serial.print(",");
// Serial.print(magnetom[1]); Serial.print(",");
// Serial.print(magnetom[2]); Serial.println();
//
// Serial.print("#G-"); Serial.print(raw_or_calibrated); Serial.print('=');
// Serial.print(gyro[0]); Serial.print(",");
// Serial.print(gyro[1]); Serial.print(",");
// Serial.print(gyro[2]); Serial.println();
if (dataFile) {
dataFile.print(accel[0]*0.04205); dataFile.print(",");
dataFile.print(accel[1]*0.04205); dataFile.print(",");
dataFile.print(accel[2]*0.04205); dataFile.print(",");
dataFile.print(magnetom[0]); dataFile.print(",");
dataFile.print(magnetom[1]); dataFile.print(",");
dataFile.print(magnetom[2]); dataFile.print(",");
dataFile.print(gyro[0]); dataFile.print(",");
dataFile.print(gyro[1]); dataFile.print(",");
dataFile.print(gyro[2]); dataFile.print(",");
}
}
void output_sensors()
{
compensate_sensor_errors();
output_sensors_text('C');
}