mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 18:40:34 +08:00
replace mag_report with sensor_mag_s
This commit is contained in:
@@ -462,7 +462,7 @@ static calibrate_return mag_calibration_worker(detect_orientation_return orienta
|
||||
prev_count[cur_mag] = worker_data->calibration_counter_total[cur_mag];
|
||||
|
||||
if (worker_data->sub_mag[cur_mag] >= 0) {
|
||||
struct mag_report mag;
|
||||
sensor_mag_s mag{};
|
||||
|
||||
orb_copy(ORB_ID(sensor_mag), worker_data->sub_mag[cur_mag], &mag);
|
||||
|
||||
@@ -606,7 +606,7 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t cal_ma
|
||||
for (unsigned i = 0; i < orb_mag_count && !found_cur_mag; i++) {
|
||||
worker_data.sub_mag[cur_mag] = orb_subscribe_multi(ORB_ID(sensor_mag), i);
|
||||
|
||||
struct mag_report report;
|
||||
sensor_mag_s report{};
|
||||
orb_copy(ORB_ID(sensor_mag), worker_data.sub_mag[cur_mag], &report);
|
||||
|
||||
#ifdef __PX4_NUTTX
|
||||
|
||||
@@ -417,7 +417,7 @@ void VotedSensorsUpdate::parametersUpdate()
|
||||
for (int topic_instance = 0; topic_instance < MAG_COUNT_MAX
|
||||
&& topic_instance < _mag.subscription_count; ++topic_instance) {
|
||||
|
||||
struct mag_report report;
|
||||
sensor_mag_s report;
|
||||
|
||||
if (orb_copy(ORB_ID(sensor_mag), _mag.subscription[topic_instance], &report) != 0) {
|
||||
continue;
|
||||
@@ -779,7 +779,7 @@ void VotedSensorsUpdate::magPoll(vehicle_magnetometer_s &magnetometer)
|
||||
orb_check(_mag.subscription[uorb_index], &mag_updated);
|
||||
|
||||
if (mag_updated) {
|
||||
struct mag_report mag_report;
|
||||
sensor_mag_s mag_report{};
|
||||
|
||||
int ret = orb_copy(ORB_ID(sensor_mag), _mag.subscription[uorb_index], &mag_report);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user