Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sih: move to PX4Accelerometer/PX4Gyroscope/PX4Magnetometer/PX4Barometer helpers #12142

Merged
merged 2 commits into from
Jul 28, 2019

Conversation

dagar
Copy link
Member

@dagar dagar commented Jun 1, 2019

@romain-chiap

The only real change to check (and test) here is void Sih::send_IMU() that's been updated to use helper classes for publishing raw sensor data. Using these are important so that the same filtering and integration is applied to the sensor data.

@dagar
Copy link
Member Author

dagar commented Jun 1, 2019

Discovered that astyle was chocking on PRINT_MODULE_DESCRIPTION, which is how this slipped through CI.

struct sensor_accel_s _sensor_accel {};
orb_advert_t _sensor_accel_pub{nullptr};
// simulated sensor instances
PX4Accelerometer _px4_accel{ 1311244, ORB_PRIO_DEFAULT, ROTATION_NONE }; // 1311244: DRV_ACC_DEVTYPE_ACCELSIM, BUS: 1, ADDR: 1, TYPE: SIMULATION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use a macro/method for the ID?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could build them up piece by piece with multiple calls setting each thing, but it didn't seem worth it given we ultimately still have magic numbers floating around.

https://github.com/PX4/Firmware/blob/d2c824c5346f27907043efae6b81e3bf73ec51c8/ROMFS/px4fmu_common/init.d-posix/rcS#L99

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could build them up piece by piece with multiple calls setting each thing

I still prefer that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll come back to it in another pass system wide.

@dagar dagar merged commit be99d2f into PX4:master Jul 28, 2019
@dagar dagar deleted the pr-sih_cleanup branch July 28, 2019 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants