-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Conversation
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@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.