Log: fixed a few more casts

This commit is contained in:
Andrew Tridgell 2011-11-08 11:59:07 +11:00
parent 294c812b9b
commit dc6fb484cd
1 changed files with 19 additions and 19 deletions

View File

@ -383,7 +383,7 @@ static void Log_Read_GPS()
"%4.7f, %4.7f, %4.4f, %4.4f, "
"%d, %u\n"),
DataFlash.ReadLong(), // 1 time
(long)DataFlash.ReadLong(), // 1 time
DataFlash.ReadByte(), // 2 sats
DataFlash.ReadLong() / t7, // 3 lat
@ -391,8 +391,8 @@ static void Log_Read_GPS()
DataFlash.ReadLong() / 100.0, // 5 gps alt
DataFlash.ReadLong() / 100.0, // 6 sensor alt
DataFlash.ReadInt(), // 7 ground speed
(uint16_t)DataFlash.ReadInt()); // 8 ground course
(int)DataFlash.ReadInt(), // 7 ground speed
(unsigned)DataFlash.ReadInt()); // 8 ground course
}
// Write an raw accel/gyro data packet. Total length : 28 bytes
@ -462,7 +462,7 @@ static void Log_Read_Current()
{
Serial.printf_P(PSTR("CURR: %d, %ld, %4.4f, %4.4f, %d\n"),
DataFlash.ReadInt(),
DataFlash.ReadLong(),
(long)DataFlash.ReadLong(),
(DataFlash.ReadInt() / 100.f),
(DataFlash.ReadInt() / 100.f),
@ -755,7 +755,7 @@ static void Log_Read_Performance()
DataFlash.ReadByte(), //3
DataFlash.ReadByte(), //4
DataFlash.ReadInt(), //5
DataFlash.ReadLong()); //6
(long)DataFlash.ReadLong()); //6
}
// Write a command processing packet.
@ -795,9 +795,9 @@ static void Log_Read_Cmd()
DataFlash.ReadByte(),
// Alt, lat long
DataFlash.ReadLong(),
DataFlash.ReadLong(),
DataFlash.ReadLong());
(long)DataFlash.ReadLong(),
(long)DataFlash.ReadLong(),
(long)DataFlash.ReadLong());
}
/*
// Write an attitude packet. Total length : 10 bytes
@ -831,8 +831,8 @@ static void Log_Read_Attitude2()
DataFlash.ReadInt(),
DataFlash.ReadInt(),
DataFlash.ReadLong(),
DataFlash.ReadLong(),
(long)DataFlash.ReadLong(),
(long)DataFlash.ReadLong(),
(float)DataFlash.ReadLong()/100000.0,
(float)DataFlash.ReadLong()/100000.0 );