ArduCopter - fix to dataflash logging of Mag heading

This commit is contained in:
rmackay9 2012-03-11 01:27:29 +09:00
parent a30b03cd0a
commit a72b20f42d
1 changed files with 8 additions and 8 deletions

View File

@ -701,7 +701,7 @@ static void Log_Write_Attitude()
DataFlash.WriteInt((int)dcm.pitch_sensor); // 4 DataFlash.WriteInt((int)dcm.pitch_sensor); // 4
DataFlash.WriteInt(g.rc_4.control_in); // 5 DataFlash.WriteInt(g.rc_4.control_in); // 5
DataFlash.WriteInt((uint16_t)dcm.yaw_sensor); // 6 DataFlash.WriteInt((uint16_t)dcm.yaw_sensor); // 6
DataFlash.WriteInt((uint16_t)compass.heading); // 6 DataFlash.WriteInt((uint16_t)(ToDeg(compass.heading)*100)); // 7
DataFlash.WriteByte(END_BYTE); DataFlash.WriteByte(END_BYTE);
} }
@ -720,13 +720,13 @@ static void Log_Read_Attitude()
// 1 2 3 4 5 6 7 // 1 2 3 4 5 6 7
Serial.printf_P(PSTR("ATT, %d, %d, %d, %d, %d, %u, %u\n"), Serial.printf_P(PSTR("ATT, %d, %d, %d, %d, %d, %u, %u\n"),
temp1, (int)temp1,
temp2, (int)temp2,
temp3, (int)temp3,
temp4, (int)temp4,
temp5, (int)temp5,
temp6, (unsigned int)temp6,
temp7); (unsigned int)temp7);
} }
// Write a mode packet. Total length : 7 bytes // Write a mode packet. Total length : 7 bytes