delete gyro_report (alias for sensor_gyro_s)

This commit is contained in:
Daniel Agar
2018-11-06 07:43:43 +08:00
committed by Lorenz Meier
parent 42f9aa6e43
commit acc24da0c2
25 changed files with 79 additions and 80 deletions
+3 -3
View File
@@ -71,7 +71,7 @@ typedef struct {
int gyro_sensor_sub[max_gyros];
int sensor_correction_sub;
struct gyro_calibration_s gyro_scale[max_gyros];
struct gyro_report gyro_report_0;
sensor_gyro_s gyro_report_0;
} gyro_worker_data_t;
static calibrate_return gyro_calibration_worker(int cancel_sub, void* data)
@@ -79,7 +79,7 @@ static calibrate_return gyro_calibration_worker(int cancel_sub, void* data)
gyro_worker_data_t* worker_data = (gyro_worker_data_t*)(data);
unsigned calibration_counter[max_gyros] = { 0 }, slow_count = 0;
const unsigned calibration_count = 5000;
struct gyro_report gyro_report;
sensor_gyro_s gyro_report;
unsigned poll_errcount = 0;
struct sensor_correction_s sensor_correction; /**< sensor thermal corrections */
@@ -307,7 +307,7 @@ int do_gyro_calibration(orb_advert_t *mavlink_log_pub)
for(unsigned i = 0; i < orb_gyro_count && !found_cur_gyro; i++) {
worker_data.gyro_sensor_sub[cur_gyro] = orb_subscribe_multi(ORB_ID(sensor_gyro), i);
struct gyro_report report;
sensor_gyro_s report{};
orb_copy(ORB_ID(sensor_gyro), worker_data.gyro_sensor_sub[cur_gyro], &report);
#ifdef __PX4_NUTTX
+1 -1
View File
@@ -396,7 +396,7 @@ static calibrate_return mag_calibration_worker(detect_orientation_return orienta
int poll_ret = px4_poll(fds, fd_count, 1000);
if (poll_ret > 0) {
struct gyro_report gyro;
sensor_gyro_s gyro{};
orb_copy(ORB_ID(sensor_gyro), sub_gyro, &gyro);
/* ensure we have a valid first timestamp */