Ground course saved as long for SIM compat

This commit is contained in:
Jason Short 2011-12-10 10:17:04 -08:00
parent f444aac706
commit 34213e745c
1 changed files with 7 additions and 5 deletions

View File

@ -417,7 +417,7 @@ static void Log_Write_GPS()
DataFlash.WriteLong(g_gps->altitude); // 6
DataFlash.WriteInt(g_gps->ground_speed); // 7
DataFlash.WriteInt((uint16_t)g_gps->ground_course); // 8
DataFlash.WriteLong(g_gps->ground_course); // 8
DataFlash.WriteByte(END_BYTE);
}
@ -432,10 +432,10 @@ static void Log_Read_GPS()
float temp5 = DataFlash.ReadLong() / 100.0; // 5 gps alt
float temp6 = DataFlash.ReadLong() / 100.0; // 6 sensor alt
int16_t temp7 = DataFlash.ReadInt(); // 7 ground speed
uint32_t temp8 = (unsigned)DataFlash.ReadInt();// 8 ground course
int32_t temp8 = DataFlash.ReadLong();// 8 ground course
// 1 2 3 4 5 6 7 8
Serial.printf_P(PSTR("GPS, %ld, %d, %4.7f, %4.7f, %4.4f, %4.4f, %d, %u\n"),
Serial.printf_P(PSTR("GPS, %ld, %d, %4.7f, %4.7f, %4.4f, %4.4f, %d, %ld\n"),
temp1, // 1 time
temp2, // 2 sats
temp3, // 3 lat
@ -700,6 +700,8 @@ static void Log_Write_Nav_Tuning()
DataFlash.WriteInt(nav_lat); // 6
DataFlash.WriteInt(g.pi_nav_lon.get_integrator()); // 7
DataFlash.WriteInt(g.pi_nav_lat.get_integrator()); // 8
//crosstrack_error
//DataFlash.WriteInt(crosstrack_error); // 9
DataFlash.WriteInt(g.pi_loiter_lon.get_integrator()); // 9
DataFlash.WriteInt(g.pi_loiter_lat.get_integrator()); // 10