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

Better ADC sensor integration #3251

Merged
merged 4 commits into from
Apr 9, 2024
Merged

Better ADC sensor integration #3251

merged 4 commits into from
Apr 9, 2024

Conversation

tmldeponti
Copy link
Contributor

Make adc sensor mappable from the airframe. Easier to then use this module on different platform with diferent ADC sensors.
Better interface for adc in the rotwing state.

@tmldeponti
Copy link
Contributor Author

Thanks for the comments! Everything should be solved now.

@OpenUAS OpenUAS added Enhancement Improve upon exiting functionality Not a defect labels Mar 13, 2024
OpenUAS
OpenUAS previously approved these changes Mar 13, 2024
@@ -26,6 +26,7 @@
#ifndef WING_ROTATION_ADC_SENSOR_H
#define WING_ROTATION_ADC_SENSOR_H

extern float skew_adc_sensor;
Copy link
Member

Choose a reason for hiding this comment

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

Why did you add this? This should not be needed as it is published in the ABI message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The mapped ADC to Radians value is published in the ABI message, not the raw ADC value. This is dependent on the scaling and offset value that is provided. When determining the mapping between ADC and radians (or deg) the first time the sensor is installed it is usefull to have directly the adc output without having to convert it. In addition, in rotwing state we have in the same message both the skew command as well as the ADC reading, therefore facilitating the estimation of the mapping parameters.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer not to make this accessible externally as it is not needed and not used. If you want to do that just add a publisher which publishes the generic ADC message from this module, but you could also just set the scalings to 1 to read out the value on calibration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand, I removed it.

@@ -26,6 +26,7 @@
#ifndef WING_ROTATION_ADC_SENSOR_H
#define WING_ROTATION_ADC_SENSOR_H

extern float skew_adc_sensor;
Copy link
Member

Choose a reason for hiding this comment

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

I prefer not to make this accessible externally as it is not needed and not used. If you want to do that just add a publisher which publishes the generic ADC message from this module, but you could also just set the scalings to 1 to read out the value on calibration.

@fvantienen fvantienen merged commit afa9378 into paparazzi:master Apr 9, 2024
1 check passed
@fvantienen fvantienen deleted the ADC_PR branch April 9, 2024 09:25
Dennis-Wijngaarden pushed a commit to tudelft/paparazzi that referenced this pull request Apr 15, 2024
* Make adc sensor mappable from the airframe. Better interface for adc in the rotwing state.

* Added parameters to v3b airframe

* Addressed the comments

* Removed external variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve upon exiting functionality Not a defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants