DataFlash: log baro climbrate

This commit is contained in:
Randy Mackay 2014-10-22 16:29:25 +09:00
parent 0d2954b5a4
commit 5cbcbf9b37
2 changed files with 3 additions and 1 deletions

View File

@ -251,6 +251,7 @@ struct PACKED log_BARO {
float altitude; float altitude;
float pressure; float pressure;
int16_t temperature; int16_t temperature;
float climbrate;
}; };
struct PACKED log_AHRS { struct PACKED log_AHRS {
@ -431,7 +432,7 @@ struct PACKED log_Ubx2 {
{ LOG_RCOUT_MSG, sizeof(log_RCOUT), \ { LOG_RCOUT_MSG, sizeof(log_RCOUT), \
"RCOU", "Ihhhhhhhh", "TimeMS,Chan1,Chan2,Chan3,Chan4,Chan5,Chan6,Chan7,Chan8" }, \ "RCOU", "Ihhhhhhhh", "TimeMS,Chan1,Chan2,Chan3,Chan4,Chan5,Chan6,Chan7,Chan8" }, \
{ LOG_BARO_MSG, sizeof(log_BARO), \ { LOG_BARO_MSG, sizeof(log_BARO), \
"BARO", "Iffc", "TimeMS,Alt,Press,Temp" }, \ "BARO", "Iffcf", "TimeMS,Alt,Press,Temp,CRt" }, \
{ LOG_POWR_MSG, sizeof(log_POWR), \ { LOG_POWR_MSG, sizeof(log_POWR), \
"POWR","ICCH","TimeMS,Vcc,VServo,Flags" }, \ "POWR","ICCH","TimeMS,Vcc,VServo,Flags" }, \
{ LOG_CMD_MSG, sizeof(log_Cmd), \ { LOG_CMD_MSG, sizeof(log_Cmd), \

View File

@ -763,6 +763,7 @@ void DataFlash_Class::Log_Write_Baro(AP_Baro &baro)
altitude : baro.get_altitude(), altitude : baro.get_altitude(),
pressure : baro.get_pressure(), pressure : baro.get_pressure(),
temperature : (int16_t)(baro.get_temperature() * 100), temperature : (int16_t)(baro.get_temperature() * 100),
climbrate : baro.get_climb_rate()
}; };
WriteBlock(&pkt, sizeof(pkt)); WriteBlock(&pkt, sizeof(pkt));
} }