diff --git a/libraries/DataFlash/DataFlash.h b/libraries/DataFlash/DataFlash.h index 72828b5e19..b051d9111d 100644 --- a/libraries/DataFlash/DataFlash.h +++ b/libraries/DataFlash/DataFlash.h @@ -141,7 +141,8 @@ struct PACKED log_Parameter { struct PACKED log_GPS { LOG_PACKET_HEADER; uint8_t status; - uint32_t gps_time; + uint32_t gps_week_ms; + uint16_t gps_week; uint8_t num_sats; int16_t hdop; int32_t latitude; @@ -169,7 +170,7 @@ struct PACKED log_IMU { { LOG_PARAMETER_MSG, sizeof(log_Parameter), \ "PARM", "Nf", "Name,Value" }, \ { LOG_GPS_MSG, sizeof(log_GPS), \ - "GPS", "BIBcLLeeEe", "Status,Time,NSats,HDop,Lat,Lng,RelAlt,Alt,Spd,GCrs" }, \ + "GPS", "BIHBcLLeeEe", "Status,TimeMS,Week,NSats,HDop,Lat,Lng,RelAlt,Alt,Spd,GCrs" }, \ { LOG_IMU_MSG, sizeof(log_IMU), \ "IMU", "ffffff", "GyrX,GyrY,GyrZ,AccX,AccY,AccZ" }, \ { LOG_MESSAGE_MSG, sizeof(log_Message), \ diff --git a/libraries/DataFlash/LogFile.cpp b/libraries/DataFlash/LogFile.cpp index 924b553d45..e63d33a934 100644 --- a/libraries/DataFlash/LogFile.cpp +++ b/libraries/DataFlash/LogFile.cpp @@ -606,7 +606,8 @@ void DataFlash_Class::Log_Write_GPS(const GPS *gps, int32_t relative_alt) struct log_GPS pkt = { LOG_PACKET_HEADER_INIT(LOG_GPS_MSG), status : (uint8_t)gps->status(), - gps_time : gps->time, + gps_week_ms : gps->time_week_ms, + gps_week : gps->time_week, num_sats : gps->num_sats, hdop : gps->hdop, latitude : gps->latitude,