mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-02 14:13:42 -04:00
3ae91b432b
This commit changes the way libraries headers are included in source files: - If the header is in the same directory the source belongs to, so the notation '#include ""' is used with the path relative to the directory containing the source. - If the header is outside the directory containing the source, then we use the notation '#include <>' with the path relative to libraries folder. Some of the advantages of such approach: - Only one search path for libraries headers. - OSs like Windows may have a better lookup time.
24 lines
632 B
C++
24 lines
632 B
C++
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
#include "AP_Baro.h"
|
|
|
|
extern const AP_HAL::HAL& hal;
|
|
|
|
// constructor
|
|
AP_Baro_Backend::AP_Baro_Backend(AP_Baro &baro) :
|
|
_frontend(baro)
|
|
{}
|
|
|
|
/*
|
|
copy latest data to the frontend from a backend
|
|
*/
|
|
void AP_Baro_Backend::_copy_to_frontend(uint8_t instance, float pressure, float temperature)
|
|
{
|
|
if (instance >= _frontend._num_sensors) {
|
|
return;
|
|
}
|
|
_frontend.sensors[instance].pressure = pressure;
|
|
_frontend.sensors[instance].temperature = temperature;
|
|
_frontend.sensors[instance].last_update_ms = hal.scheduler->millis();
|
|
}
|