mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 16:43:35 +08:00
Cleanup variable names and such
This commit is contained in:
+6
-6
@@ -444,7 +444,7 @@ int sdlog_thread_main(int argc, char *argv[])
|
||||
struct vehicle_vicon_position_s vicon_pos;
|
||||
struct optical_flow_s flow;
|
||||
struct battery_status_s batt;
|
||||
struct differential_pressure_s diff_pressure;
|
||||
struct differential_pressure_s diff_pres;
|
||||
struct airspeed_s airspeed;
|
||||
} buf;
|
||||
memset(&buf, 0, sizeof(buf));
|
||||
@@ -463,7 +463,7 @@ int sdlog_thread_main(int argc, char *argv[])
|
||||
int vicon_pos_sub;
|
||||
int flow_sub;
|
||||
int batt_sub;
|
||||
int diff_pressure_sub;
|
||||
int diff_pres_sub;
|
||||
int airspeed_sub;
|
||||
} subs;
|
||||
|
||||
@@ -561,8 +561,8 @@ int sdlog_thread_main(int argc, char *argv[])
|
||||
|
||||
/* --- DIFFERENTIAL PRESSURE --- */
|
||||
/* subscribe to ORB for flow measurements */
|
||||
subs.diff_pressure_sub = orb_subscribe(ORB_ID(differential_pressure));
|
||||
fds[fdsc_count].fd = subs.diff_pressure_sub;
|
||||
subs.diff_pres_sub = orb_subscribe(ORB_ID(differential_pressure));
|
||||
fds[fdsc_count].fd = subs.diff_pres_sub;
|
||||
fds[fdsc_count].events = POLLIN;
|
||||
fdsc_count++;
|
||||
|
||||
@@ -664,7 +664,7 @@ int sdlog_thread_main(int argc, char *argv[])
|
||||
orb_copy(ORB_ID(vehicle_attitude), subs.att_sub, &buf.att);
|
||||
orb_copy(ORB_ID(vehicle_vicon_position), subs.vicon_pos_sub, &buf.vicon_pos);
|
||||
orb_copy(ORB_ID(optical_flow), subs.flow_sub, &buf.flow);
|
||||
orb_copy(ORB_ID(differential_pressure), subs.diff_pressure_sub, &buf.diff_pressure);
|
||||
orb_copy(ORB_ID(differential_pressure), subs.diff_pres_sub, &buf.diff_pres);
|
||||
orb_copy(ORB_ID(airspeed), subs.airspeed_sub, &buf.airspeed);
|
||||
orb_copy(ORB_ID(battery_status), subs.batt_sub, &buf.batt);
|
||||
|
||||
@@ -702,7 +702,7 @@ int sdlog_thread_main(int argc, char *argv[])
|
||||
.vicon = {buf.vicon_pos.x, buf.vicon_pos.y, buf.vicon_pos.z, buf.vicon_pos.roll, buf.vicon_pos.pitch, buf.vicon_pos.yaw},
|
||||
.control_effective = {buf.act_controls_effective.control_effective[0], buf.act_controls_effective.control_effective[1], buf.act_controls_effective.control_effective[2], buf.act_controls_effective.control_effective[3]},
|
||||
.flow = {buf.flow.flow_raw_x, buf.flow.flow_raw_y, buf.flow.flow_comp_x_m, buf.flow.flow_comp_y_m, buf.flow.ground_distance_m, buf.flow.quality},
|
||||
.diff_pressure = buf.diff_pressure.differential_pressure_pa,
|
||||
.diff_pressure = buf.diff_pres.differential_pressure_pa,
|
||||
.ind_airspeed = buf.airspeed.indicated_airspeed_m_s,
|
||||
.true_airspeed = buf.airspeed.true_airspeed_m_s
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user