mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Airspeed: add instance to hygrometer logging
This commit is contained in:
parent
280796a30e
commit
97f60cd017
@ -722,6 +722,13 @@ void AP_Airspeed::handle_msp(const MSP::msp_airspeed_data_message_t &pkt)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// @LoggerMessage: HYGR
|
||||||
|
// @Description: Hygrometer data
|
||||||
|
// @Field: TimeUS: Time since system startup
|
||||||
|
// @Field: Id: sensor ID
|
||||||
|
// @Field: Humidity: percentage humidity
|
||||||
|
// @Field: Temp: temperature in degrees C
|
||||||
|
|
||||||
void AP_Airspeed::Log_Airspeed()
|
void AP_Airspeed::Log_Airspeed()
|
||||||
{
|
{
|
||||||
const uint64_t now = AP_HAL::micros64();
|
const uint64_t now = AP_HAL::micros64();
|
||||||
@ -759,11 +766,12 @@ void AP_Airspeed::Log_Airspeed()
|
|||||||
if (sensor[i]->get_hygrometer(hygrometer.sample_ms, hygrometer.temperature, hygrometer.humidity) &&
|
if (sensor[i]->get_hygrometer(hygrometer.sample_ms, hygrometer.temperature, hygrometer.humidity) &&
|
||||||
hygrometer.sample_ms != state[i].last_hygrometer_log_ms) {
|
hygrometer.sample_ms != state[i].last_hygrometer_log_ms) {
|
||||||
AP::logger().WriteStreaming("HYGR",
|
AP::logger().WriteStreaming("HYGR",
|
||||||
"TimeUS,Humidity,Temp",
|
"TimeUS,Id,Humidity,Temp",
|
||||||
"s%O",
|
"s#%O",
|
||||||
"F--",
|
"F---",
|
||||||
"Qff",
|
"QBff",
|
||||||
AP_HAL::micros64(),
|
AP_HAL::micros64(),
|
||||||
|
i,
|
||||||
hygrometer.humidity,
|
hygrometer.humidity,
|
||||||
hygrometer.temperature);
|
hygrometer.temperature);
|
||||||
state[i].last_hygrometer_log_ms = hygrometer.sample_ms;
|
state[i].last_hygrometer_log_ms = hygrometer.sample_ms;
|
||||||
|
Loading…
Reference in New Issue
Block a user