void bmp085_telemetry_send_pressure(const barometer_t* bmp085, const mavlink_stream_t* mavlink_stream, mavlink_message_t* msg)
{
	mavlink_msg_scaled_pressure_pack(	mavlink_stream->sysid,
										mavlink_stream->compid,
										msg,
										time_keeper_get_millis(),
										bmp085->pressure / 100.0f,
										bmp085->vario_vz,
										bmp085->temperature * 100.0f);
}
Exemplo n.º 2
0
uint16_t PackScaledPressure(uint8_t system_id, uint8_t component_id, mavlink_scaled_pressure_t mlAirData ,uint32_t time_usec){
  mavlink_system_t mavlink_system;

//  if (!(mlPending.wpProtState == WP_PROT_IDLE)) 
//    return 0;
  mavlink_system.sysid = system_id;                   ///< ID 20 for this airplane
  mavlink_system.compid = component_id;//MAV_COMP_ID_IMU;     ///< The component sending the message is the IMU, it could be also a Linux process
  //////////////////////////////////////////////////////////////////////////
  mavlink_message_t msg;
  memset(&msg, 0, sizeof (mavlink_message_t));
  mavlink_msg_scaled_pressure_pack(system_id, component_id, &msg,
						       time_usec, mlAirData.press_abs, mlAirData.press_diff, mlAirData.temperature);
  return( mavlink_msg_to_send_buffer(UartOutBuff, &msg));
}