mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 04:53:35 +08:00
adapted to new vehicle attitude message
This commit is contained in:
@@ -107,9 +107,13 @@ int px4_simple_app_main(int argc, char *argv[])
|
||||
(double)raw.accelerometer_m_s2[2]);
|
||||
|
||||
/* set att and publish this information for other apps */
|
||||
att.roll = raw.accelerometer_m_s2[0];
|
||||
att.pitch = raw.accelerometer_m_s2[1];
|
||||
att.yaw = raw.accelerometer_m_s2[2];
|
||||
//att.roll = raw.accelerometer_m_s2[0];
|
||||
//att.pitch = raw.accelerometer_m_s2[1];
|
||||
//att.yaw = raw.accelerometer_m_s2[2];
|
||||
att.q[0] = raw.accelerometer_m_s2[0];
|
||||
att.q[1] = raw.accelerometer_m_s2[1];
|
||||
att.q[2] = raw.accelerometer_m_s2[2];
|
||||
|
||||
orb_publish(ORB_ID(vehicle_attitude), att_pub, &att);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user