46 _sub_air_pressure_data(node),
47 _sub_air_temperature_data(node)
61 DEVICE_LOG(
"failed to start uavcan sub: %d", res);
68 DEVICE_LOG(
"failed to start uavcan sub: %d", res);
77 uavcan::ReceivedDataStructure<uavcan::equipment::air_data::StaticTemperature> &
msg)
84 uavcan::ReceivedDataStructure<uavcan::equipment::air_data::StaticPressure> &
msg)
97 report.pressure = msg.static_pressure / 100.0F;
98 report.error_count = 0;
101 report.device_id = 0;
103 publish(msg.getSrcNodeID().get(), &report);
#define BARO_BASE_DEVICE_PATH
uavcan::Subscriber< uavcan::equipment::air_data::StaticTemperature, AirTemperatureCbBinder > _sub_air_temperature_data
void air_pressure_sub_cb(const uavcan::ReceivedDataStructure< uavcan::equipment::air_data::StaticPressure > &msg)
uavcan::MethodBinder< UavcanBarometerBridge *, void(UavcanBarometerBridge::*)(const uavcan::ReceivedDataStructure< uavcan::equipment::air_data::StaticPressure > &) > AirPressureCbBinder
High-resolution timer with callouts and timekeeping.
static char msg[NUM_MSG][CONFIG_USART1_TXBUFSIZE]
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
This is the base class for redundant sensors with an independent ORB topic per each redundancy channe...
void air_temperature_sub_cb(const uavcan::ReceivedDataStructure< uavcan::equipment::air_data::StaticTemperature > &msg)
static const char *const NAME
#define DEVICE_LOG(FMT,...)
uavcan::Subscriber< uavcan::equipment::air_data::StaticPressure, AirPressureCbBinder > _sub_air_pressure_data
uavcan::MethodBinder< UavcanBarometerBridge *, void(UavcanBarometerBridge::*)(const uavcan::ReceivedDataStructure< uavcan::equipment::air_data::StaticTemperature > &) > AirTemperatureCbBinder
float last_temperature_kelvin
UavcanBarometerBridge(uavcan::INode &node)
int init() override
Starts the bridge.
void publish(const int node_id, const void *report)
Sends one measurement into appropriate ORB topic.
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).